With the PrestaShop connection, Stockhub fetches the orders from your webshop. Stockhub sends the stock and the track & trace back to PrestaShop. Stockhub uses the PrestaShop webservice for this. In this article you first create a webservice key in PrestaShop and then the connection in Stockhub.
What you need
- Access to the back office of your PrestaShop webshop.
- The address of your webshop, for example https://www.yourwebshop.com.
Creating a webservice key in PrestaShop
- Log in to the back office of your webshop.
- Go to Advanced Parameters > Webservice.
- If Enable PrestaShop's webservice is still set to No, set it to Yes and save.
- Click Add new webservice key.
- Under Key, click Generate.
- Under Key description, enter a recognisable name, for example Stockhub.
- Turn Status on.
- Under Permissions, give at least these rights:
- View (GET): addresses, combinations, countries, customers, order_carriers, order_details, orders, products and stock_availables.
- Modify (PUT): order_carriers, orders and stock_availables.
- Add (POST): order_histories.
- If you also see a column for PATCH, tick it for orders.
- Click Save and copy the key.
More information is in the PrestaShop documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/creating-access/
Creating the connection in Stockhub
- In the menu, go to Integrations > Sales channels.
- On the Sales channels tab, click New sales channel. The Add sales channel window opens.
- Choose PrestaShop.
- Fill in the fields:
- Description: a recognisable name for the connection, for example the name of your webshop.
- Shipping name: the name on the shipping label. If you leave it empty, Stockhub uses your company name.
- Access token: the webservice key from PrestaShop.
- Shop: the address of your webshop with https://, for example https://www.yourwebshop.com. Do not add /api; Stockhub adds that itself.
- Click Test connection. If you see Connected, Stockhub can reach your webshop. If you see Connection failed, check the address, the key and the rights of the key.
- Click Next.
- Choose which data Stockhub exchanges. Set each setting to Active or Inactive:
- Import orders: fetch orders from PrestaShop.
- Update existing product info and Import new products: you only see these if the fulfilment company has turned them on.
- Update stock to channel: send the stock from Stockhub to PrestaShop.
- Sync a virtual stock amount: Stockhub adds this amount to the stock it sends to PrestaShop.
- Send track & trace email: you only see this if the fulfilment company has turned it on.
- Click Save.
You then see the message Pending sales channel approval. The channel stays in draft status until the fulfilment company activates it. Only then do the synchronisations start.
How the PrestaShop connection works
- Stockhub fetches orders that were created after the previous synchronisation and have the status Payment accepted or Processing in progress.
- Stockhub recognises products by the reference and the EAN-13 barcode from PrestaShop. So give your products and combinations a reference and an EAN-13.
- If Process orders (with tracking) is on, Stockhub adds the tracking number to the order and sets the status to Shipped.
The Details tab of a PrestaShop channel shows no connection details. If you want to change the key or the address, delete the channel and create it again.
See also Verkoopkanalen beheren for all settings, the orders of the channel and deleting a channel.
Comments
0 comments
Please sign in to leave a comment.