Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8998029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:58:10+00:00 2026-06-15T23:58:10+00:00

I’m trying to add a block (button) to mini cart block: either to name=cart_sidebar

  • 0

I’m trying to add a block (button) to mini cart block: either to name="cart_sidebar" or preferably name="topCart.extra_actions" as it renders it’s child block automatically being of core/text_list type

Everything works great except the block is not getting called on product pages due to FPC being in effect. I’m trying to extend my container from Enterprise_PageCache_Model_Container_Advanced_Quote class (tried Enterprise_PageCache_Model_Container_Abstract as well) however _renderBlock method is not called.

My cache.xml seems to be correct and valid:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <placeholders>
        <internationalcheckout_international>
            <block>internationalcheckout/international</block>
            <name>internationalcheckout_international</name>
            <placeholder>INT_CHECKOUT</placeholder>
            <container>GSX_InternationalCheckout_Model_Container_Button</container>
            <cache_lifetime>84600</cache_lifetime>
        </internationalcheckout_international>
    </placeholders>
</config>

Any help or hints are appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:58:11+00:00Added an answer on June 15, 2026 at 11:58 pm

    Nesting dynamic blocks

    What you are attempting to do is nest dynamic blocks, that is the dynamic mini cart block should contain a nested dynamic block with type=internationalcheckout/international.

    This does not work because of the way the FPC processor implements dynamic blocks (holepunching).

    protected function _processContainers(&$content)
    {
        $placeholders = array();
        preg_match_all(
            Enterprise_PageCache_Model_Container_Placeholder::HTML_NAME_PATTERN,
            $content, $placeholders, PREG_PATTERN_ORDER
        );
    
        // ...
        // ... if applyWithoutApp() on each placeholder then update content
        // ... else prepare data for applyWithApp()
        // ...
    
        }
    

    FPC processing flow

    Lets go through step by step what happens.

    First, when the _processContainers() method is called, $content contains the cached page, including all placeholder tags. This also includes the nested block you defined.

    Second, the method matches all placeholder tags. After this $placeholdersincludes the mini cart placeholder, and then also your nested placeholder definition.

    Third, the found placeholders are processed in order. This means the mini cart placeholder will be processed before it processes the nested placeholder, because that is how preg_match_all() collects the matches.

    Fourth, the mini-cart container is instantiated. It in turn instantiates the checkout/cart_sidebar block, initializes the renderers and calls toHtml() on it.

    Fifth, the checkout/cart/cartheader.phtml template is rendered. When Magento reaches the call

    <?php echo $this->getChildHtml('extra_actions') ?>
    

    it won’t render any content for it because during the processing of applyWithoutApp() and applyWithApp() no child blocks exist.

    Sixth, the FPC processor replaces the complete content area marked by the mini cart placeholder tags with the rendered content returned by the mini cart container. The $content now contains the updated mini cart html.

    Seventh, the FPC container attempts to process the placeholder of your nested block. But the $content no longer contains the placeholder tags for it. They have been removed by replacing the wrapping mini cart placeholder with the new generated content!

    Summary

    When the FPC is processing the content, no layout XML is loaded, and the regular block hierarchy isn’t instantiated.
    For dynamic (“holepunched”) blocks, all output from child blocks will be removed, unless the block instance itself or the container takes care of instantiating them without the layout XML being loaded.
    It would be a bad idea performance wise to load the layout XML and generate all blocks while the FPC is processing page content.

    What this boils down to is that the topCart.extra_actions container block looks like a good idea, but it’s not compatible with the FPC 🙁

    You can’t use child blocks within dynamic blocks.

    To implement a workaround you will have to move your block outside of the cart_sidebar block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.