drupal 414: meet commerce 2.0
TRANSCRIPT
Meet Commerce 2.xmatt glaman | @nmdmatt
Matt Glaman (mglaman)
Senior Drupal Consultant @ Commerce Guys
Co-maintainer of Drupal Commerce
Author of Drupal 8 Development Cookbook
A native eCommerce framework for Drupal“Powering truly flexible eCommerce”
Looking back and moving forward
TaxesFeesDiscountsPricingAddressing
CheckoutProduct management Catalog managementOrder workflowsPayments
GROUNDWORK
Libraries FirstAbstract core concepts
PHP at largeUsed by other applications
Influence on symfony/intl
First to get off the island
Composer
https://bojanz.wordpress.com/2015/09/18/d8-composer-definitive-intro/
$ composer create-project drupalcommerce/project-base mystore --stability dev
$ drupal module:download composer_manager;$ php modules/contrib/composer_manager/scripts/init.php;$ composer drupal-update;
Adding Commerce to an existing Drupal 8 site requires Composer Manager for now
OR, for a new Drupal 8 site
Inline Entity FormDeveloped for Commerce 1.x product user experience
Standard in 2.x
Manage product variations
Manage order line items
Used by Media in D8
ProfileDrupal 8 port of Profile2
Replaces 1.x customer profiles
Replaces need for Addressbook
State Machine
Workflows are composed of states and explicit transitions between them.
Order types have different workflows.
https://drupalcommerce.org/blog/43169/commerce-2x-stories-workflows
Address: Fields & FormatsDrupal 8 heir to Addressfield
Uses CommerceGuys libraries
Supports address formats
Powered by Google's dataset
https://drupalcommerce.org/blog/16864/commerce-2x-stories-addressing
Address: Zones
DRUPAL COMMERCE
Currencies & PricingUsing CLDR data
commerceguys/intl library
Internationalized formatting (locale)
https://drupalcommerce.org/blog/41828/commerce-2x-stories-currencies
TaxesSmart data model designed for fluctuating tax rate amounts ("19% -> 21% on January 1st")
Predefined tax rates for EU countries and Switzerland. More to come.
Tax resolvers with logic for all major use cases (b2b, b2c, digital / physical)https://drupalcommerce.org/blog/31036/commerce-2x-stories-taxes
Stores● Multiple stores
○ Locations○ Marketplace
(multiseller) model● Billing country options● Per-store settings
○ Tax○ Billing country
https://drupalcommerce.org/blog/42419/commerce-2x-stories-stores
Stores: Orders and Products● Orders belong to one store● Products can be part of multiple
stores
Store: Console
$ drupal commerce:create:store
Enter the store name: Chicago
Enter the store email: [email protected]
Enter the store country: United States
Enter the store currency [USD]:
The store has been created. Go to /store/3/edit to complete the store address and manage other settings.
Generate a store using Drupal Console
ProductsProduct & Variation entities
Each product type has matching variation type
Attributes via entity references
https://drupalcommerce.org/blog/42500/commerce-2x-stories-products
OrdersOrder type support
Shippable order
Digital order
Workflows!
More direct action items
“Placed” timestamp
Order-level pricing
Orders: Edit
CartsMultiple carts
Cart is an order flag
Add to cart form
CheckoutIn progress!
Lot of time spent researching user experience
Each order type will have its own checkout workflow
Improved guest and authenticated checkout experiences
PaymentsNot yet
Expand the API and UI (auth, refunds, etc)
Built-in tokenization (commerce_cardonfile in core)
Concept of modes (sandbox, production)
Get Involved; Join The FunJoin us weekly on Wednesday at 3PM GMT+2 in #drupal-commerce
drupalcommerce.org/blog
drupalcommerce.org/contribute/2.x
docs.drupalcommerce.org/v2/contributing/getting-started.html
http://www.srijan.net/webinar/meet-commerce-2x/
QUESTIONS?