drupal 414: meet commerce 2.0

27
Meet Commerce 2.x matt glaman | @nmdmatt

Upload: matt-glaman

Post on 16-Jan-2017

250 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Drupal 414: Meet Commerce 2.0

Meet Commerce 2.xmatt glaman | @nmdmatt

Page 2: Drupal 414: Meet Commerce 2.0

Matt Glaman (mglaman)

Senior Drupal Consultant @ Commerce Guys

Co-maintainer of Drupal Commerce

Author of Drupal 8 Development Cookbook

Page 3: Drupal 414: Meet Commerce 2.0

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

Page 4: Drupal 414: Meet Commerce 2.0

Looking back and moving forward

TaxesFeesDiscountsPricingAddressing

CheckoutProduct management Catalog managementOrder workflowsPayments

Page 5: Drupal 414: Meet Commerce 2.0

GROUNDWORK

Page 6: Drupal 414: Meet Commerce 2.0

Libraries FirstAbstract core concepts

PHP at largeUsed by other applications

Influence on symfony/intl

First to get off the island

Page 7: Drupal 414: Meet Commerce 2.0

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

Page 8: Drupal 414: Meet Commerce 2.0

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

Page 9: Drupal 414: Meet Commerce 2.0

ProfileDrupal 8 port of Profile2

Replaces 1.x customer profiles

Replaces need for Addressbook

Page 10: Drupal 414: Meet Commerce 2.0

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

Page 11: Drupal 414: Meet Commerce 2.0

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

Page 12: Drupal 414: Meet Commerce 2.0

Address: Zones

Page 13: Drupal 414: Meet Commerce 2.0

DRUPAL COMMERCE

Page 14: Drupal 414: Meet Commerce 2.0

Currencies & PricingUsing CLDR data

commerceguys/intl library

Internationalized formatting (locale)

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

Page 15: Drupal 414: Meet Commerce 2.0

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

Page 16: Drupal 414: Meet Commerce 2.0

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

Page 17: Drupal 414: Meet Commerce 2.0

Stores: Orders and Products● Orders belong to one store● Products can be part of multiple

stores

Page 18: Drupal 414: Meet Commerce 2.0

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

Page 19: Drupal 414: Meet Commerce 2.0

ProductsProduct & Variation entities

Each product type has matching variation type

Attributes via entity references

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

Page 20: Drupal 414: Meet Commerce 2.0

OrdersOrder type support

Shippable order

Digital order

Workflows!

More direct action items

“Placed” timestamp

Order-level pricing

Page 21: Drupal 414: Meet Commerce 2.0

Orders: Edit

Page 22: Drupal 414: Meet Commerce 2.0

CartsMultiple carts

Cart is an order flag

Page 23: Drupal 414: Meet Commerce 2.0

Add to cart form

Page 24: Drupal 414: Meet Commerce 2.0

CheckoutIn progress!

Lot of time spent researching user experience

Each order type will have its own checkout workflow

Improved guest and authenticated checkout experiences

Page 25: Drupal 414: Meet Commerce 2.0

PaymentsNot yet

Expand the API and UI (auth, refunds, etc)

Built-in tokenization (commerce_cardonfile in core)

Concept of modes (sandbox, production)

Page 26: Drupal 414: Meet Commerce 2.0

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/

Page 27: Drupal 414: Meet Commerce 2.0

QUESTIONS?