WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Cart66 and WP Super Cache (6 posts)

  1. markb1439
    Member
    Posted 3 years ago #

    Hi,

    After purchasing the Cart66 e-commerce plugin, I noticed this in their docs:

    =====
    WP Super Cache*
    Even after its deactivated and deleted, WP Super Cache sometimes leaves content in the .htaccess file which can break the cart functionality.
    *Note: Caching plugins cannot be used with any e-commerce site as it breaks the sessions used to store cart information.
    =====

    In initial testing, Cart66 actually seems to work fine with WP Super Cache installed. But, I assume that the developers of Cart66 must have a reason for saying these things.

    Is there a way I can be sure that they'll work together? For example, will PHP caching mode resolve the issue they warn about? Or can I exclude certain pages or functions from the cache to resolve this?

    Thanks,

    Mark

  2. markb1439
    Member
    Posted 3 years ago #

    Update: On further testing there are issues...users will see the previous (cached) cart. Is there any way to have a shopping cart work with WP Super Cache?

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    On pages with the shopping cart define the constant "DONOTCACHEPAGE" and that will stop those pages being cached.

  4. markb1439
    Member
    Posted 3 years ago #

    Thanks. However, in a typical e-commerce scenario, a shopping cart widget appears on every page. So, of course, if every page isn't cached, it defeats the whole purpose of the caching plugin.

    Is there any way to have widgets work (e.g., exclude the cart widget from caching)?

    Thanks,

    Mark

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Yeah, use the dynamic-cached-content tag to keep portions of your page dynamic. Check the docs.

  6. Seb Syd
    Member
    Posted 3 years ago #

    <!--dynamic-cached-content-->

    <!--dynamic-cached-content--><?php
    include_once( ABSPATH . '/scripts/adverts.php' );
    print_sidebar_ad();
    do_more_stuff();
    ?><!--
    include_once( ABSPATH . '/scripts/adverts.php' );
    print_sidebar_ad();
    do_more_stuff();
    --><!--/dynamic-cached-content-->

    I am using Cart66 as is perhaps markb1439. So far I think Cart66 is really good.
    What I want to know is were do I place the dynamic cached content tag, currently I have not a clue.

    The example used in the wp-super-cache/faq/ is

    "include_once( ABSPATH . '/scripts/adverts.php' );",

    do I replace that with "wp-content/plugins/cart66-lite/cart66.php" which is the location of the cart66.php file.

    What goes instead of "the print_sidebar_ad();" ?

    Is "do_more_stuff();" generic same for everything.

    Any tips or pointers would be much appreciated.
    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic