Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

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

Started by carrerable, March 08, 2021, 03:42:30 PM

Previous topic - Next topic

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

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 ;-)
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -