Home>Support>Updating the cart in Unwind causes the quantity control buttons disappear

Updating the cart in Unwind causes the quantity control buttons disappear

By peterk, 7 years ago. Last reply by Alex S, 7 years ago.

Hello,

When the WooCommerce cart is visited on a site that uses the Unwind theme, each item in the cart has nice “+” and “-” buttons. When changes are made to the quantities and the Update Cart button is clicked, the page reloads and the above buttons disappear. This is reproducible on the official Unwind demo site, but for what it’s worth, my platform is WP 4.7.1, WooCommerce 2.6.12, Unwind 1.0.4.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 8 months ago peterk

    Actually, the page is not fully reloaded, but only partially. As the cart form is updated in DOM, the code that inserts the buttons is not triggered. I have managed to work this around in the JS console by hooking the ‘updated_wc_div’ event and re-adding the buttons as in woocommerce.js (could the wrong approach, I have no WordPress dev experience).

    var $=jQuery.noConflict();
    $(document).on('updated_wc_div', function() { $('table.shop_table, .product form.cart').triggerQuantityButtons(); }); // button adding as borrowed from woocommerce.js in the GitHub repo
    
  2. 7 years, 8 months ago Alex S
    Hi, I Work Here

    Hi Peter,

    Thanks for letting us know about this. I’ve logged this as a bug in our issue tracker. We’ll investigate this as soon as possible and try come up with a fix.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More