Reputation: 21
I'm trying to override a class from a module I installed. The class is located in the modules folder in MyModule/lib/MyClass.php
So what i did is create a copy of that class in override/modules/MyModule/lib/MyClass.php
and it's declared like this:
class MyClassOverride extends MyClass {
// custom code
}
I also deleted the class_index.php file.
And my changes are not applied so i really don't know what I am missing here. Is it even possible to do that ? I heard that in previous versions of prestashop you couldn't override a module class...
Anyone has an idea ?
Upvotes: 2
Views: 693
Reputation: 35
I have the same problem.
It seems that it's possible to override a php class for a module if the class is in MyModule/MyClass.php
, but it doesn't work if the class is in MyModule/lib/MyClass.php
...
Upvotes: 1