Download the PHP package tristantbg/kirby-shopify without Composer
On this page you can find all versions of the php package tristantbg/kirby-shopify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package kirby-shopify
Kirby 3 Shopify Plugin
Installation
Download
Download and copy this repository to /site/plugins/kirby-shopify
.
Git submodule
Composer
Setup
Set your .env
file inside the plugin folder using the .env.example
one with your Storefront credentials.
Add manually a page called products
with the template shopify.products
in the content folder. (like shown in "example")
Add manually a page called collections
with the template shopify.collections
in the content folder. (like shown in "example")
Make Shopify update your Kirby products list
Set a Shopify webhook for "Product create", "Product update", "Product delete" with value:
Set a Shopify webhook for "Collection create", "Collection update", "Collection delete" with value:
At the end of https://xxx.myshopify.com/admin/settings/notifications
(The webhook is verified for security reasons: https://help.shopify.com/en/api/getting-started/webhooks#verify-webhook)
Add the webhook HMAC signed key to your .env
file under the SHOPIFY_APP_SECRET
key
Frontend
An easy way would be to use Shopify Buy Button on top of Kirby to take care of the cart. You can either display everything with it or choose to use Kirby to display the element more customly.
Shop JS script:
shopify.product
template:
Resize thumbnails
You can resize thumbnails directly from Shopify CDN using this field method and the Shopify img_url
attribute.
https://help.shopify.com/en/themes/liquid/filters/url-filters#img_url
The toProduct() method
When you try to access a product through a Collection, you need to use the $productInCollection->toProduct()
method in order to get the original product page which is in the page('products')
. Because you only want one product page with custom fields.
Options
WIP
API
License
MIT
Credits
All versions of kirby-shopify with dependencies
vlucas/phpdotenv Version ^2.4
phpclassic/php-shopify Version ^1.0