Files
tryton/modules/web_shop_shopify/doc/usage.rst
T

109 lines
3.5 KiB
ReStructuredText

*****
Usage
*****
.. _Configure Shopify Web Shop:
Configure Shopify Web Shop
==========================
First you must create a new `custom app
<https://help.shopify.com/en/manual/apps/app-types>`_ for your Shopify store
with, as a minimum, the :guilabel:`Admin API access scopes`:
* :guilabel:`Assigned fulfillment`: ``write_assigned_fulfillment_orders``
* :guilabel:`Customers`: ``read_customer``
* :guilabel:`Fulfillment services`: ``write_fulfillments``
* :guilabel:`Inventory`: ``write_inventory``
* :guilabel:`Locations`: ``read_locations``
* :guilabel:`Merchant-managed fulfillment orders`:
``write_merchant_managed_fulfillment_orders``
* :guilabel:`Orders`: ``write_orders``
* :guilabel:`Payment terms`: ``read_payment_terms``
* :guilabel:`Product listings`: ``write_product_listings``
* :guilabel:`Products`: ``write_products``
* :guilabel:`Shop locales`: ``read_locales``
You also need to copy the :guilabel:`Admin API access token` that is generated
when installing the app.
When setting the :doc:`Web Shop <web_shop:index>`'s type to "Shopify", you
must fill in the :guilabel:`Shop URL` (e.g.
``https://<store-name>.myshopify.com``), the :guilabel:`Access Token` with the
copied one and select the :guilabel:`Version`.
.. note::
At least one `Payment Journal <model-web.shop.shopify_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 <sale:model-sale.sale>`.
You can also register a :abbr:`JSON (JavaScript Object Notation)` `webhook
<https://shopify.dev/docs/apps/build/webhooks>`_ from the
:guilabel:`Notifications` settings for each order event to get updates when
they happen.
.. _Setup Shopify Variants:
Setup Shopify Variants
======================
To create variants of a product in Shopify, you need to set an `Attribute
Set <product_attribute:model-product.attribute.set>` on the `Product Template
<product:model-product.template>`.
This *Attribute Set* must have at least one of the three :guilabel:`Shopify
Options` selected with an `Attribute
<product_attribute:model-product.attribute>`.
.. note::
For each variant of a product, the value of the :guilabel:`Shopify Options`
attributes must be unique.
.. _Admin links:
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
<https://shopify.dev/docs/apps/build/admin/admin-links>`_.
- ``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:
Setup Gift Cards
================
To use gift cards on Shopify, you must activate the :doc:`*Sale Gift Card
Module* <sale_gift_card:index>`.
`Products <sale_gift_card:concept-product>` defined as gift cards are also
registered as such on Shopify.
When a gift card is sold on Shopify, no `gift card
<sale_gift_card:model-sale.gift_card>` is created by the corresponding `sale
<sale_gift_card:model-sale.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
<account_payment:model-account.payment.journal>`.