- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 04.03.20, 13:48
- Opened by: Pianeta Affari
- Closed by: Fred
- Closed on: 02.04.20, 21:48
- Reason: No answer from a customer
- Comment: Glad to help!
Ticket #16951 - Areapacks module on AMP
Hello,
Before installing your template we had a module for areapack calculation. On Desktop version the module works fine, i put the code suggested by the module on product.tpl of the template
{hook h='displayAreaBlock' mod='areapacks' product=$product}
On AMP of course the module doesn’t show up, so i put the same code on product.tpl of the AMP template but the module doesn’t work well.
I assume that is beacuse the Areapacks module need to load his js file in order to work. How can i achieve this?
You can see the module on this product
Comments
Hi, Pianeta Affari.
Any third party module is not compatible with AMP by default. To make it work with AMP we have to extend AMP module what requires some time.
Hi Fred,
I was afraid it was like that, however i just need a way to link the js file of the Areapack module, that’s it
the easiest way is to add a hook, like you already did, then check what javascript files are necessary for that module and add them to AMP
ok i will do that, thanks Fred
you are welcome. let me know in case some questions
ok, i followed your advice and i hooked the module and i linked the necessary js file at the end of this block
in product.tpl of the AMP template
But unfortunately It gives a Jquery error ‘Uncaught ReferenceError: jQuery is not defined’, where is the right place to link this js file?
yes, you have to add jquery as well
oh ok, I thought Jquery was already on the shop
so it works now?