PHPackages                             dynamic/silverstripe-shopify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. dynamic/silverstripe-shopify

ActiveSilverstripe-vendormodule[Framework](/categories/framework)

dynamic/silverstripe-shopify
============================

A Shopify Store module for Silverstripe

1.4.0(1y ago)25243[15 issues](https://github.com/dynamic/silverstripe-shopify/issues)[4 PRs](https://github.com/dynamic/silverstripe-shopify/pulls)BSD-3-ClausePHPPHP &gt;=7.4 || &gt;=8.0CI failing

Since Feb 11Pushed 1y ago5 watchersCompare

[ Source](https://github.com/dynamic/silverstripe-shopify)[ Packagist](https://packagist.org/packages/dynamic/silverstripe-shopify)[ RSS](/packages/dynamic-silverstripe-shopify/feed)WikiDiscussions 1 Synced 1mo ago

READMEChangelog (9)Dependencies (6)Versions (14)Used By (0)

SilverStripe Shopify
====================

[](#silverstripe-shopify)

A Shopify Store module for Silverstripe.

[![CI](https://github.com/dynamic/silverstripe-shopify/workflows/CI/badge.svg)](https://github.com/dynamic/silverstripe-shopify/workflows/CI/badge.svg)[![codecov](https://camo.githubusercontent.com/369df438ecfcf5d7905a221cefa09b3443ee5a90e95bfa9b799d48633f9b9661/68747470733a2f2f636f6465636f762e696f2f67682f64796e616d69632f73696c7665727374726970652d73686f706966792f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d38714431474262787a56)](https://codecov.io/gh/dynamic/silverstripe-shopify)

[![Latest Stable Version](https://camo.githubusercontent.com/320fa344a012961cad18c8599f95fda6d0c958c0e42004046551fb3b76ec4126/68747470733a2f2f706f7365722e707567782e6f72672f64796e616d69632f73696c7665727374726970652d73686f706966792f762f737461626c65)](https://packagist.org/packages/dynamic/silverstripe-shopify)[![Total Downloads](https://camo.githubusercontent.com/79f69db64b2e00ff6a8d94f3e11d724cfd4bcba02dd148e07526b56921dac61c/68747470733a2f2f706f7365722e707567782e6f72672f64796e616d69632f73696c7665727374726970652d73686f706966792f646f776e6c6f616473)](https://packagist.org/packages/dynamic/silverstripe-shopify)[![Latest Unstable Version](https://camo.githubusercontent.com/cc8e0b1177619c68b6637f678a45198d10e07809d03684fa5eea6107b4ef5764/68747470733a2f2f706f7365722e707567782e6f72672f64796e616d69632f73696c7665727374726970652d73686f706966792f762f756e737461626c65)](https://packagist.org/packages/dynamic/silverstripe-shopify)[![License](https://camo.githubusercontent.com/6129b21c3f239d681c8971fce93afe022d37e7e239af574c16389bbf3e35e302/68747470733a2f2f706f7365722e707567782e6f72672f64796e616d69632f73696c7665727374726970652d73686f706966792f6c6963656e7365)](https://packagist.org/packages/dynamic/silverstripe-shopify)

Requirements
------------

[](#requirements)

- silverstripe/recipe-cms ^4.11
- bramdeleeuw/silverstripe-schema ^2.0
- littlegiant/silverstripe-catalogmanager ^5.2
- osiset/basic-shopify-api ^10.0
- symbiote/silverstripe-gridfieldextensions ^3.0

Installation
------------

[](#installation)

```
composer require dynamic/silverstripe-shopify

```

note - due to an issue with v10.0.6 of `osiset/basic-shopify-api`, we recommend requiring version 10.0.5 of `osiset/basic-shopify-api` if you're running PHP 7.

License
-------

[](#license)

See [License](license.md)

Overview
--------

[](#overview)

Silverstripe Shopify allows you to create a headless Shopify store using Silverstripe CMS. Products and collections are imported from Shopify, and created as pages in the CMS. The Shopify Buy Button is used to purchase products via the Shopify cart and checkout.

Setup
-----

[](#setup)

### Create a private app

[](#create-a-private-app)

First, ensure that [private apps are enabled](https://help.shopify.com/en/manual/apps/private-apps) in your Shopify Store (this is false by default).

In your Shopify Admin, click `Apps` from the left column navigation. Once the page loads, scroll to the bottom and click on the link in the following line:

`Working with a developer on your shop? Manage private apps`

If no private apps exist, click `Create new private app`. Otherwise, click on the link to the existing private app you'd like to use for your Silverstripe website.

### Obtaining API Keys and Setting Permissions

[](#obtaining-api-keys-and-setting-permissions)

#### Admin API

[](#admin-api)

In the Admin API section, set the following permissions to `Read Access`

- Customers
- Orders
- Product Listings
- Products

All other permissions are optional and are not required for Silverstripe Shopify.

Copy the following keys to the correspoding variables in your config:

- API key &gt; `api_key`
- Password &gt; `api_password`
- Shared Secret &gt; `shared_secret`

#### Storefront API

[](#storefront-api)

In the Storefront API section, check

- `Allow this app to access your storefront data using the Storefront API`

Check the following permission boxes to enable the access required by Silverstripe Shopify:

- `Read products, variants and collections`
- `Read product tags`
- `Read inventory of products and their variants`
- `Read and modify customer details`
- `Read customer tags`
- `Read and modify checkouts`

All other permissions are optional and are not required for Silverstripe Shopify.

Copy the following key to the corresponding variable in your config:

- Storefront access token &gt; `storefront_access_token`

### Basic configuration

[](#basic-configuration)

```
Dynamic\Shopify\Client\ShopifyClient:
  api_key: 'YOUR_API_KEY'
  api_password: 'YOUR_API_PASSWORD'
  shared_secret: 'YOUR_API_SHARED_SECRET'
  storefront_access_token: 'YOUR_ACCESS_TOKEN' # for buy button
  shopify_domain: 'YOUR_SHOPIFY_DOMAIN' # mydomain.myshopify.com
  custom_domain: 'YOUR_CUSTOM_DOMAIN' # optional - checkout.example.com
```

### Using Multipass

[](#using-multipass)

```
Dynamic\Shopify\Client\ShopifyMultipass:
  multipass_secret: 'YOUR_MULTIPASS_SECRET'
```

### Importing products

[](#importing-products)

Once the basic configuration above is setup, you can import Shopify products and collections via CLI using the ShopifyImportTask:

```
vendor/bin/sake dev/tasks/ShopifyImportTask
```

or by running the task in the browser at `/dev/tasks/ShopifyImportTask`

Usage
-----

[](#usage)

### CMS

[](#cms)

Products and collections are created as pages in the CMS. Products that belong to collections are automatically set as a child page of that collection in the site tree. If a product belongs to multiple collections, the ShopifyProduct page is created under the first listed collection, and subsequent collections will list a VirtualPage of the product.

All products and collections that are available in the private app sales channel will be imported.

Shopify related pages are set as draft or published based on the status set in Shopify. For products, if the product is set to Active in Shopify, it will be published in Silverstripe.

The module creates a CatalogPageAdmin to manage Shopify records via a ModelAdmin, rather than only in the site tree.

The ShopifyProduct page also implements product schema from schema.org. This provides more information to be displayed in search results for google and other search engines.

Theme
-----

[](#theme)

### Cart Include

[](#cart-include)

In your top-level Page.ss template, include the following just before the `` tag:

```

```

#### Cart Configuration Options

[](#cart-configuration-options)

To disable cart notes:

```
PageController:
  showNote: false
```

Setting notes character limit (when notes is enabled):

```
PageController:
  noteLimit: 123
```

**Note:** For specific configuration by page type, you can set the `showNote` and `noteLimit` values per controller class.

You can also override the default cart settings via an Extension Hook `updateCartOptions` in the `getCartOptions()` function in `ShopifyExtension.php`.

```
public function updateCartOptions(&$config)
{
    $config['cart'] = [
        'popup' => 1,
    ];
}

```

### Display Buy Button

[](#display-buy-button)

Out of the box, there are 3 includes to display different variations of the Shopify Buy Button:

- `BuyButton` - just a simple add to cart button with no other product info
- `BuyForm` - a typical add to cart form, ideal for a ShopifyProduct page
- `BuyOverlay` - an add to cart button that opens an overlay containing product info from Shopify

To display the Buy Button, just include one of the files above in your template.

#### Buy Button Configuration Options

[](#buy-button-configuration-options)

The default settings for buy buttons in the module disables the iframe option, and strips out most of the buy button content and stylings. The includes above are instead intended to be used with the images and title imported from Shopify into the database, and with iframes disabled it enables complete control over the style of the buy button.

However, you can override the default settings for each Buy Button type above via Extension Hooks in `ShopifyProduct.php`.

- `getButtonOptions()` has `updateButtonOptions(&$buttonOptions)`
- `getFormOptions()` has `updateFormOptions(&$formOptions)`
- `getOverlayOptions()` has `updateOverlayOptions(&$overlayOptions)`

```
public function updateButtonOptions(&$buttonOptions)
{
    $buttonOptions['product'] = [
        'iframe' => true,
        'contents' => [
            'title' => true,
            'variantTitle' => false,
            'price' => true,
            'description' => true,
            'quantity' => false,
            'img' => true,
        ],
        'width' => '100%',
        'styles' => [
            'button' => [
                'color' => '#ffffff',
                'background-color' => '#279989',
                ':hover' => [
                    'color' => '#ffffff',
                    'background-color' => '#C5E86C',
                ],
            ],
        ]
    ];
}

```

Advanced
--------

[](#advanced)

### Product impression tracking

[](#product-impression-tracking)

Product impressions can be tracked by adding data attributes to html tags rendered with products. `data-sku` is the only required data attribute, but `data-title`, `data-category`, and `data-vendor` can also be added.

```

```

Maintainers
-----------

[](#maintainers)

- [Dynamic](http://www.dynamicagency.com) ()

Credits
-------

[](#credits)

Inspired by previous work done by [xddesigners](https://github.com/xddesigners).

Bugtracker
----------

[](#bugtracker)

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

- Create a new issue
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution
----------------------------

[](#development-and-contribution)

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 51.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~136 days

Recently: every ~130 days

Total

12

Last Release

418d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/867942?v=4)[Dynamic](/maintainers/dynamic)[@dynamic](https://github.com/dynamic)

---

Top Contributors

[![jsirish](https://avatars.githubusercontent.com/u/1163643?v=4)](https://github.com/jsirish "jsirish (56 commits)")[![mak001](https://avatars.githubusercontent.com/u/1750550?v=4)](https://github.com/mak001 "mak001 (26 commits)")[![muskie9](https://avatars.githubusercontent.com/u/870751?v=4)](https://github.com/muskie9 "muskie9 (25 commits)")[![korthjp17](https://avatars.githubusercontent.com/u/3858661?v=4)](https://github.com/korthjp17 "korthjp17 (1 commits)")

---

Tags

ecommercehacktoberfestshopifysilverstripesilverstripe-modulesilverstripecmsecommerceshopifybuybutton

### Embed Badge

![Health badge](/badges/dynamic-silverstripe-shopify/health.svg)

```
[![Health](https://phpackages.com/badges/dynamic-silverstripe-shopify/health.svg)](https://phpackages.com/packages/dynamic-silverstripe-shopify)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[thelia/thelia

Thelia is an ecommerce CMS.

8715.1k](/packages/thelia-thelia)[cetera-labs/cetera-cms

Fastsite CMS — innovative content management and eCommerce-product, based at 10-years experience and agile development methodologies. Fastsite CMS helps to start your internet sales in 5 minutes.

165.0k1](/packages/cetera-labs-cetera-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
