• Resolved charliesjc

    (@charliesjc)


    Is there a way I can restrict the max quantity allowed to be added to the cart to be the maximum available in the inventory? Or at least provide a warning that the stock has been exceeded earlier than the current way which is when is when you try to view the cart? This is only a problem when using the Ajax cart. If I use the normal cart the error notice is shown after the page refresh.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter charliesjc

    (@charliesjc)

    This appears to be an issue in the JS for the WooCommerce quantity buttons. If I disable the script it reverts to the standard quantity input buttons and the max value is set at the product’s inventory amount.

    Thread Starter charliesjc

    (@charliesjc)

    Upon further investigation it seems this problem is only occurring on the product pages. Once a product is in the cart, the quantity buttons do stop increasing based on the stock in inventory. Like I said, if I turn off the JS that handles this in the theme settings and revert to standard Woocommerce buttons the problem goes away.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ajax Cart restrict max quantity to available inventory’ is closed to new replies.