[Skip to main content](#vessel-content)

#   Overriding Controllers

##

- **[jmbgreen](/forum/user/24500-jmbgreen "View jmbgreen's Profile")**
- [![jmbgreen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/24500-jmbgreen "View jmbgreen's Profile") Topic Author
- [ Offline](/forum/user/24500-jmbgreen)

Less More

- Posts: 82
- Thank you received: 1
-
-
-

11 years 7 months ago [\#195126](#195126) by [jmbgreen](/forum/user/24500-jmbgreen "View jmbgreen's Profile")  *[Overriding Controllers](/forum/31-development/875745-overriding-controllers#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 &#95;doLogin method of the checkout controller. A subclass of checkoutController would work fine - but how?  Or would that possible with a custom plugin?")* was created by *[jmbgreen](/forum/user/24500-jmbgreen "View jmbgreen's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc0NS1vdmVycmlkaW5nLWNvbnRyb2xsZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

11 years 7 months ago [\#195132](#195132) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Overriding Controllers](/forum/31-development/875745-overriding-controllers#195132 "-- 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 &#95;doLogin method of the checkout controller. A subclass of checkoutController would work fine - but how?  Or would that possible with a custom plugin?")*

Hi,

You can override a class by creating an override file
[ www.hikashop.com/forum/product-category-...atermark.html#184987](http://www.hikashop.com/forum/product-category-display/873470-watermark.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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc0NS1vdmVycmlkaW5nLWNvbnRyb2xsZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.040 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
