1

In my project we are using Magento Enterprise Edition 1.14.1. The prices in store are changed dynamically direct from Database. So the problem is Magento cache every thing (full page cache) so the changes are not affected in front end. So we are decided disable the cache for that particular block. I know it can done in layout files. I checked in layout catalog.xml and I found it the block

<block type="catalog/product_price_template" name="catalog_product_price_template" />

So here I don't know how to disable it. I have tried set fife time of cache to null in app/etc/local.xml ,

 <layout>
    <default>
         <reference name="catalog_product_price_template">
            <action method="setCacheLifetime" />
        </reference>
    </default>
    </layout>

and tried in layout/catalog.xml

<block type="catalog/product_price_template" name="catalog_product_price_template" >
         <action method="setCacheLifetime" />
        </block>

But no luck.

And I have found some other price blocks in layout/bundle.xml file. We are using bundle product as well. So we have to disable this cache also ? Any help would be appreciated. Thanks.

3 Answers 3

2

Most likely it is the FPC that is sticky and not the block.

Pricing should be hole punched by default for the FPC if you are using a default theme.

I would recommend reviewing your theme/template in more detail. To help facilitate this AOE_TemplateHints is great at identifying blocks that are being cached or not.

Try this instead, NOTE, the </s> will pass a null value, as 0 will mean cache forever.

<block type="catalog/product_price_template" name="catalog_product_price_template" >
         <action method="setCacheLifetime"><s>null</s></action>
        </block>

References:

2
  • Thanks for your comment boomer. I have tried already. And How to use AOE_TemplateHints. I have installed that module and that is not working.
    – Elavarasan
    Dec 30, 2014 at 11:28
  • just add ?ath=1 or &ath=1 to any URL if the module was installed properly.
    – B00MER
    Dec 30, 2014 at 16:04
0

Please try below code i think It maybe work for you . set cache life time 1.

<action method="setCacheLifetime"><lifetime>1</lifetime></action>

How to calculate cache life time ?

Ans => Suppose client want to set cache life time 10 hours. So we calculate cache life time like 10*60*60 = 36000

Good Luck

0

Thanks, but this is not working. The problem is the amasty FPC needs a block name to hole punch the price block, but if you look at any default magento theme, the price block is anonymous. The solution would be to give somehow a name for this block, but I already tried everything, but nothing helped to name it.

This is the catalog.xml in any magento theme for price block, and I do not know how to name it, because the name already set, but on frontend it is anonymous...

<block type="catalog/product_price_template" name="catalog_product_price_template" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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