Usage#
Configure Shopify Web Shop#
First you must create a new custom app for your Shopify store with, as a minimum, the Admin API access scopes:
Assigned fulfillment:
write_assigned_fulfillment_ordersFulfillment services:
write_fulfillmentsInventory:
write_inventoryLocations:
read_locationsMerchant-managed fulfillment orders:
write_merchant_managed_fulfillment_ordersOrders:
write_ordersProduct listings:
write_product_listingsProducts:
write_products
You also need to copy the Admin API access token that is generated when installing the app.
When setting the Web Shop’s type to “Shopify”, you
must fill in the Shop URL (e.g.
https://<store-name>.myshopify.com), the Access Token with the
copied one and select the Version.
Note
At least one Payment Journal is needed to book the transactions.
Different scheduled tasks are responsible for uploading products and inventories and fetching and updating orders as Sales.
You can also register a JSON webhook from the Notifications settings for each order event to get updates when they happen.
Setup Shopify Variants#
To create variants of a product in Shopify, you need to set an Attribute Set on the Product Template. This Attribute Set must have at least one of the three Shopify Options selected with an Attribute.
Note
For each variant of a product, the value of the Shopify Options attributes must be unique.
Admin Links#
The module provides links that offer direct access to the corresponding Tryton record based on the Shopify identifier. You can use these links to create an admin link extension.
GET/<database_name>/web_shop_shopify/products/<product id>
GET/<database_name>/web_shop_shopify/products/<product id>/variants/<variant id>
GET/<database_name>/web_shop_shopify/customers/<customer id>
GET/<database_name>/web_shop_shopify/orders/<order id>