WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Cart Widget not updating in WooCommerce 2.0.1 (14 posts)

  1. Erik Ford
    Member
    Posted 1 year ago #

    Prior to updating to WooCommerce 2.0.1, the cart widget would update when a product was added to the cart (either methods). This no longer happens and am wondering if our custom theme is missing something that was not required in older versions?

    http://wordpress.org/extend/plugins/woocommerce/

  2. Roy Ho
    Member
    Posted 1 year ago #

    Possible but the easiest way to isolate the issue is to switch to another theme like 2012 and re-test...this will let you know if it is indeed a theme issue.

  3. Erik Ford
    Member
    Posted 1 year ago #

    Thanks. I found what the issue was by switching to TwentyTwelve. It looks like the plugin is looking for div id="main" which TwentyTwelve uses to wrap the content.

    As a developer, I try to avoid the use of IDs as much as possible but adding the ID to my wrapping div fixes the issue.

  4. Erik Ford
    Member
    Posted 1 year ago #

    It looks like I spoke too soon. The problem was fixed, momentarily, but resumed once I started clicking other pages within the site. Is there a specific ID I am missing somewhere?

  5. velotastic
    Member
    Posted 1 year ago #

    I'm getting a similar issue. My site works ok in Chrome, but the add to cart button is not working correctley in Internet Explorer (I'm running IE10). When you press add to cart the button the basket page is coming up in IE saying the cart is empty.

    I've tried numerous themes including TwentyTwelve and Wootheme's Mystyle and it's not working.

    Frustrating to say the least.

  6. velotastic
    Member
    Posted 1 year ago #

    Problem resolved. It was running W3 Total Cache in conjunction with Woocommerce. See: http://docs.woothemes.com/document/configuring-caching-plugins/

  7. Erik Ford
    Member
    Posted 1 year ago #

    So, I have spent the last 24 hours trying to troubleshoot why, after updating to WooCommerce 2.0.1, the cart widget will sporadically display on one page and not the other in our custom theme.

    As I mentioned in my earlier post, I did switch to TwentyTwelve and the cart widget works as expected. Looking at the markup, the only differences were TwentyTwelve uses IDs to wrap content and we do not. In my mind, this would not explain why the widget would sporadically appear but I was willing to give the IDs a shot.

    After doing so, the cart widget did appear and I thought all was right with the world … until I clicked around to other pages that had the widget installed in their sidebar. I quickly discovered that the problem still persisted and the IDs were not the solution.

    The only change with our installation has been the plugin update. So, I decided to download a local copy of class-wc-widget-cart.php to look at the code. I found the comments, on line 71, that indicate that “ … code in woocommerce.js will update [div] on page load … ” which was not happening.

    This lead me to download a local copy of woocommerce.js to inspect that code. Upon doing so, I did not find anything in this file that relates to the cart widget.

    So, I am back here again attempting to find the answer. Can anyone explain what has changed, with this widget, that would cause the behavior we are encountering? If this is not the official support forum for the plugin, can you point me to where I can post my question?

    Thanks.

  8. mthedesigner
    Member
    Posted 1 year ago #

    I am having the same problem... Please help! Shopping cart does appear!
    itsriotgear.com

  9. Roy Ho
    Member
    Posted 1 year ago #

    Well depending on your setup, if you're extending the cart class, beaware that the class name has changed...

    In 2.0 it is -> WC_Widget_Cart

    In 1.6.6 it is -> WooCommerce_Widget_Cart

    So have a look into that...Also turn ON your debug mode in WordPress or PHP environment to see if you're getting "class not found" errors. But this is a fatal error so it should show anyways but double check just in case.

  10. WP_Maker
    Member
    Posted 1 year ago #

    I have the same things as Erik describes and I use Mystile, a theme from Woo for woocommerce.

    When I change to TwentyTwelve the widget works fine. When I change back to Mystile and then reload the page the widget is there until I navigate to another page. When I go back to the page it was displaying before it's gone as well.

    So,if this is happening with a woo theme as well I don't think it's problem with your custom theme, Erik. Not sure if that is good or bad, though...

  11. Roy Ho
    Member
    Posted 1 year ago #

    @WP_Maker did you update to the latest theme and theme framework for Mystile. Everyone that I have heard claims it is fixed after the updates.

  12. gruffalos
    Member
    Posted 1 year ago #

    Just want to add, I am using artificer and had the same problem. Contacted woo support and a woo ninja (lol) said I need to update my theme to the latest version. This worked!

  13. WP_Maker
    Member
    Posted 1 year ago #

    And indeed, there was a new version of both the theme and the framework available. That seemed to fix it! Thanks splashingpixels!

    I did kind of expect that there would be a notification if new updates were available but on the other hand I did not check myself which I should have.

    Happily making WordPress sites again!

  14. Kimber254
    Member
    Posted 11 months ago #

    I've updated woo and just downloaded a new Mystile and am running no Cache plug-in I'm aware of. I've even deactivated all the plug-ins but woo and used theme 2012 but still having the problems.

    I've spent four days trying to figure this out so please, any advice would be welcome? I finally had to set my host back a week and lost data to get the store running again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic