Overriding Controllers

  • Posts: 82
  • Thank you received: 1
9 years 8 months ago #195126

-- 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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #195132

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.046 seconds
Powered by Kunena Forum