davidhirtz/yii2-shopify

Shopify module for admin panel based on Yii 2.0 framework

Maintainers

Package info

github.com/davidhirtz/yii2-shopify

Homepage

Type:yii2-extension

pkg:composer/davidhirtz/yii2-shopify

Statistics

Installs: 163

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

2.3.0 2026-06-01 15:54 UTC

README

Shopify backend based on the Yii 2 extension yii2-skeleton.

Shopify setup

First, a custom app needs to be created in the Shopify admin under Apps > Develop apps > Build apps in Dev Dashboard > Create app > Start from Dev Dashboard. Once completed, the app needs to be configured to allow at least these Admin API access scopes:

  • read_inventory
  • read_products

To use the Storefront API (shopify.js), activate the Storefront API integration with the following permissions:

  • unauthenticated_write_checkouts
  • unauthenticated_read_checkouts
  • unauthenticated_write_customers
  • unauthenticated_read_customers
  • unauthenticated_read_product_listings
  • unauthenticated_read_product_inventory

Here is the complete comma-separated string for the configuration:

read_inventory,read_products,unauthenticated_write_checkouts,unauthenticated_read_checkouts,unauthenticated_write_customers,unauthenticated_read_customers,unauthenticated_read_product_inventory,unauthenticated_read_product_listings

Credentials

Following Shopify credentials need to be either added to config/params.php or directly set as properties in davidhirtz\yii2\shopify\Module. They can be found in app settings in the Shopify dev dashboard.

shopifyShopName                 The shopify name of your shop (https://NAME.myshopify.com/)
shopifyShopDomain               Your custom shop URL (optional)
shopifyApiKey                   Shopify App Client ID
shopifyApiSecret                Shopify App Secret

Additionally, a shopifyAccessToken is needed, but can be autogenerated via the GraphQL API since 2026, so you can leave it empty for new shops. To use the Storefront API, you also need to set the shopifyStorefrontAccessToken which can be generated with the following command:

php yii shopify/storefront-access-token

Webhooks

After the configuration is completed, go to Products > Webhooks (the user permission Manage Shopify webhooks is required) and click on Install Webhooks to register the necessary webhooks which sync the Shopify admin with the website.

Products

Products are synced automatically on change in Shopify admin. If products were already created before the webhooks were registered or there seems to be an issue with the sync, click on Reload Products to load all products from Shopify.

Shopify Theme

To disable the "Online shop" app in the backend, you can create a minimal theme or upload this package and configure the storefront_hostname in Theme settings > Storefront.