Support » Plugin: Quantity Buttons for WooCommerce » Buttons disappear after update cart

  • Hello,

    We are having this problem.
    After updating the quantity of products in the cart, the buttons disappear.
    It is normal?

    Thanks.
    Greetings.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Rhett

    (@rermis)

    Hi,
    The quantity buttons should remain visible, even after adding or removing products from the cart. Can you provide me with the theme you are using? Some themes and plugins create compatibility issues, but I can look into it if I know the theme you are using.

    Thread Starter marnyscom

    (@marnyscom)

    Hi,
    I am using Storefront.

    Plugin Author Rhett

    (@rermis)

    Hi,
    Thank you. It looks like the Storefront theme is fully compatible. The issue may be a plugin like “Auto Update Cart for WooCommerce”, or a plugin or custom script with similar functionality that is automatically reloading the cart after the quantity button press.

    Normally, once the quantity button is pressed, a button will appear below the cart contents that say “Update Basket”. In this case, the button exists, but it is being hidden by another plugin that is automatically submitting the form via ajax, but not fully reloading the page. Quantity Buttons requires the Update Basket button to be pressed, or a script that binds to the Update Basket button.

    I hope this helps. Please respond if you are unable to resolve this issue.

    Thread Starter marnyscom

    (@marnyscom)

    Actually is not a plugin, I am doing it with my own code.
    I have a JS function wich “click” upddate cart button when the quantity change.
    But I have tried without that code and I get the same result. The buttons did not show up after updating.
    Thanks.

    Plugin Author Rhett

    (@rermis)

    Ok, I see that if the js code is removed and the button is physically clicked, the issue remains. I noticed that either way, on your site the update cart button does not reload the page, it only reloads the cart contents. On a new install of storefront, the update cart button reloads the whole page, and WC Quantity Buttons requires a page refresh for the buttons to reload, as ajax does not reload them. It leads me to conclude there may be something else occurring on the cart page. Are you aware of any other custom scripts or plugins that are causing the cart to update via ajax instead of a page reload?

    Thread Starter marnyscom

    (@marnyscom)

    I don’t know wich script is causing the reload via ajax.
    I will try to change it and force the reload of the whole page.
    Thank you.

    Thread Starter marnyscom

    (@marnyscom)

    Hi,
    I am sorry for coming back again with this, but I was testing and I have found that woocommerce is the one that is reloading the cart via ajax.
    I have checked it in a site where only was woocommerce installed.
    Also I have seen it in the storefront theme demo site:
    https://themes.woocommerce.com/storefront/

    Plugin Author Rhett

    (@rermis)

    Thanks for your persistence. I will look further into this and release a fix if possible!

    Plugin Author Rhett

    (@rermis)

    Hi,
    I was wrong in my last response about the whole page reloading. The default behavior for WooCommerce is to reload the cart via ajax when ‘update cart’ button is pressed. Nevertheless, it doesn’t appear this is the issue.

    Please find an example here: https://rl-b.com/product-category/accessories/ and add to cart.

    Note that this is a default install of WooCommerce with Storefront theme. There are no other plugins installed that affect behavior. The ‘update cart’ button on the cart page appears on quantity change before and after the cart is reloaded by ajax.

    I must assume that there is something else on your install that affects the cart after reload. The Quantity Buttons plugin uses the ‘woocommerce_after_cart’ action to load. So if for some reason the way your cart is refreshed might avoid this call, it would explain why the quantity buttons do not re-appear. Can you try again to remove the custom code on the cart page, clear server side and browser cache, and see if the issue persists?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Buttons disappear after update cart’ is closed to new replies.