PrestaShop Developer Conference
PrestaShop Developer Conference
November 6, 2024
Let's talk code, commerce and open source.

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 actionProductPriceCalculation

Informations

Product Price Calculation This hook is called into the priceCalculation method to be able to override the price calculatio
Hook actionProductPriceCalculation
Locations
BO
Type action
Origin core
Aliases

Located in

Origin File
core classes/Product.php

Call of the Hook in the origin file

Hook::exec('actionProductPriceCalculation', [
    'id_shop' => $id_shop,
    'id_product' => $id_product,
    'id_product_attribute' => $id_product_attribute,
    'id_customization' => $id_customization,
    'id_country' => $id_country,
    'id_state' => $id_state,
    'zip_code' => $zipcode,
    'id_currency' => $id_currency,
    'id_group' => $id_group,
    'id_cart' => $id_cart,
    'id_customer' => $id_customer,
    'use_customer_price' => $use_customer_price,
    'quantity' => $quantity,
    'real_quantity' => $real_quantity,
    'use_tax' => $use_tax,
    'decimals' => $decimals,
    'only_reduc' => $only_reduc,
    'use_reduc' => $use_reduc,
    'with_ecotax' => $with_ecotax,
    'specific_price' => &$specific_price,
    'use_group_reduction' => $use_group_reduction,
    'address' => $address,
    'context' => $context,
    'specific_price_reduction' => &$specific_price_reduction,
    'price' => &$price,
]);