nanolimit Posted April 20, 2013 Share Posted April 20, 2013 (edited) I'm redesigning my shop at the moment and I've run into a problem that no amount of google can help me with. I'm trying to call hooks into a custom menu, I want to call manufacters/ login/ search/ cart into the menu. I've been searching for awhile now but the most I could come across was using {Hook::blockmanufacture(getContent);} (or there abouts) which didn't seem to work. Is there an easy way to attach already made blocks into my new menu? Thanks Edited April 20, 2013 by nanolimit (see edit history) Link to comment Share on other sites More sharing options...
Paul C Posted April 20, 2013 Share Posted April 20, 2013 I wrote some stuff a while back about doing this kind of thing in Prestashop 1.4 which can be found on my site. In 1.5 support for this has actually been added. You can use the following smarty code: {hook h="hookname"} you appear to also be able to pass parameters in the smarty code where the additional paramaters are passed in the $params array as key=>value e.g. {hook h="myHook" order_id= X cart_id=Y} In the hook function these could be accessed via: $order_id = (int)$params['order_id']; $cart_id = (int)$params['cart_id']; The above is from looking at the code as I haven't had time to explore further. Good luck! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now