senky Posted June 15, 2014 Share Posted June 15, 2014 Hello, I am new to PrestaShop. I have read all docs available, but still, while creating a new theme, one thing is really strange for me. In default theme, a template hook named TOP exists. Modules blockcart and blocksearch register to this hook and I am unable to separate this two in my theme. Additionally, in back-office -> modules -> positions, even after creating a new, custom hook, I am unable to add modules to this hook. I have experiences using hooks in other systems, like WordPress, but unlike in PrestaShop, they are quite simpler and much easier for theme developer to adapt. So the question is, how the heck, I can manage all those modules to be displayed in my theme whenever I want it to be? Thanks in advance for your answers! Link to comment Share on other sites More sharing options...
vekia Posted June 15, 2014 Share Posted June 15, 2014 if you created for example hook named MyNewPosition - then in module you want to attach to this hook you have to create function: public funciton hookMyNewPosition($params){ } Link to comment Share on other sites More sharing options...
senky Posted June 16, 2014 Author Share Posted June 16, 2014 Ok, I understand that. However this would break module's ability to update. So I wonder how all those hundreds of themes adapt hooks. So to make thing easier to understand, lets make it more concrete. How would you create theme, so that search box is displayed in header, but cart box in footer. Any ideas on how to use existing modules? Link to comment Share on other sites More sharing options...
senky Posted June 23, 2014 Author Share Posted June 23, 2014 bump 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