Download the PHP package swordfox/silverstripe-shopify without Composer
On this page you can find all versions of the php package swordfox/silverstripe-shopify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swordfox/silverstripe-shopify
More information about swordfox/silverstripe-shopify
Files in swordfox/silverstripe-shopify
Package silverstripe-shopify
Short Description Import Shopify products into your Silverstripe site, implements the buy button sdk to create a cart and checkout
License BSD-3-Clause
Informations about the package silverstripe-shopify
Simple shopify module for SilverStripe sites
This module is for users that want to implement there shopify products into a SilverStripe storefront.
Based on xddesigners/silverstripe-shopify - but completely reworked.
- Collections are added / removed on a per product basis.
- Import task with options: default, productsonly & productsall (See 'Set up import script' below).
- Buy Button scripts included in templates to make it easy to modify & implement in your own way.
- Versioning removed.
- Images are not imported from Shopify, instead we use Images.weserv.nl - An image cache & resize service.
- Optional: Webhooks from Shopify to keep your store updated without having to rely on the import task which can be resource consuming (See 'Set up webhooks' below).
- Optional: delete_on_shopify for shops that want to delete their products from Shopify after they have been sold, useful for shops that have one-off products (See 'Set up delete_on_shopify' below).
It makes use of the Shopify Buy Button to create the cart and checkout interface.
You'll end up with a import job that fetches all the products and variants and stores them as Product DataObject in your site.
Requirements
- SilverStripe 4.x
Installation
Install the module trough composer and configure the api keys.
Get up your api keys by creating a new Private App in your Shopify admin interface.
If you want to use webhooks via the API e.g. dev/tasks/Swordfox-Shopify-Task-Webhooks/create you need to ensure 'webhooks_shared_secret' is the same as 'shared_secret', however if you want to use manually added webhooks, you will need to get your webhooks shared secret from admin/settings/notifications
Config
Set up import script
You can run the import script manually trough the dev/tasks interface or set up up to run as a cron task. The default task is designed to run once per day and imports / updates the latest 50 api_limit
from admin/products.json, admin/custom_collections.json & admin/smart_collections.json.
http://example.com/dev/tasks/Swordfox-Shopify-Task-Import
or sake dev/tasks/Swordfox-Shopify-Task-Import
The productsonly task is designed to run a few times a day if webhooks are not being used, it imports the latest 50 api_limit
from admin/products.json.
http://example.com/dev/tasks/Swordfox-Shopify-Task-Import/productsonly
or sake dev/tasks/Swordfox-Shopify-Task-Import/productsonly
The productsall task is designed to run on initial set up and imports all from admin/products.json, admin/custom_collections.json & admin/smart_collections.json.
http://example.com/dev/tasks/Swordfox-Shopify-Task-Import/productsall
or sake dev/tasks/Swordfox-Shopify-Task-Import/productsall
Set up webhooks
The following webhooks are supported and can be created automatically via the API using http://example.com/dev/tasks/Swordfox-Shopify-Task-Webhooks/create
or sake dev/tasks/Swordfox-Shopify-Task-Webhooks/create
- Collection creation https://www.example.com/shop-page/webhook/update/collection
- Collection deletion https://www.example.com/shop-page/webhook/delete/collection
- Collection update https://www.example.com/shop-page/webhook/update/collection
- Inventory level connect https://www.example.com/shop-page/webhook/update/inventory
- Inventory level update https://www.example.com/shop-page/webhook/update/inventory
- Product creation https://www.example.com/shop-page/webhook/update/product
- Product deletion https://www.example.com/shop-page/webhook/delete/product
- Product update https://www.example.com/shop-page/webhook/update/product
Set up delete_on_shopify
You can run the delete on Shopify script manually trough the dev/tasks interface or set up up to run as a cron task. This task is useful for stores that sell one-off products and want to delete the products off Shopify after a certain period of time delete_on_shopify_after: '+3 days'
which is set on ShopifyProduct::DeleteOnShopify during the import tasks if delete_on_shopify: true
http://example.com/dev/tasks/Swordfox-Shopify-Task-DeleteOnShopify
or sake dev/tasks/Swordfox-Shopify-Task-DeleteOnShopify
All versions of silverstripe-shopify with dependencies
silverstripe/cms Version 4.x
composer/installers Version *
guzzlehttp/guzzle Version *
symbiote/silverstripe-gridfieldextensions Version ^3