Gestionnaire de Module
Configure
Auto update on backorder status
Auto update on backorder status
Automatically update status of orders “On backorder” when missing products of the order are back in stock.
Each time the quantity of a product (or combination) is updated from a negative value to a positive value (or null), this module will go through the orders with "On Backorder" status and check if all products of orders are now in stock.
If yes then these orders will return to their initial status or the status you have chosen (payment accepted, waiting for payment if it is not paid,...)
Backorder statuses check
En attente de réapprovisionnement (non payé) → Before last order status
En attente de réapprovisionnement (payé) → Paiement accepté
Compatibility with Prestashop API/Webservice (facultative)
The file
/classes/webservice/WebserviceRequest.php
has not been manually edited to make the module work when updating stock via API request.
If you use, or intend to use a third-party service that can update products quantities via API requests, just add the following code (keeping comments) on
line 1633
right after
if ($result) {
:
// inAzerty autoupdateonbackorderstatus
if (get_class($object) == 'StockAvailable') {
Hook::exec('actionUpdateQuantity',
array(
'id_product' => $object->id_product,
'id_product_attribute' => $object->id_product_attribute,
'quantity' => $object->quantity,
'id_shop' => $object->id_shop
)
);
}
// end inAzerty autoupdateonbackorderstatus