AbanteCart Community
AbanteCart Development => New Features Discussion => Topic started by: yonghan on June 17, 2016, 01:55:39 AM
-
Hi admins, please consider to add hooks into BlocksMenu controller. I need to replace an item link via my extension. The link will be replaced if the extension is turned on and vice versa. I don't see another way to do that except replacing the items info for now. Thanks a lot.
-
you should to create hook for admin side, on your extension status changing event.
Just replace link of item via menu_control class.
-
Hi abolabo. I want to apologize for not explaining in detail. I was saying about storefront blocksmenu controller, not admin side.
-
please clarify "The link will be replaced if the extension is turned on and vice versa."
Turn On where? on admin or storefront side?
-
The extension is turned on via admin side. The link that i want to change is storefront side.
-
so.. when you turn on your extension on admin side you should to replace link for menu item with admin-side hook.
Just use core/lib/menu_control_storefront.php in it.
-
Thanks Abolabo, I'll try it. Sorry for late reply.
-
Hi Abolabo, i can get the menu item link replaced by using your suggestion. So i hook the extension status and change the menu item link based on the status. Thanks a lot.