Skip to main content

Overriding Controllers

More
11 years 6 months ago #195126 by jmbgreen
-- HikaShop version -- : any version
-- Joomla version -- : 3.4
-- PHP version -- : 5.4

Hello,

I have been called by many customers to fix problems that occurred after they updated their hikashop. The problems are that they have customized hikashop versions, with hacks on the controllers or models.

To fight with this, I am looking for any suggestions on how to overrides controllers or models in hikashop.
Is there any good way to achieve this ?

In my current specific case, I only need to override the _doLogin method of the checkout controller.
A subclass of checkoutController would work fine - but how?

Or would that possible with a custom plugin?

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #195132 by Jerome
Replied by Jerome on topic Overriding Controllers
Hi,

You can override a class by creating an override file
www.hikashop.com/forum/product-category-...atermark.html#184987

To override a controller, you need a system plugin which will define the controller class ; so HikaShop will find the class and will not load the original controller file.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.191 seconds
Powered by Kunena Forum