WordPress.org

Support

Support » Plugins and Hacks » How to incorporate into Cart66 / dynamic sidebars

How to incorporate into Cart66 / dynamic sidebars

  • kiets
    Participant

    @oomskaap

    I really hope this is finally an answer for our, and many other’s cart66’s sites.

    Currently, we simply show the cart66’s cart widget via a sidebar call:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : endif; ?>

    Is there any way to prevent caching of that sidebar? Or a better alternative to call it that is compatible with your plugin?

    The store’s pages are also domain.com/store/cart domain.com/store/checkout etc. Is there a way to disable cashing on all /store/ pages?

    I’m really excited about the prospects of this plugin.
    Thanks!

    http://wordpress.org/plugins/fragmentcache/

Viewing 1 replies (of 1 total)
  • Plugin Author Dave Kaplan
    Member

    @dkexygy

    Hi there,

    You can certainly enable caching on only certain parts of the page, that is the main point of using FragmentCache.

    So you could use:
    $cache = new FragmentCache(array('key' => 'unique-key-for-section-1'))

    that wraps one part of the page, leave the sidebar uncached, and then
    $cache = new FragmentCache(array('key' => 'unique-key-for-section-2'))

    for the part after the sidebar (just as an example). As long as the sidebar is not wrapped in a FragmentCache block, it will remain uncached.

    Using this plugin, all the caching must be set up manually in the areas that you want to cache. So as long as you don’t stick any FragmentCache references in the /store/ pages, nothing will get cached.

Viewing 1 replies (of 1 total)
  • The topic ‘How to incorporate into Cart66 / dynamic sidebars’ is closed to new replies.