In this entry I describe how to override PrestaShop controller, class or main class of the module.
How to override PrestaShop controller: /controllers/front/AddressController.php (this is just an example of the file)
Create file: /override/controllers/front/AddressController.php with content:
1 2 3 4 5 6 7 8 |
<?php class AddressController extends AddressControllerCore { // your code here } |
How to override PrestaShop class: /classes/Address.php (this is just an example of the file)
Create file: /override/classes/Address.php with content:
1 2 3 4 5 6 7 8 |
<?php class Address extends AddressCore { // your code here } |
How to override main class of the module: /modules/bankwire/bankwire.php (this is just an example of the file)
Create file: /override/modules/bankwire/bankwire.php with content:
1 2 3 4 5 6 7 8 |
<?php class BankWireOverride extends BankWire { // your code here } |
Pretty nice post. I simply stumbled upon your blog and wanted to say that
I have really enjoyed browsing your blog posts. After all I will be subscribing on your rss feed and I’m hoping you
write once more very soon!
this code is not working now in prestashop 1.7.4
Please describe what’s not working and what do you want to override.