davidhirtz / yii2-shopify
Shopify module for admin panel based on Yii 2.0 framework
Package info
github.com/davidhirtz/yii2-shopify
Type:yii2-extension
pkg:composer/davidhirtz/yii2-shopify
Requires
- php: ^8.3
- davidhirtz/yii2-skeleton: ^2.5
- moneyphp/money: ^4.7
Requires (Dev)
- codeception/codeception: ^5.2
- codeception/module-asserts: ^3.1
- codeception/module-filesystem: ^3.0
- codeception/module-phpbrowser: ^3.0
- codeception/module-yii2: ^2.0
- codeception/specify: ^2.0
- codeception/verify: ^3.0
- rector/rector: ^2.1
- symplify/easy-coding-standard: ^12.5
- yiisoft/yii2-debug: ^2.1
This package is auto-updated.
Last update: 2026-06-05 06:58:41 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_inventoryread_products
To use the Storefront API (shopify.js), activate the Storefront API integration with the following permissions:
unauthenticated_write_checkoutsunauthenticated_read_checkoutsunauthenticated_write_customersunauthenticated_read_customersunauthenticated_read_product_listingsunauthenticated_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.