Vazark Posted June 24, 2022 Share Posted June 24, 2022 Hi, I'm currently trying insert a couple of divs between the price and the add to cart button on the product page (example page below). I'd be fine with adding it before the price block as well. I've tried out using displayProductPriceBlock but it repeats multiple times across the different partials it's called in. Moreover, displayRightColumnProduct and displayLeftColumnProduct do not work as the default template is fullwidth and does not have the right or left columns. I've looked up custom hooks but it seems to need manual installation but that since I'm building a module, it need to be plug and play without client intervention. Anyone got any tips for me ? Thanks, Vaz Link to comment Share on other sites More sharing options...
Sasni Posted June 26, 2022 Share Posted June 26, 2022 If you want and you can, you can make your own hookah and put it in the template. https://devdocs.prestashop.com/1.7/modules/concepts/hooks/#going-further-creating-your-own-hook OR Write where and how many times the content appears when you set displayProductPriceBlock Link to comment Share on other sites More sharing options...
Vazark Posted June 27, 2022 Author Share Posted June 27, 2022 (edited) 10 hours ago, Sasni said: Write where and how many times the content appears when you set displayProductPriceBlock This might exactly what I'm looking for but can you further clarify it for me ? How can we specify the last place in the picture below (before description) with displayProductPriceBlock?? Or how to name a custom hook at that position (displayAfterProductPriceBlock or displayBeforeProductDescription) ? Thanks, Vaz Edited June 27, 2022 by Vazark (see edit history) Link to comment Share on other sites More sharing options...
Sasni Posted June 27, 2022 Share Posted June 27, 2022 (edited) Please check if the suggested condition will solve your problem and let us know if it helped. if ( $hookName == 'displayProductPriceBlock' && $params['type'] != 'before_price') { return false; } Edited June 27, 2022 by Sasni (see edit history) Link to comment Share on other sites More sharing options...
Vazark Posted June 27, 2022 Author Share Posted June 27, 2022 Thanks for the response. the type "after_price" worked out for me! 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