Prestashop - Stock levels export : You can not update available stock when it depends on stock

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) enabled when those products were created, so Prestashop prevent any stock level update through API.
This article will explain how to solve this error.


Process

In order to solve this problem, follow these steps :

First, you need to disable the "depends_on_stock" tag that has been set on products created while Prestashop advanced stock management system was enabled.
This will let Prestashop know that these products do not relies on advnaced stock management anymore, making stock levels update via Prestashop API work again.

To disable the "depends_on_stock" tag for all products at once, run the following SQL request in your Prestashop database :
UPDATE psstock_available SET depends_on_stock = 0

This will disable the advanced stock management for all products.

    Unlock your online store's potential

    Whatever your e-commerce business, discover how to streamline your operations and boost your business growth with Boostmyshop.