Prestashop Override Class !!top!! Site
Use overrides only as a last resort. If you must use them, create a dedicated module that programmatically writes the override files during installation, rather than committing them directly – this improves upgrade management. Report prepared for: PrestaShop Developers & Technical Architects Document version: 1.0 Last updated: 2025
<?php // /override/classes/Product.php class Product extends ProductCore prestashop override class
| Original Core Path | Override Path | Class Name (Override) | |-------------------|---------------|------------------------| | /classes/Cart.php | /override/classes/Cart.php | class Cart extends CartCore | | /controllers/front/OrderController.php | /override/controllers/front/OrderController.php | class OrderController extends OrderControllerCore | | /core/Foundation/IoC/Container.php | /override/core/Foundation/IoC/Container.php | class Container extends ContainerCore | Use overrides only as a last resort
return $price;
Create override file: /override/classes/Product.php $id_product_attribute = null
public static function getProductPrice( $id_product, $quantity, $id_product_attribute = null, $id_customization = null, $id_cart = null, $only_reduc = false, $use_tax = true, $id_shop = null, $use_reduc = true, $with_eco_tax = false ) // Call original method first $price = parent::getProductPrice( $id_product, $quantity, $id_product_attribute, $id_customization, $id_cart, $only_reduc, $use_tax, $id_shop, $use_reduc, $with_eco_tax );