Product Quantity in Cart

#1
Hello,
I am using prestashop 1.7.4 and I have a problem with LiteSpeed cache. On desktop The number of items in the basket is correctly updated (exception with an ESI block).
On the other hand on mobile the number of items in the basket is incorrect on some pages because of the cache.

With my theme (Panda for Prestashop https://www.sunnytoo.com)
The mobile cart goes through the stsidebar module. So I put the same exceptions for this modules as for the basket module prorpe to this theme. But nothing to do it does not work.
In my rightsidebar tpl file i have:
{include 'module: stsidebar / views / templates / hook / rightbar-item.tpl' sidebar_item = $ sidebar_item}

I test with:
{hook h = "litespeedEsiBegin" m = "stsidebar" field = "widget_block" tpl = "module: stsidebar / views / templates / hook / rightbar-item.tpl"}
{widget_block name = "stsidebar"}
{include 'module: stsidebar / views / templates / hook / rightbar-item.tpl' sidebar_item = $ sidebar_item}
{/ widget_block}
{hook h = "litespeedEsiEnd"}

But do not work ...
Can you help me please?
Regards
 
#3
Hello,
Thank you for your reply.
The problem is not on the payment page. The problem is only in the rader with the display of the number of items in the cart and only on the mobile version.
My cart icon in the grader displays the number of items. On desktop it's ok, but on mobile it keeps bad amounts cached.
In addition on mobile by clicking on it I have a Sidebar which displays the content and it too is false because of the cache. Because if I go to the basket page everything is ok.
I only have this concern on mobile. If i desactivate Litespeed module cache all is ok.
Do you have an idea to help me?
Thank you :)
 

serpent_driver

Well-Known Member
#4
@savonnemoi

If you defined the right values for the hook try this instead of yours.

HTML:
{widget_block name = "stsidebar"}
{hook h = "litespeedEsiBegin" m = "stsidebar" field = "widget_block" tpl = "module: stsidebar / views / templates / hook / rightbar-item.tpl"}
{include 'module: stsidebar / views / templates / hook / rightbar-item.tpl' sidebar_item = $ sidebar_item}
{hook h = "litespeedEsiEnd"}
{/ widget_block}
 
Top