Reputation: 116
I override the Shop class and i put in mymodule/override/classes
class Shop extends ShopCore
{
public function __construct($id = null, $id_lang = null, $id_shop = null)
{
parent::__construct($id, $id_lang, $id_shop);
}
public static function someMethod()
{
}
}
When i call someMethod
in front controller i get the error :
Call to undefined method Shop::someMethod()
Its possible in prestashop to add a static method to override class?
Thanks.
Upvotes: 0
Views: 599
Reputation: 116
The installation of the module should copy the /mymodule/override/classes/Shop.php to /override/classes but it doesnt.
The correct location of the override is in /mymodule/override/classes/shop/Shop.php instead of /mymodule/override/classes/Shop.php
Now the installation of module copies the file to the correct directory.
Upvotes: 1