Answer the question
In order to leave comments, you need to log in
Why doesn't the function in Event opencart work?
I want to make a module so that you can change the type of categories between custom and standard, for this I try to connect my catalog controller through an event.
a similar option works for the View, but is ignored for the controller,
while the event is connected, and if I type some rubbish, I will see an error on the category page
in the Event table:
trigger : catalog/controller/product/category/before
action : event/custom_cat_event/before_cat
file code:
class ControllerEventCustomCatEvent extends Controller {
public function before_cat(&$route, &$data, &$output){
$route = str_replace('category', 'custom_cat_controller', $route);
}
}
please save
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question