DRUPAL 8 and COMMERCE

Jason Acuna

@tatewaky

what will we cover?

  • Why Commerce?
  • What is composer?
  • Installing commerce.
  • Currencies.
  • Store types.
  • Product Types.
  • Orders.
  • Entity orders.
  • Payments getaways.
  • Checkout flows.

Why Commerce?

  • Open Source.
  • Community Supported.
  • Easy to extend.
  • FREE.

Last Version:

8.x-2.0-beta5

  • User Experience Improvement from the begining.
  • More mentorship to agencies.
  • More critical functionality into the core itself.

what to expcect?

  • Easier way to handle dependencies in php projects.
  • Modern applications such as Drupal 8 consist of many classes, so it would be impractical and costly to manually include each one.
  • Drupal 8 Brings composer on its core.
  • Commerce handles it owns dependencies.

 

WHAT IS COMPOSER?

How to install COMMERCE?

composer config repositories.drupal composer https://packages.drupal.org/8

Composer

Download manually

Drush

Drupal Console

FROM scratch

composer create-project drupalcommerce/project-base scstore --stability dev

DEPENDENCIES

 

  •  address
  •  entity                
  • inline_entity_form        
  • profile                
  • swiftmailer
  • entity_reference_revisions    
  • mailsystem            
  • state_machine

UPDATING 

composer update drupal/commerce --with-dependencies

WE ARE SET UP WHAT NEXT?

  • First add currencies.
  • then add stores.
  • after that products.
  • finally the other things:
    • taxes.
    • coupons.
    • checkout flow.

STOREs

  • We can add fields per store.
  • One order belongs to one store.
  • One products might belong to different stores.

PRODUCTs in d7

  • You had a product entity.
  • can't see the product itself.
  • needs a node per product.
  • in case of multiple products you still require a product display.

PRODUCTs in d8

  • No product display.
  • Entity display is independent.
  • Can be shared between different stores.
  • Product variations represent the product itself.

PRODUCT Attributes

IN DRUPAL 7

  • Field using different values.
  • Taxonomy term reference.
  • Module fancy attributes.

 

IN DRUPAL 8

 

  • Separated entity.
  • can be configured on the variation types.

Order item types

  • Extends the functionality of particular orders.

 

  • Can request user extra information when adding products.

 

  • Replace entity items from commerce 1.x.

Payment getaways

  • Every payment method is integrated as an api.
  • Can be integrated with authorize, paypal, and as many payment methods as you want.
  • Let's use the example payment method for our dev environments (unless we want sandbox our example).

Checkout flows

  • They are amazing.
  • we can have several of them to use as we pleased.
  • we can easily configure to show what we are expecting.

REferences

http://docs.drupalcommerce.org/v2

 

https://www.ostraining.com

THANKS

sandcamp2017

By Jason Acuna

sandcamp2017

  • 696