3

I have one component named com_vip(which was developed by me) and am using virtuemart too. Problem is that i have to modify site/components/com_virtuemart/controller/user.php file just because of my newly created component(com_vip). But i think it is not better technique to modify core files of virtuemart. That's why i would like to override this (user.php) controller and would like to use in my component(com_vip).

How can i override this controller (com_virtuemart/user.php) ?

Umesh
  • 193
  • 1
  • 10

1 Answers1

0

You can use this post as reference: https://joomla.stackexchange.com/a/7630/9253

Also, according official Joomla documentation, the right way to override the controllers, is writing the new files in template's folder:

Using a templating method

Override Base Component Controller

TEMPLATE_NAME/code/COMPONENT_NAME/CONTROLLER.php

Override Another Component Controller

TEMPLATE_NAME/code/COMPONENT_NAME/controllers/CONTROLLER_NAME.php

Override Models

TEMPLATE_NAME/code/COMPONENT_NAME/models/MODEL_NAME.php

Override Views

TEMPLATE_NAME/code/COMPONENT_NAME/views/VIEW_NAME/VIEW_NAME(.FORMAT).php 
Community
  • 1
  • 1