I have content inside list.phtml which shows the stock count of each product on the category page. this shows if an Admin is logged in.

The problem I have is that Lesti FPC (Full Page Cache) caches it and then everyone can see it.

I have created a custom block and moved my code into the new PHTML file with block name 'colors' and used this to display it <?php echo $this->getChildHtml('colors') ?>

Unfortunately as this is inside a foreach loop it shows the stock count as 0.

How can I get the getChildHtml to show the correct value?


There is an option in Lesti FPC that will allow you to have separate cache files based on Custom Group.


Try to add your block in list of dynamic block. Look in https://github.com/GordonLesti/Lesti_Fpc/blob/master/app/code/community/Lesti/Fpc/etc/config.xml for more info.

Hope it helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.