Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Simple e-commerce solution with Drupal 8 and Sh...

Simple e-commerce solution with Drupal 8 and Shopify

João Ventura

May 11, 2017
Tweet

More Decks by João Ventura

Other Decks in Programming

Transcript

  1. SIMPLE E-COMMERCE SOLUTION WITH DRUPAL 8 AND SHOPIFY João Ventura

    (@jcnventura) Wunder Germany 11.5.2017 Drupal Camp Nordics 2017 #DCNordics
  2. We’re hiring! Want to work with us? #5 Great place

    to work 2017 (FI) Finland, Latvia, Estonia Germany, UK, Sweden https://wunder.io/careers
  3. E-Commerce in Drupal Ubercart Leading e-commerce solution in Drupal 5

    and 6 Maintained in Drupal 7… And Drupal 8! Drupal Commerce Best solution in Drupal 7 and Drupal 8 Acquia + Magento partnership…
  4. In the real world Top 5 Magento + Magento Ent.

    Oracle Commerce WooCommerce (Wordpress) Shopify Demandware (now Salesforce) https://trends.builtwith.com/shop
  5. Our project Largest Health Club Group Worldwide Club information and

    Lead Generation (Drupal 8) In-house know-how of Fitness Trainer Training Provide Trainer Training outside of organisation Academy site based on similar technology as main site Simple and cost-effective
  6. Shopify Advantages E-commerce SaaS solution. Manages the following: Users Payments

    (credit cards, Paypal, many others) Invoices Sales taxes Discount cupons But it does cost money ($29-$299 / mo + 0.5-2.9% / sale)
  7. There’s a module for that™ Shopify API (https://www.drupal.org/project/shopify_api) No integration,

    just the API. Shopify eCommerce (https://www.drupal.org/project/shopify) Shop integration Sync products from Shopify to Drupal
  8. How the module works Synchronises products and collections Cron (periodical)

    Webhooks (push from Shopify) Drupal endpoint are entities Product and Product variant entities (fieldable) Collections are taxonomies
  9. What we ended up doing Custom product content type Reason:

    cart checkout title != page title Custom block to display Shopify entity Allowed us to move product editorial UI from Shopify to Drupal Used custom view to display products instead of /store hook_form_alter() to hide quantity field
  10. There’s a module for that™ Shopify Edition Extensive third-party App

    store (https://apps.shopify.com) Email Marketing, Upsells, Social Media, etc. ($$$) For this client we ended up using: Terms and Conditions Confirmation ($59) Meta fields (remember CCK?)
  11. Shopify caveats No multi-language support Language handling via customisation of

    client notifications. Shopify Plus is steeply priced (quote only, >1K$/mo) Checkout in same domain. No transaction fees
  12. Setup 1. Create a free store (https://www.shopify.com) 2. Install and

    enable Shopify API (drush -y en shopify_api) ‣ composer require donutdan4114/shopify:dev-master 3. Create API credentials in shopify. 4. Add them to Drupal (/admin/config/system/shopify_api) 5. Enable Shopify (drush -y en shopify) 6. Download and upload theme (/admin/config/system/ shopify/theme)