Prestashop Module Override ((hot)) -
This is where come into play. What Is a Module Override? An override is a safe, core-respecting way to replace or extend the logic of an existing module without modifying its original source files.
Delete /var/cache/dev/class_index.php (and /var/cache/prod/ in production).
<?php // override/modules/customshipping/classes/CustomShippingCalculator.php class CustomShippingCalculatorOverride extends CustomShippingCalculator prestashop module override
In Back Office → Advanced Parameters → Performance → click "Clear cache". Important Naming Convention The override class name must be unique. The standard convention is:
When used correctly, overrides will save you from module vendor lock-in and let you bend PrestaShop to your exact business needs – without losing the ability to update. Have a tricky module override scenario? Share it in the comments below! This is where come into play
PrestaShop does not automatically scan new overrides. You must clear the class index.
/override/modules/customshipping/classes/CustomShippingCalculator.php Your override must extend the original class and use the same namespace. Delete /var/cache/dev/class_index
Use overrides sparingly, document them religiously, and always ask: “Could I achieve this with a hook or a custom module instead?”