deconstructing drupal commerce

148
BLUE-BAG GUY SCHNEERSON DRUPAL: guy_schneerson [email protected] TWITTER: guy_schneerson www.blue-bag.com Established in 2000 Deconstructing Drupal Commerce

Upload: guyschneerson

Post on 18-Jul-2015

508 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Deconstructing drupal commerce

BLUE-BAG

GUY SCHNEERSONDRUPAL: [email protected] TWITTER: guy_schneerson

www.blue-bag.com

Established in 2000

Deconstructing Drupal Commerce

Page 2: Deconstructing drupal commerce

blue-bag

Deconstructing Drupal CommerceThis is going to be a non technical presentation and no Drupal knowledge is required. !

If I use words like “Contrib module” that don’t mean a thing to you or I stop making sense then do stop me :)

Page 3: Deconstructing drupal commerce

blue-bag

Commerce KickstartA shop distribution based on Drupal & Drupal Commerce

Page 4: Deconstructing drupal commerce

Text

blue-bag

A shop with all the bells and whistlesA solution that competes with all the other big players out there

Page 5: Deconstructing drupal commerce

Text

blue-bag

A shop with all the bells and whistlesA solution that competes with all the other big players out there

Page 6: Deconstructing drupal commerce

blue-bag

The real power of Drupal Commerce

Comes from the components that make up Drupal

commerce

Page 7: Deconstructing drupal commerce

blue-bag

why does it matter ?What makes a framework based on distinct independent components better then a highly featured solution?

Page 8: Deconstructing drupal commerce

blue-bag

why does it matter ?What makes a framework based on distinct independent components better then a highly featured solution?

• It is impossible to think up of every use case

Page 9: Deconstructing drupal commerce

blue-bag

why does it matter ?What makes a framework based on distinct independent components better then a highly featured solution?

• It is impossible to think up of every use case

• The more features, the more permutations – difficult configuration & more prone to bugs.

Page 10: Deconstructing drupal commerce

blue-bag

why does it matter ?What makes a framework based on distinct independent components better then a highly featured solution?

• It is impossible to think up of every use case

• The more features, the more permutations – difficult configuration & more prone to bugs.

• It is easier to focus on individual components than on one large system

Page 11: Deconstructing drupal commerce

blue-bag

why does it matter ?What makes a framework based on distinct independent components better then a highly featured solution?

• It is impossible to think up of every use case

• The more features, the more permutations – difficult configuration & more prone to bugs.

• It is easier to focus on individual components than on one large system

• Individual components have more use cases – more use cases more people using and testing – more robust and flexible components :)

Page 12: Deconstructing drupal commerce

blue-bag

Take control By understanding the components that make Drupal Commerce you can:

Page 13: Deconstructing drupal commerce

blue-bag

Take control By understanding the components that make Drupal Commerce you can:

• Put them together in new ways, creating new and unique products.

Page 14: Deconstructing drupal commerce

blue-bag

Take control By understanding the components that make Drupal Commerce you can:

• Put them together in new ways, creating new and unique products.

• Customise to your needs

Page 15: Deconstructing drupal commerce

blue-bag

Take control By understanding the components that make Drupal Commerce you can:

• Put them together in new ways, creating new and unique products.

• Customise to your needs

• Adapt - because things never stay the same

Page 16: Deconstructing drupal commerce

blue-bag

The Drupal building blocks

Page 17: Deconstructing drupal commerce

blue-bag

The Drupal building blocks• Entities - Are data types that can be extended by code

and configuration

Page 18: Deconstructing drupal commerce

blue-bag

The Drupal building blocks• Entities - Are data types that can be extended by code

and configuration

• Views - A visual tool for producing lists and reports on any Drupal entity type (you can even extend it to work on other databases you may have)

Page 19: Deconstructing drupal commerce

blue-bag

The Drupal building blocks• Entities - Are data types that can be extended by code

and configuration

• Views - A visual tool for producing lists and reports on any Drupal entity type (you can even extend it to work on other databases you may have)

• Rules - A visual tool for building business logic using an Event - Condition - Action

Page 20: Deconstructing drupal commerce

blue-bag

The Drupal building blocks• Entities - Are data types that can be extended by code

and configuration

• Views - A visual tool for producing lists and reports on any Drupal entity type (you can even extend it to work on other databases you may have)

• Rules - A visual tool for building business logic using an Event - Condition - Action

• Widgets - for data editing

Page 21: Deconstructing drupal commerce

blue-bag

The Drupal building blocks• Entities - Are data types that can be extended by code

and configuration

• Views - A visual tool for producing lists and reports on any Drupal entity type (you can even extend it to work on other databases you may have)

