0

I've got a main menu that does not seem to register category changes. When i remove all the caching with 'flush cache storage', the category change is visible. How can i fix this?

(Amasty Full Page Cache is used to speed up caching.)

top-menu.phtml

<?php

$menuHelper = $this->helper('my_module/menu');

$categoryHelper = $this->helper('my_module/category');
$categories = $categoryHelper->getStoreCategories();

?>
<?php if ($categories): ?>
    <section id="default-menu-wrapper">
        <?php echo $menuHelper->get_default_menu($categories) ?>
    </section>
<?php endif; ?>

page.xml

            <block type="page/html_header" name="header" template="framework/header.phtml">
                <block type="core/template" name="header-quick-access" template="menu/header-quick-access.phtml">                
                    <block type="page/template_links" name="top_links" template="header/top-links.phtml">
                        <block type="core/template" name="login_logout_link" template="menu/login-logout-href.phtml" />
                        <block type="core/template" name="custom_cart" template="mini-cart/container.phtml">
                            <block type="core/template" name="cart_link" template="mini-cart/link.phtml">
                                <block type="core/template" name="cart_counter" template="mini-cart/counter.phtml" />
                            </block>
                        </block>
                    </block>                               
                    <block type="page/html_topmenu" name="menu_main" template="header/top-menu.phtml">
                        <action method="setCacheLifetime"></action>
                    </block>
                </block>
                <block type="core/template" name="mini_cart_panel_wrapper" template="mini-cart/panel_wrapper.phtml" >
                    <block type="checkout/cart_sidebar" name="cart_panel" template="mini-cart/panel.phtml"/>
                </block>
            </block>

As you can see i try to disable the cache with <action method="setCacheLifetime"></action>, but that doesn't work.

Update

Even when i disable all caching and/or disable Amasty FPC, the issue persists. It will only change when 'flush cache storage' is pressed.

Peer
  • 133
  • 10

0 Answers0