kashifkhan112 Posted September 13, 2013 Share Posted September 13, 2013 Steps: 1- First copy the class file from classes/class file name to override/classes/class file name 2- Remove the cache/class_index.php file 3 Then refresh the home page (Press CTRL + F5), now new file of class_index.php will be automatically created So customized override class file will now work 3 Link to comment Share on other sites More sharing options...
Mehta Rahil Posted December 3, 2013 Share Posted December 3, 2013 Thanks For this post ... its help me.. thanks alot Link to comment Share on other sites More sharing options...
vivek tripathi Posted January 20, 2014 Share Posted January 20, 2014 you can even override class from module in PSv1.5+ Link to comment Share on other sites More sharing options...
Roldex Posted April 7, 2014 Share Posted April 7, 2014 Hi, do you have 1.6 solution ? Seems that the instruction above work with 1.5. Link to comment Share on other sites More sharing options...
alexandre_cruz Posted April 27, 2014 Share Posted April 27, 2014 You can find more information abou overrides in PS 1.6 here: http://doc.prestashop.com/display/PS16/Overriding+default+behaviors Link to comment Share on other sites More sharing options...
Housy Posted September 7, 2015 Share Posted September 7, 2015 Hello How can you override module default PHP file behavior, for example for "cashondelivery.php"? Because if i copy this file into "override/modules/cashondelivery/cashondelivery.php" and make some changes within one function, i get fatal error below. What am i doing wrong? What is the proper way to override a specific class function for modules? Thank you and best regards, Housy Fatal error: Cannot redeclare class CashOnDelivery in /home/myusername/public_html/TESTSHOP1714/override/modules/cashondelivery/cashondelivery.php on line 147 Link to comment Share on other sites More sharing options...
Housy Posted September 7, 2015 Share Posted September 7, 2015 (edited) I renamed overrided class to something else and i don't get this error anymore. Hello How can you override module default PHP file behavior, for example for "cashondelivery.php"? Because if i copy this file into "override/modules/cashondelivery/cashondelivery.php" and make some changes within one function, i get fatal error below. What am i doing wrong? What is the proper way to override a specific class function for modules? Thank you and best regards, Housy Edited September 7, 2015 by Housy (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts