eCommerce construction > How-to questions

Add a button that returns to a parent category in embedded modals

(1/1)

carrerable:
Hello, I have been trying to modify the structure of a modal to add a button that lets me navigate between the categories but I have not known how, can someone help me to Add a button that returns to a parent category in the embedded modals


AbanteCart Version 1.2.16

abolabo:

--- Quote from: carrerable on March 08, 2021, 03:42:30 PM ---Hello, I have been trying to modify the structure of a modal to add a button that lets me navigate between the categories but I have not known how, can someone help me to Add a button that returns to a parent category in the embedded modals


AbanteCart Version 1.2.16

--- End quote ---

hi,
You can follow this steps:

1. determine what tpl used for modal (i guess pages/product/category.tpl)
2. write a hook that looking for embed get parameter from request. (see &embed_mode =1 OR $this->config->get('embed_mode') inside controller pages/product/category). You can use it to determine when embed mode is on.
3 inside hook method change tpl via $view->addHookVar('your_var_name', $your_button) in case when you have your own custom store template (you also need to add $this->getHookVar('your_var_name'))
In case when you use default template just replace tpl with your custom  tpl-file, that will contains needed buttons.

hope this help ;-)

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod