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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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")

Capture d’écran 2023-05-15 à 16 43 12

kirby-shopify screen-3

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

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
vlucas/phpdotenv Version ^2.4
phpclassic/php-shopify Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tristantbg/kirby-shopify contains the following files

Loading the files please wait ....