• Rules - A visual tool for building business logic using an Event - Condition - Action

• Widgets - for data editing

• Formatters - for displaying fields

Page 22: Deconstructing drupal commerce

blue-bag

The Drupal building blocksRules - A visual tool for building business logic using an Event - Condition - Action

My Silly discount

If the name of the user is Guy

Set the price to Zero

Page 23: Deconstructing drupal commerce

blue-bag

The Drupal building blocksRules - A visual tool for building business logic using an Event - Condition - Action

I love this site its all free (as long as your name is Guy)

Page 24: Deconstructing drupal commerce

blue-bag

Add to cart

Page 25: Deconstructing drupal commerce

blue-bag

Add to cart

Page 26: Deconstructing drupal commerce

blue-bag

The Drupal building blocks

Page 27: Deconstructing drupal commerce

blue-bag

The Drupal building blocks

Page 28: Deconstructing drupal commerce

blue-bag

The Drupal building blocks

Page 29: Deconstructing drupal commerce

blue-bag

The Drupal building blocks

Page 30: Deconstructing drupal commerce

blue-bag

Drupal Commerce Entities (Data Elements)

Page 31: Deconstructing drupal commerce

blue-bag

Drupal Commerce Entities (Data Elements)

Page 32: Deconstructing drupal commerce

blue-bag

Drupal Commerce Entities (Data Elements)

No need to panic!

We will go over this one at a time :)

Page 33: Deconstructing drupal commerce

blue-bag

Drupal Commerce Functional Elements

Page 34: Deconstructing drupal commerce

blue-bag

Drupal Commerce Functional Elements

Page 35: Deconstructing drupal commerce

blue-bag

Drupal Commerce Functional Elements

This should start making some sense

Page 36: Deconstructing drupal commerce

blue-bag

Lets take a kickstart JourneyVisiting our elements along the way

Page 37: Deconstructing drupal commerce

blue-bag

The Product Page

Page 38: Deconstructing drupal commerce

blue-bag

The ProductThe product title

The Product description

All the elements of the product that don’t change

Page 39: Deconstructing drupal commerce

blue-bag

Product variations

Price

Colour and size

All the elements that vary

Image

Page 40: Deconstructing drupal commerce

blue-bag

Add to cart

Page 41: Deconstructing drupal commerce

blue-bag

Add to cart

Page 42: Deconstructing drupal commerce

blue-bag

Add to cart Converts a product into a line item

Page 43: Deconstructing drupal commerce

blue-bag

Add to cart Converts a product into a line item

copy info from the product variation

colour, size & price

Page 44: Deconstructing drupal commerce

blue-bag

Add to cart Converts a product into a line item

Defined by the line item type.

Quantity & custom fields (Gift wrap)

Page 45: Deconstructing drupal commerce

blue-bag

Add to cart Converts a product into a line item

The form submit will kick this off

Page 46: Deconstructing drupal commerce

blue-bag

Cart page

Page 47: Deconstructing drupal commerce

blue-bag

Cart page

Page 48: Deconstructing drupal commerce

blue-bag

Cart page

Page 49: Deconstructing drupal commerce

blue-bag

The cart page

Page 50: Deconstructing drupal commerce

blue-bag

The cart page

Is a view

Page 51: Deconstructing drupal commerce

blue-bag

The cart pageYou can add fields to the view

Page 52: Deconstructing drupal commerce

blue-bag

The cart page

Add a field

Page 53: Deconstructing drupal commerce

blue-bag

The cart page

Add a field

Page 54: Deconstructing drupal commerce

blue-bag

Checkout

Page 55: Deconstructing drupal commerce

blue-bag

Checkout

Page 56: Deconstructing drupal commerce

blue-bag

Checkout

Page 57: Deconstructing drupal commerce

blue-bag

Checkout

Page 58: Deconstructing drupal commerce

blue-bag

Checkout

Page 59: Deconstructing drupal commerce

blue-bag

Checkout

Page 60: Deconstructing drupal commerce

blue-bag

Checkout

Page 61: Deconstructing drupal commerce

blue-bag

Checkout

Page 62: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 63: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 64: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 65: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 66: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 67: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 68: Deconstructing drupal commerce

blue-bag

Checkout pane

Page 69: Deconstructing drupal commerce

blue-bag

The Profile & AddressSo we almost covered all entities. only Address and payment to do.

Page 70: Deconstructing drupal commerce

blue-bag

The Profile & AddressSo we almost covered all entities. only Address and payment to do.

Page 71: Deconstructing drupal commerce

blue-bag

The Profile & AddressSo we almost covered all entities. only Address and payment to do.

