User login

DrupalNights: Kevin Baringer presents Drupal Commerce 2.0 for D8

Sponsored by BioRaft.

http://drupalnights.org/events/2016/kevin-baringer-drupal-commerce-20-d8

My notes from Kevin's presentation:

New PHP Libraries that Commerce Guys introduced for use by anyone, and required by Commerce 2.
https://github.com/commerceguys/addressing - powered by Google's address dataset
https://github.com/commerceguys/intl - PHP 5.3+ internationalization library, powered by CLDR data-- parts being adopted by Symfony
https://github.com/commerceguys/zone - territorial demarcations, a state or province could be a zone
https://github.com/commerceguys/tax - being adopted by Foxycart, a competitor of

Object Oriented standards such as namespacing make it easier to extend and incorporate 3rd party code

A BioRaft employee contributed multi-site to Drupal Console.

Commerce 2 strongly recommends Drupal Console.

https://hechoendrupal.org.gitbooks.io/drupal-console/content/en/index.html

Drupal Console makes use of Symfony Console

Required modules:

  • Contrib's Entity API - still pushing forward core's Entity API
  • Inline Entity Form - widget for inline management - creation, modification, removal - of referenced entities. Used for Products -> Variations, and Orders -> Line-Items - was supported by Acquia's Module Acceleration Program
  • Address - powered by addressing and zone PHP libraries mentioned above
  • State Machine - provides Workflow with States and Transitions
  • Profile - configurable user profiles. Separate entity from the user, but linked.

Features in core Commerce 2:

  • Currency Management

    • Uses intl PHP library built by Commerce Guys, and provides access to data from Unicode Common Locale Data Repository (CLDR) - http://cldr.unicode.org
    • France, Germany, and UK expect slightly different presentations of the same ammount in the same currency, say Euros
  • Taxes

    • Commerce 2 now completely separate from Rules module
    • leverages tax and zone PHP libraries
    • Recommends a Tax Cloud service, like Alvara, for the bloody United States
  • Stores

    • Order connected to a single store entity. Represents a billing location- helps with tax calculations. Supports multiple stores in multiple countries. Products can be offered from multiple stores. For example, a single business with multiple locations-- customers buy from the store closest to them, or, in their country. Or allow sellers to open accounts on the site, and create and sell their own products, like the ebay or Etsy model. In this case, the product catalog is store specific.

Adding Products workflow:
1. import a currency
2. create a store
3. create products

Can do first two steps with Drupal Console:
drupal commerce:create:store
(and follow prompts)

  • Products

  • Product Attributes

    • Product Attributes and Attribute Values are now entity types - same UI as you get for node types etc.
    • No longer uses taxonomy for product variations. Prevents admins from deleting attribute terms that have already been purchased.
    • New attributes are automatically available to product variations, no need to set up Vocabulary, Term Reference, etc.
    • Swatches ("Fancy Attributes") available in cart out-of-the-box - see what your product looks like, as you chose the options, in the cart
      https://drupalcommerce.org/blog/44310/enabling-fancy-attributes-commerce-2x
  • Order and Line Item Types

    • in commerce 2 core, replaces commerce_order_types, commerce_custom_product, and alternative approach commerce_line_items
    • Different order types (physical, digital, event registration, membership, etc.) for different types of products

Line Item - if that short you're ordering, you want to be able to specify the text written on the shirt, that's a line item, a field that the buyer can type in anything, or another line item would be an uploadable image field

  • Order Editing - may not be in the wild yet.

  • Add to Cart Forms

  • Multiple Shopping Carts

  • Shopping Cart Block

    • icon with number of items
    • clicking icon gives popup
  • Checkout Flows

    • not cooked yet
    • Multi-step forms that can be configured by store admins
    • Config entities - commerce_checkout_flow - stored in YAML files
    • Each Order Type can have it's own checkout flow
    • Uses Checkout Panes by default
    • Admin UI resembles Field's "Manage display" UI
    • Developers can also add completely new custom checkout flows with a plugin
  • Improved Checkout UX

    • Not quite there yet
    • Option to checkout as returning user, register as new user, or as guest user
  • Improved Checkout UX

    • Contextual action buttons ("Contunue to review", "Pay and complete purchase", etc)
    • Review pane now includes edit links leading to original step

Michelle: Point of sale plugin?

Me: History of Point of Sale in Drupal is largely our friend Kelly Albrecht in Western Mass... (drupal 8 point of sale plugin leftclick)

https://www.drupal.org/project/uberpos
https://lastcallmedia.com/taxonomy/term/42
https://www.drupal.org/project/commerce_authnet_card_present

Picture of a sail boat. Thinking about Kay right now. He's a sailor.

Dani: Was it a three hour tour?

Micky: BitCoin?
Kevin: Haven't seen it mentioned.

Don't have Commerce Kickstart anymore -- which was needed because Commerce on its own was well-nigh impossible to configure from scratch, and Commerce 2 is about just working out of the box.

Lots of contrib modules for Commerce 1 being incorporated directly into Commerce 2.

When? Firt Beta is going to be Fall 2016 or early 2017.
Tracking doc: https://www.drupal.org/node/2733869

Discounts and coupons?

Subscriptions (recurring payments)?

Bulk import of products?

All unknown!

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.