- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 11.05.20, 18:50
- Opened by: Radoslav Polasek
- Closed by: Fred
- Closed on: 22.06.20, 00:03
- Reason: No answer from a customer
- Comment: Glad to help!
Ticket #17815 - Product page hooks
Hi,
Is there a list of product page hooks and positions?
Thanks,
Rado
Comments
we don’t have such description, but right now we are working on theme documentation and can add that
Yes, that would really help.
Right now I need to hook a block in the specific position on a product page. See attached. Is there a hook I can use?
Thanks,
Rado
Attachments:
block.jpg(184.5 KiB)updated documentation https://alysum5.promokit.eu/promokit/documentation/#product-page
Thanks. I tried and it did not work so I contacted an author of the module I mentioned. This is what they suggest:
“Based on your previous capture I think you are referring to the hook “displayMoreButtons” right? So, if you use this name as custom hook this should works, but what’s the problem? some hooks doesn’t include the additional parameter to IDENTIFY the id_product, so, it’s highly probable that this custom hook that your template already includes doesn’t have this parameter and that’s the reason why it does NOT work, so you should follow the steps I described before using a different custom hook name.”
Please check the previous attached image…
In the hook selection select “Custom hook…” You will need insert a name to that custom hook, eg: myCustomHook
You will see the final code in RED, eg: {hook h=’myCustomHook’ product=$product}
Save
Copy this custom code “{hook h=’myCustomHook’ product=$product}” and paste it in the product tpl of your theme
Do you use the same format like the one they mention?
{hook h=’myCustomHook’ product=$product}
Attachments:
hooks.jpg(72.3 KiB)ok, just add that hook to any place you want in the template
OK, thanks.
What is the name of the template file?
If you need product page - /themes/alysum/templates/catalog/product.tpl
Did so and unfortunately the content is not shown. The only position where it works and the block is diplayed in something they call displayProductPriceBlock, See attached.
Attachments:
displayProductPriceBlock.jpg(109.9 KiB)I suppose you have to register that module in your hook
Hi,
for your information, this is a reply from a Product Extra Content module developer:
After a very very long time checking your shop theme I was able to activate the displayReassurance hook on the product page. The theme has some serious compatibility issues with Prestashop standards, so I must modify our module to be able to show the content on that hook. Please, backup the current module files and always use this version.
Let me know if you want me to send them any response.
Thanks,
Rado
Maybe he will give us more details about “incompatibility” and we make it compatible with that module?
I will ask them.
FYI, a reply:
Is not our job to check the theme issues. Anyway, for example:
Some native hooks are not present in theme at all.
Recent hooks calls set complete product object (or array) as param, not only product ID.
There are a few changes in module we made. For future updates we can indicate which they are to set it again. Anyway, there is no new version of module planned to release soon.
I didn’t ask them to validate the theme, but if they write you that “The theme has some serious compatibility issues” I suppose they know what they talking about. But they seems don’t know.
They mainly mentioned the following issues:
- Some native hooks are not present in theme at all.
- Recent hooks calls set complete product object (or array) as param, not only product ID.
Thanks,
Rado
Sorry, but that sounds strange.
I’m as a module developer exactly knows what hooks are necessary. Why can’t he give you exact information?