Page 72: Deconstructing drupal commerce

blue-bag

The Profile & AddressWe have two profiles on this page Billing

Page 73: Deconstructing drupal commerce

blue-bag

The Profile & AddressWe have two profiles on this page Billing

Page 74: Deconstructing drupal commerce

blue-bag

The Profile & AddressWe have two profiles on this page Billing

Page 75: Deconstructing drupal commerce

blue-bag

The Profile & AddressWe have two profiles on this page and shipping

Page 76: Deconstructing drupal commerce

blue-bag

The Profile & AddressLets expand the shipping details so we can see both addresses

Page 77: Deconstructing drupal commerce

blue-bag

The Profile & AddressLets look at how those are configured

Page 78: Deconstructing drupal commerce

blue-bag

The Profile & AddressLets look at how those are configured

Page 79: Deconstructing drupal commerce

blue-bag

The Profile & AddressLets look at how those are configured

Page 80: Deconstructing drupal commerce

blue-bag

The Profile & AddressWe can add a new field

Page 81: Deconstructing drupal commerce

blue-bag

The Profile & AddressAnd it is now shown on the billing profile

Page 82: Deconstructing drupal commerce

blue-bag

Payment methods & transectionsAnd finally

Page 83: Deconstructing drupal commerce

blue-bag

Payment methods & transectionsAnd finally

Page 84: Deconstructing drupal commerce

blue-bag

Payment methods appear inside the checkout Pane

Payment methods

Page 85: Deconstructing drupal commerce

blue-bag

New Payment methods can be downloaded from drupal.org

Payment methods

Page 86: Deconstructing drupal commerce

blue-bag

and can be configured using rules

Payment methods

Page 87: Deconstructing drupal commerce

blue-bag

That’s me adding a condition to say: Sagepay support will stop on the 20th of Jan

Payment methods

Page 88: Deconstructing drupal commerce

blue-bag

are added to the order whenever a payment or other transactions are made

Payment transactions

Page 89: Deconstructing drupal commerce

blue-bag

are added to the order whenever a payment or other transactions are made

Payment transactions

Page 90: Deconstructing drupal commerce

blue-bag

are added to the order whenever a payment or other transactions are made

Payment transactions

Page 91: Deconstructing drupal commerce

blue-bag

So lets recap

Page 92: Deconstructing drupal commerce

blue-bag

Drupal Commerce Entities (Data Elements)

Page 93: Deconstructing drupal commerce

blue-bag

Drupal Commerce Functional Elements

Page 94: Deconstructing drupal commerce

blue-bag

The Drupal building blocks• Entities - Are Data types that can be extended by code

and configuration

• Views - A visual tool for producing lists and reports on any Drupal entity type (you can even extend it to work on other databases you may have)

• Rules - A visual tool for building business logic using an Event - Condition - Action

• Widgets - for data editing

• Formatters - for displaying fields

Page 95: Deconstructing drupal commerce

blue-bag

A few examples of extending functionalityUsing Contrib Modules

Page 96: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Shipping by Jakob Torp (googletorp)Part of the kickstart distribution

Page 97: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Shipping by Jakob Torp (googletorp)Part of the kickstart distribution

• Adds a new Line item type

Page 98: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Shipping by Jakob Torp (googletorp)Part of the kickstart distribution

• Adds a new Line item type

• Adds a customer profile + a checkout pane (Shipping information)

Page 99: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Shipping by Jakob Torp (googletorp)Part of the kickstart distribution

• Adds a new Line item type

• Adds a customer profile + a checkout pane (Shipping information)

• Rules integration - Activate relevant shipping options & work out shipping costs.

Page 100: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Shipping by Jakob Torp (googletorp)Part of the kickstart distribution

• Adds a new Line item type

• Adds a customer profile + a checkout pane (Shipping information)

• Rules integration - Activate relevant shipping options & work out shipping costs.

• Extended by other shipping modules like Commerce UPS & FedEx

Page 101: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Stock by Guy Schneerson (guy_schneerson)

Page 102: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Stock by Guy Schneerson (guy_schneerson)

• Adds a stock level field to the product variation entity

Page 103: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Stock by Guy Schneerson (guy_schneerson)

• Adds a stock level field to the product variation entity

• Manipulates the add to cart, cart & checkout form

Page 104: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Stock by Guy Schneerson (guy_schneerson)

• Adds a stock level field to the product variation entity

• Manipulates the add to cart, cart & checkout form

• Uses rules for checking stock availability

Page 105: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Stock by Guy Schneerson (guy_schneerson)

• Adds a stock level field to the product variation entity

