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_ordersCustomers:
read_customerFulfillment services:
write_fulfillmentsInventory:
write_inventoryLocations:
read_locationsMerchant-managed fulfillment orders:
write_merchant_managed_fulfillment_ordersOrders:
write_ordersPayment terms:
read_payment_termsProduct listings:
write_product_listingsProducts:
write_productsShop locales:
read_locales
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>
Setup Gift Cards#
To use gift cards on Shopify, you must activate the *Sale Gift Card
Module*.
Products defined as gift cards are also
registered as such on Shopify.
When a gift card is sold on Shopify, no gift card is created by the corresponding sale order as these are managed by Shopify.
When a gift card is redeemed on Shopify, it appears as a payment from the
gift_card gateway.
It is recommended that you use this criteria to setup a different payment journal.