Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

Hook actionUpdateQuantity

Informations

Quantity update Quantity is updated only when a customer effectively places their order
Hook actionUpdateQuantity
Locations
FO
Type action
Origin core
Aliases [updateQuantity]

Located in

Origin File
core classes/stock/StockAvailable.php

Parameters details

    <?php
    array(
      'id_product' => (int) Product ID,
      'id_product_attribute' => (int) Product attribute ID,
      'quantity' => (int) New product quantity
    );

Call of the Hook in the origin file

Hook::exec(
                        'actionUpdateQuantity',
                                    [
                                        'id_product' => $id_product,
                                        'id_product_attribute' => 0,
                                        'quantity' => $product_quantity,
                                        'id_shop' => $id_shop,
                                    ]
                    )