• Manipulates the add to cart, cart & checkout form

• Uses rules for checking stock availability

• Uses rules to control the Add to cart action - Disable & repurpose.

Page 106: Deconstructing drupal commerce

blue-bag

Contrib ModulesCommerce Stock by Guy Schneerson (guy_schneerson)

• Adds a stock level field to the product variation entity

• Manipulates the add to cart, cart & checkout form

• Uses rules for checking stock availability

• Uses rules to control the Add to cart action - Disable & repurpose.

• Field formater - Under 5 display “Low stock”

Page 107: Deconstructing drupal commerce

blue-bag

Other modulesProduct Pricing modules

Page 108: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Discount - by bojanz

Product Pricing modules

Page 109: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Discount - by bojanz

• Commerce Coupon - by hunziker

Product Pricing modules

Page 110: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Discount - by bojanz

• Commerce Coupon - by hunziker

• Commerce Multicurrency - by das-peter

Product Pricing modules

Page 111: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Discount - by bojanz

• Commerce Coupon - by hunziker

• Commerce Multicurrency - by das-peter

• Commerce price table (quantity pricing) - by pcambra

Product Pricing modules

Page 112: Deconstructing drupal commerce

blue-bag

Other modulesOthers

Page 113: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Fancy Attributes - by Artusamak

Others

Page 114: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Fancy Attributes - by Artusamak

• Commerce Reorder - by ikos

Others

Page 115: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Fancy Attributes - by Artusamak

• Commerce Reorder - by ikos

• Commerce Customizable Products (allows the creation of new line_item types) - by rszrama

Others

Page 116: Deconstructing drupal commerce

blue-bag

Other modules

• Commerce Fancy Attributes - by Artusamak

• Commerce Reorder - by ikos

• Commerce Customizable Products (allows the creation of new line_item types) - by rszrama

• Commerce Google Analytics - by Cyberschorsch

Others

Page 117: Deconstructing drupal commerce

blue-bag

A few examples of extending functionality

Configuration and custom code

Using Contrib Modules

Page 118: Deconstructing drupal commerce

blue-bag

Develop a new custom checkout pane

Page 119: Deconstructing drupal commerce

blue-bag

Develop a new custom checkout pane

Oops it’s in Russian (Did I mention Drupal kicks Localisation Ass)

Page 120: Deconstructing drupal commerce

blue-bag

Develop a new custom checkout pane

That’s better

Page 121: Deconstructing drupal commerce

blue-bag

Buying options - Using commerce stock

Configuration Only !Commerce stock Provides powerful add to cart configuration. !

Page 122: Deconstructing drupal commerce

blue-bag

Image download - Using commerce stockUsing some custom code to extend the commerce stock functionality.

Page 123: Deconstructing drupal commerce

blue-bag

Cross selling using views

Page 124: Deconstructing drupal commerce

blue-bag

Link Blog posts to products

Add a reference field to your blog post type !

Just one field

Page 125: Deconstructing drupal commerce

blue-bag

A use case - Store open state

We need to be able to close the online store at times

Page 126: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Page 127: Deconstructing drupal commerce

blue-bag

A use case - Store open state

• For stock checking

Page 128: Deconstructing drupal commerce

blue-bag

A use case - Store open state

• For stock checking• Financial audit

Page 129: Deconstructing drupal commerce

blue-bag

A use case - Store open state

• For stock checking• Financial audit• Payment configuration

and testing

Page 130: Deconstructing drupal commerce

blue-bag

A use case - Store open state

• For stock checking• Financial audit• Payment configuration

and testing• Security emergencies

Page 131: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Page 132: Deconstructing drupal commerce

blue-bag

A use case - Store open state

I have an idea !

Page 133: Deconstructing drupal commerce

blue-bag

A use case - Store open state

I have an idea !I will create a simple module called “commerce store” with an Open property

Page 134: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 135: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 136: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 137: Deconstructing drupal commerce

blue-bag

A use case - Store open state

We can then use rules to check for the store open state.

Page 138: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 139: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 140: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 141: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 142: Deconstructing drupal commerce

blue-bag

A use case - Store open stateLike so:

Page 143: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Cool I think I got it - I will be able to add another condition that will allow admins to use the store while it is closed.

Page 144: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Page 145: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Yes you got it.

Page 146: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Yes you got it.give it a go

Page 147: Deconstructing drupal commerce

blue-bag

A use case - Store open state

Yes you got it.give it a go

Page 148: Deconstructing drupal commerce

BLUE-BAG

GUY SCHNEERSONDRUPAL: [email protected] TWITTER: guy_schneerson

www.blue-bag.com

Established in 2000

Questions ?