A lot of thanks to the commerce guys for contributing the Drupal commerce module to Drupal community, which took drupal to a different level in the CMS world. Its very exciting, Commerce 2.x which is the Drupal 8 version of drupal commerce. As like any other drupal developer / architect, I am also excited about Commerce 2.x
Thank God, I was one of the fortunate ones to attend the Commerce Guys session on DrupalCon New Orleans 2016, the very first session after the release of ‘8.x-2.0-alpha4’ version of drupal commerce. It was an amazing session, which made a lot of things clearer,a lot of unanswered questions were answered by the Commerce guys themselves. Here we are going to discuss about the take away of the Commerce Guys session on DrupalCon New Orleans 2016.
No more Commerce Kickstart in Drupal 8, Why?
No more Commerce Kickstart in Drupal 8, because Commerce 2.x is developed as loosely coupled by using a lot of PHP 5.4+ libraries like tax [tax library], addressing [addressing library powered by Google’s dataset], intl [internationalization library powered by CLDR data], zone [zone management library]. Using composer we can create a new site as like commerce kick start in Drupal 7. For that we have to use the following command.
$ composer create-project drupalcommerce/project-base mystore --stability dev
The above command will download Drupal 8 + Commerce 2.x with all dependencies to the ‘mystore’ folder. Before running the above command please make sure you have installed composer globally on your system.
How to install Commerce 2.x on existing site?
For Installing Commerce 2.x in existing Drupal8.x site, we need to do the following steps.
Step 1: Add the Drupal packagist repository which allows Composer to find Commerce and the other Drupal modules. For that run the following command,
$ composer config repositories.drupal composer https://packagist.drupal-composer.org
Step 2: The following command will help us to download the required libraries and modules (Address, Entity, State Machine, Inline Entity Form, Profile).
$ composer require "drupal/commerce 8.2.x-dev"
Step 3: Enable the modules “commerce_product commerce_checkout commerce_cart commerce_tax” , Use
Read more about the commerce documentation on: http://docs.drupalcommerce.org/v2/
The above steps help you to install the commerce 2.x on the existing site. Moreover that in Drupal 8 commerce 2.x requires lot of contrib modules developed and contributed by commerce guys themselves. The following ones are the famous ones.
What is new in Commerce 2.x?
- Currency Management : Integrated the Unicode CLDR project. So it is easy to use the currency inside and outside the US.
- Price Formatting: Price format varies from country to country and language to Country. Like German(Austria) Vs German(Germany)
- Taxes: Imports the tax rates automatically on country basis depending upon the product like B2B, B2C, digital or physical products.
- Stores: Multiple stores in same Drupal Commerce Instance, hence there will be majorly two types of use cases, first one is where User can create their own stores based on their own products. Which means multiple cart from multiple stores, from the buyer’s perspective. The Second one being this, that the Company has billing location in multiple countries.
- Products: Instead of nodes we hare having Product entity itself. On the production creation page using inline entity to create individual product variations. And those variations holds the SKUs and sets of attributes.
- Product Attributes: In Commerce 2.x product attributes are its own entities, So it is easy to edit, delete, create new attribute from. Suppose you want to add the attributes to the product variation type, you have to edit the respective production variation type and select the checkbox under the ‘Attributes’. So it is easy to use different form of modes to display fields.
- Order and Line Item Types: This will provide the option to have separate order types for different types of products like physical and digital products, event registration, training payment etc. So it s provide different checkout flow, different workflow, different logic or different experience to the customers.
- Order Editing: Order is in step by step. Right columns provide the IP address and the geo location of the order.
- Add to Cart Forms: In the add to cart forms,we can have the variation attributes fields and line item fields as well. Now we have full control add to cart forms powered by Form display mode and field widget plugin.
- Shopping Carts: If you having multiple shopping carts, the ui will help to see and checkout each of them separately.
- Shopping Cart block: Easily customizable shopping cart block.
- Checkout Flows: You can define your own custom checkout flows.
- Improved Checkout UX: It provides the option to do checkout as a guest user, or can also be registered as a new user while doing checkout.
- Payments: Under active development, Currently integrating Braintree and Authorize.Net as reference implementations.
Early in 2017 or even before Commerce 2.x will be fully functional. Commerce 2.x with Drupal 8 will make a difference in the ecommerce world.
When can we start using the Drupal8 Commerce 2.x ?
See the bellow comment by Bojan Živanović
Thanks, that's a great summary. We're tracking the beta1 blockers here: https://www.drupal.org/node/27...,
once beta1 gets released people will be able to start building production sites on Commerce 2.x.See you in the issue queues!
Image credits: https://www.flickr.com/photos/comprock/26392816934/in/pool-drupalconneworleans2016/