![Page 1: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/1.jpg)
An introduction to Drupal Commerce
&Real World Examples
July 13 2013
![Page 2: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/2.jpg)
So!ware Architect
Email: [email protected]
John Robert Wilson
Twitter: @JohnRobertWilso
Drupal.org: LSU_JBob
![Page 3: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/3.jpg)
The Basics
![Page 4: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/4.jpg)
![Page 5: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/5.jpg)
Commerce Entities
![Page 6: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/6.jpg)
Products
• Something you’re trying to sell
• A title and a price
• Create product references on nodes for end users
![Page 7: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/7.jpg)
Orders
• Start out with a status of “cart”
• Once a product is placed in the cart, a new order is created
• Contains Line Items, payment transactions
• Contains customer information and order metadata
![Page 8: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/8.jpg)
Line Items
• An instance of a product in an order (or cart)
• Able to contain personalized options for that instance of the product
![Page 9: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/9.jpg)
Payment Transactions
• Hold all detailed financial info and metadata
• Can have a status of accepted or declined
• Payload from Payment Gateways
![Page 10: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/10.jpg)
Payment Gateways
![Page 11: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/11.jpg)
Payment Gateways
• You don’t want to store actual credit card numbers ( compliance headaches, security headaches)
• Use 3rd Party Payment Gateways
• Send payment info over https to the third party and get accepted or declined
• Paypal, Payflow Pro, Authorize.Net, Amazon Payments, Bitcoin?!?
![Page 12: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/12.jpg)
Checkout Process
![Page 13: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/13.jpg)
Checkout Process
![Page 14: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/14.jpg)
Commerce Rules
![Page 15: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/15.jpg)
Commerce Rules
• Checkout process has Rules integrated into it
• Can be used to apply a tax based on state
• Can give a discount
• Much much more!
![Page 16: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/16.jpg)
Shipping & Inventory
![Page 17: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/17.jpg)
Shipping & Inventory
• Commerce Shipping contrib module!http://drupal.org/project/commerce_shipping
• For shipping physical products and creating customer shipping profiles
• Commerce Stock contrib module!http://drupal.org/project/commerce_stock
• Decrement stock as products are purchased
![Page 18: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/18.jpg)
Hooks for Devs
![Page 19: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/19.jpg)
Hooks for Developers
• hook_commerce_checkout_router - routes the default checkout url to an alternate url if neccessary
• hook_commerce_checkout_complete - Allows other modules to perform business logic when an order is completed
• hook_commerce_checkout_pane_info_alter - alter an existing checkout pane’s metadata
• MUCH MUCH MORE
![Page 20: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/20.jpg)
Commerce Kickstart
![Page 21: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/21.jpg)
Commerce Kickstart
• http://drupal.org/project/commerce_kickstart
• Nice quick configured drupal commerce site
• Includes latest version of core and all needed dependencies
![Page 22: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/22.jpg)
A Real World Example
![Page 24: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/24.jpg)
![Page 25: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/25.jpg)
![Page 26: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/26.jpg)
![Page 27: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/27.jpg)
![Page 28: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/28.jpg)
![Page 29: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/29.jpg)
![Page 30: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/30.jpg)
![Page 31: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/31.jpg)
Diamond Reserve
![Page 32: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/32.jpg)
Diamond Reserve
![Page 33: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/33.jpg)
Diamond Reserve
![Page 34: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/34.jpg)
Another Real World Example
![Page 36: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/36.jpg)
![Page 37: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/37.jpg)
![Page 38: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/38.jpg)
![Page 39: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/39.jpg)
![Page 40: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/40.jpg)
![Page 41: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/41.jpg)
![Page 42: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/42.jpg)
Drupal Commerce
• Built from scratch with lessons learned in mind
• Extendable and flexible on many levels
• Blog post outlining this session
![Page 43: An Introduction to Drupal Commerce & Real World Examples](https://reader034.vdocuments.net/reader034/viewer/2022052514/554f775db4c905d25b8b4580/html5/thumbnails/43.jpg)
PHASE2TECHNOLOGY.COM