Hello, first of all I want to tell you that I really like the module for prestashop and it really makes the shop very fast and I am more than impressed. I must tell you that I do not see my shop running without this module.
I have prestashop 1.7.3.3 installed on my shop and I encountered the following errors. I am trying to understand the module better especially how to use the "esi" holes for my theme templates and please help me.
1. After I installed the litespeed cache module with default settings the ps_customersignin module was not working right, I mean when the page was saved in cache the same page was displayed to other users with the same account name the same products in the shopping cart on some pages etc. I managed to fix it after reading all the forums and knowledge base of litespeed module from all over the internet. I modified the ps_customersignin.tpl file from prestashop module folder of my theme and I added the following at the beginning and at the end of the .tpl file:
{hook h="litespeedEsiBegin" m="ps_customersignin"}
<html contents of .tpl file>
{hook h="litespeedEsiEnd"}
I must say that my theme does not use any widget for any of the modules (as far as I could see in the .tpl files from my theme there are not any "widget or widget blocks") and I ended up using the code above with trial and error and now this part is working fine. If I did something wrong please let me know. I need to inform you that I modified the .tpl file from the ps_customersignin module because I wanted a responsive mobile and desktop cart and most probably that is why it had those errors with the cache module.
2. I have a module that displays the date of delivery on each product page and it is customised for each product individually. I want to know how I can add an esi block to this module. This module does not appear in the Litespeed Configuration page on the esi blocks. In the dropdown list of the esi blocks I only have the main Prestashop modules. I would also like to know how can I add more modules there and how can I use them in the .tpl files. On the Litespeed configuration page for prestashop I saw that you refer only to widgets and not to simple hooks from .tpl files. For example this delivery module that I have is inside a hook on product.tpl file as follows:
<div class="reasus">
{hook h='displayReassurance'}
</div>
In the displayReassurance hook is added this delivery module that I talk about and I would like that hook to be added to ESI because I need it to display the correct date of delivery. In case the cache stays for one or two days the date of delivery will not be correct as it will show the date of delivery from when the cache has been saved in the past.
3. On the product page I created two versions of the product cover thumbnails. One is for mobile and one is for desktop. I used an if statement and to be able to check first from what device the page is accessed I used getContext(). I needed it because I included a swiper action in the product page. The code is as follows:
{if Context::getContext()->isMobile()}
<here is the code for mobile>
{else}
<here is the code for desktop>
{/if}
The problem with the cache module is that it displays only the page that is first cached. If I go from the mobile first and access a product page, when other user goes from desktop and it accesses the same product page he will see the mobile version of the cover thumbnail.
I tried to use the mobile cache from your module but it is not working. Please let me know what I can do to fix this issue instead of modifying my code. The .tpl file that I am talking about is located in themes/theme_name/templates/catalog/product-cover-thumbnail.tpl
In conclusion if anyone knows how I can add ESI blocks directly in the .tpl files to blocks or hooks it will be perfect. I tried to read all the information online about Litespeed cache module and I didnt figure it out. I am sorry if I wrote too much but I really need this module to work on the shop. If you want to visit the shop you can come to www.3dgifts.ro
Thank you.
I have prestashop 1.7.3.3 installed on my shop and I encountered the following errors. I am trying to understand the module better especially how to use the "esi" holes for my theme templates and please help me.
1. After I installed the litespeed cache module with default settings the ps_customersignin module was not working right, I mean when the page was saved in cache the same page was displayed to other users with the same account name the same products in the shopping cart on some pages etc. I managed to fix it after reading all the forums and knowledge base of litespeed module from all over the internet. I modified the ps_customersignin.tpl file from prestashop module folder of my theme and I added the following at the beginning and at the end of the .tpl file:
{hook h="litespeedEsiBegin" m="ps_customersignin"}
<html contents of .tpl file>
{hook h="litespeedEsiEnd"}
I must say that my theme does not use any widget for any of the modules (as far as I could see in the .tpl files from my theme there are not any "widget or widget blocks") and I ended up using the code above with trial and error and now this part is working fine. If I did something wrong please let me know. I need to inform you that I modified the .tpl file from the ps_customersignin module because I wanted a responsive mobile and desktop cart and most probably that is why it had those errors with the cache module.
2. I have a module that displays the date of delivery on each product page and it is customised for each product individually. I want to know how I can add an esi block to this module. This module does not appear in the Litespeed Configuration page on the esi blocks. In the dropdown list of the esi blocks I only have the main Prestashop modules. I would also like to know how can I add more modules there and how can I use them in the .tpl files. On the Litespeed configuration page for prestashop I saw that you refer only to widgets and not to simple hooks from .tpl files. For example this delivery module that I have is inside a hook on product.tpl file as follows:
<div class="reasus">
{hook h='displayReassurance'}
</div>
In the displayReassurance hook is added this delivery module that I talk about and I would like that hook to be added to ESI because I need it to display the correct date of delivery. In case the cache stays for one or two days the date of delivery will not be correct as it will show the date of delivery from when the cache has been saved in the past.
3. On the product page I created two versions of the product cover thumbnails. One is for mobile and one is for desktop. I used an if statement and to be able to check first from what device the page is accessed I used getContext(). I needed it because I included a swiper action in the product page. The code is as follows:
{if Context::getContext()->isMobile()}
<here is the code for mobile>
{else}
<here is the code for desktop>
{/if}
The problem with the cache module is that it displays only the page that is first cached. If I go from the mobile first and access a product page, when other user goes from desktop and it accesses the same product page he will see the mobile version of the cover thumbnail.
I tried to use the mobile cache from your module but it is not working. Please let me know what I can do to fix this issue instead of modifying my code. The .tpl file that I am talking about is located in themes/theme_name/templates/catalog/product-cover-thumbnail.tpl
In conclusion if anyone knows how I can add ESI blocks directly in the .tpl files to blocks or hooks it will be perfect. I tried to read all the information online about Litespeed cache module and I didnt figure it out. I am sorry if I wrote too much but I really need this module to work on the shop. If you want to visit the shop you can come to www.3dgifts.ro
Thank you.
Last edited by a moderator: