Prestashop - Unable to export stock : No stock available found for shop

Prestashop - Unable to export stock : No stock available found for shop

This article explains the "No stock available found for shop" error in the stock export feed for Prestashop integration

Explanations


When myFulfillment sends a stock update to Prestashop, among the product, combination and quantity, myFulfillment may also specifies the shop ID.

That depends of the settings in the Prestashop integration:



If no shop is selected, then stock are pushed without shop id.
If shops are selected, then stock are pushed for each shop

The error "No stock available found for shop" means that prestashop did not returned any stock information for the shop #

There may be 2 reasons why this is happening
1. Your magento database is corrupted and is missing stock information for some products
2. The configuration in the prestashop configuration is incorrect

How to fix ?

An easy way to check the issue it to perform an API call directly from the browser:
https://www.yourwebsite.com/api/stock_availables?ws_key=YOURAPIKEY&filter[id_product]=PRESTASHOPPRODUCTID&display=full

If the result does not contain any result it means that you have a database issue and some records are missing in prestashop table "stock_available":

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<stock_availables> </stock_availables>
</prestashop>

If there are some results displayed, we must run again the query specifying the shop ID that causes the issue:
https://www.yourwebsite.com/api/stock_availables?ws_key=YOURAPIKEY&filter[id_product]=PRESTASHOPPRODUCTID&display=full&filter[id_shop]=SHOPID&id_shop=SHOPID

If this configuration does not return any record, it means that we can not push the stock only for this shop ID.
It probably mean that prestashop shares the stock between the different shops. You can check it from prestashop admin panel, select menu advanced parameters > multishop
Then click on the shop group and check if the share stock option is enabled:


If yes, you must not select any shop in the prestashop integration to export stock to Prestashop



    • Related Articles

    • Stock export

      How works stock export Many integrations (Magento, Shopify, Hiboutik, Prestashop etc....) supports the stock export feed. This feed sends the stock available to the external system. The stock sent is calculated using several parameters : First, only ...
    • Prestashop - Stock levels export : You can not update available stock when it depends on stock

      Overview When the "Stock levels export" feed runs, it can result in the following error for some products : "You can not update available stock when it depends on stock" This is due to the fact Prestashop advanced stock management was (or is still) ...
    • Prestashop - Connect your instance to myFulfillment

      Overview Prestashop integration allows to import products, orders, suppliers from Prestashop to Connect and send shipping confirmation and stock updates to Prestashop. When you run Connect with a Prestashop website, you must keep in mind the ...
    • Stock Helper

      Stock Helper The stock helper screen has been designed to help you to optimize your products ideal & warning stock levels depending of procurement and sales history data. To reach the stock helper screen : In the stock helper grid, you will find one ...
    • Kit stock management

      Overview This article explains how Boostmyshop can manage stock level for kit products. Boostmyshop calculates the stock available for kits based on the children stock level, using the smallest quantity available among children products. Enable kit ...