We use a third party extension wich lets us add bundles with specific discounts to product pages. The problem is that they added a default.xml with the following code:

<block class="Magedelight\Bundlediscount\Block\Toplink" name="add.bundlediscount.top" ifconfig="bundlediscount/general/enable_link" after="-" cacheable="false"/>

Magento seems to ignore the ifconfig part of the code and just always caches the entire page, after some research i found someone stating that Magento 2 just scans the layouts for a cacheable="false" tag and if found busts the cache for the entire page.

i tried the following:

<referenceBlock name="add.bundlediscount.top" cacheable="true" />

with no result the true value doesn't seem to update the availability of the tag

i also tried the following:

<referenceBlock name="add.bundlediscount.top" remove="true" />

In the hope of removing the entire block and the snippet that blocks the entire store from being cached, but to no avail.

The question is, is there a way to update the code from my theme or is the only way to comment the code in the extension directly?

  • Did you resolve this issue? it makes me so crazy – 3CE Oct 24 '17 at 14:04
  • No i never solved the issue, i ended up removing the cacheable tag from the core code in the extension. – Pascal Wientjes Feb 28 '18 at 9:59
  • @PascalWientjes I have exactly the same problem. Have you figured out how to override cacheable value? – Magento Learner Jan 17 at 10:01
  • @MagentoLearner sadly no, this seems to still be impossible. you will have to remove the tag from the third party extension code and every time you update that third party extension check the code to see if it's back :( – Pascal Wientjes Jan 24 at 14:13

Your Answer

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

Browse other questions tagged or ask your own question.