[Srijan Wednesday Webinars] Meet Commerce 2.X

Preview:

Citation preview

Meet Commerce 2.xNative eCommerce framework for Drupal

Matt Glaman, Commerce Guys! @nmdmatt

Drupal + Drupal Commerce= flexible eCommerce

@srijan #SrijanWW

Matt Glaman

• Senior Drupal Consultant @ Commerce Guys

• Co-maintainer of Drupal Commerce

• Author of Drupal 8 Development Cookbook

@srijan #SrijanWW

A native eCommerce framework for Drupal“Powering truly flexible eCommerce”

• Taxes

• Fees

• Discounts

• Pricing

• Addressing

• Checkout

• Product management

• Catalog management

• Order workflows

• Payments

Looking back and moving forward@srijan #SrijanWW

GROUNDWORK

@srijan #SrijanWW

• Abstract core concepts• PHP at large

• Used by other applications• Influence on symfony/intl

• First to get off “the island”

Libraries first@srijan #SrijanWW

Composer@srijan #SrijanWW

Adding Commerce to an existing Drupal 8 site requires Composer Manager, for now

$ drupal module:download composer_manager;$ php modules/contrib/composer_manager/scripts/init.php;$ composer drupal-update;

OR, for a new Drupal 8 site

$ composer create-project drupalcommerce/project-base mystore --stability dev

https://bojanz.wordpress.com/2015/09/18/d8-composer-definitive-intro/

• Developed for Commerce 1.x product user experience• Standard in 2.x • Manage product variations• Manage order line items• Used by Media in D8

Inline Entity Form@srijan #SrijanWW

• Drupal 8 port of Profile2• Replaces 1.x customer profiles• Replaces need for Addressbook

Profile@srijan #SrijanWW

Workflows are composed of states and explicit transitions between them.

Order types have different workflows.

State Machine@srijan #SrijanWW

https://drupalcommerce.org/blog/43169/commerce-2x-stories-workflows

• Drupal 8 heir to Addressfield• Uses CommerceGuys libraries• Supports address formats• Powered by Google's dataset

Address: Fields & Formats@srijan #SrijanWW

https://drupalcommerce.org/blog/16864/commerce-2x-stories-addressing

Address: Zones@srijan #SrijanWW

DRUPAL COMMERCE

@srijan #SrijanWW

• Using CLDR data• commerceguys/intl library• Internationalized formatting (locale)

Currencies & Pricing@srijan #SrijanWW

https://drupalcommerce.org/blog/41828/commerce-2x-stories-currencies

Smart 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)

Taxes@srijan #SrijanWW

https://drupalcommerce.org/blog/31036/commerce-2x-stories-taxes

• Multiple stores• Locations• Marketplace (multiseller)

model• Billing country options• Per-store settings

• Tax• Billing country

Stores@srijan #SrijanWW

https://drupalcommerce.org/blog/42419/commerce-2x-stories-stores

• Orders belong to one store• Products can be part of multiple stores

Stores: Orders and Products@srijan #SrijanWW

Store: Console@srijan #SrijanWW

Generate a store using Drupal Console

$ drupal commerce:create:store

Enter the store name: Northeast Region

Enter the store email: ne-usa@mystore.com

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.

• Product & Variation entities• Each product type has

matching variation type• Attributes via entity references

Products@srijan #SrijanWW

https://drupalcommerce.org/blog/42500/commerce-2x-stories-products

• Order type support• Shippable order• Digital order

• Workflows!• More direct action items• “Placed” timestamp• Order-level pricing

Orders@srijan #SrijanWW

• Multiple carts• Cart is an order flag

Carts@srijan #SrijanWW

Shopping cart block@srijan #SrijanWW

• Icon with item count• Click to expand for details• Powered by views, customizeable.

• Simplified customization

• Line item form display

New add to cart form@srijan #SrijanWW

@srijan #SrijanWW

• In progress!• Lot of time spent researching user experience• Each order type will have its own checkout workflow• Improved guest and authenticated checkout experiences

Checkout@srijan #SrijanWW

• Not yet• Expand the API and UI (auth, refunds, etc)• Built-in tokenization (commerce_cardonfile in core)• Concept of modes (sandbox, production)

Payments@srijan #SrijanWW

Join 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

drupalcommerce.org/blog/tagged/commerce-2x

Get Involved; Join The Fun@srijan #SrijanWW

Matt Glaman!/nmdmatt"/mglaman#/mglaman

Thank You!

Take this conversation online by tweeting using the hashtag #SrijanWW

Recommended