Vazark Posted November 8, 2022 Share Posted November 8, 2022 Hi, I'm fetching some data from an external API for the product page. I'd like to display HTML from a tpl just before the add to cart button. I've used dispalyProductPriceBlock but the theme my client uses has that block disabled. So I've tried the hook displayProductDescriptionAfter but that there is not text rendered. Does anyone have any suggestions, how to go about it ? Link to comment Share on other sites More sharing options...
Kriter.io Posted November 8, 2022 Share Posted November 8, 2022 Hello, have you tried to work with code in the short description using the "code" section? Link to comment Share on other sites More sharing options...
Vazark Posted November 8, 2022 Author Share Posted November 8, 2022 This is part of a module that needs to be run for all products. That's the reason I'm searching for the perfect hook. Doesn't a code block only work on the specific product ? Link to comment Share on other sites More sharing options...
Kriter.io Posted November 8, 2022 Share Posted November 8, 2022 Yes...that area works for only the selected product. I found the following module for you. You can insert the field whenver you prefer and use short codes to manage what you want to display....so it will be much faster to publish what you want:https://addons.prestashop.com/it/personalizzazione-pagine/48234-multiple-custom-html-blocks-and-lists-of-links-anywhere.html#overview Regards Fabrizio Link to comment Share on other sites More sharing options...
Vazark Posted November 8, 2022 Author Share Posted November 8, 2022 (edited) Thanks Fabrizio. However, I believe you missed a point. I'm a (beginner) module developer myself and I'd like to know the hook to be used. The HTML is rendered from a tpl file a module and works fine when I use displayProductPriceBlock. I'm looking for a similar display hook to use for rendering the HTML before the Add To Cart button. Edited November 8, 2022 by Vazark (see edit history) Link to comment Share on other sites More sharing options...
Kriter.io Posted November 8, 2022 Share Posted November 8, 2022 Maybe the position displayProductAdditionalInfo might solve it. It is not before ADD TO CART but immediately after it Quote Link to comment Share on other sites More sharing options...
TonyKapa Posted November 29, 2022 Share Posted November 29, 2022 You can also create a widget and place it wherever you want through .tpl files. 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