so i’m having an issue with a plugin that i purchased for my wordpress ecommerce site b2b and wholesale suite where by specific rules are not working, and i’ve had no luck contacting the developers.
So i’m looking for a workaround to my problem.
On my store a particular product has a set minimum order quantity of 3, now an alert error is shown if the user has less than 3 in their basket however the plugin is still allowing users to check out even if they have less than 3 of the product in the basket.
So i was wondering if there is a way to disable the checkout button if their is an error message displayed on the checkout page?
the error message is
<ul class="woocommerce-error" role="alert">
<li>
Your current order quantity total of Remedi Gin – 5cl is 2 — the minimum quantity you can order is 3
</li>
</ul>
and the button code is
<a href="https://www.mysite.co.uk/checkout/" class="checkout-button button alt wc-forward">
Proceed to checkout</a>
is there a way to disable the button if the error message is displayed and enable it if there is no error message displayed?
Many Thanks for your time
2
Answers
Use Below script at the end of your page and pass your quantity field instead of ‘you quantity field’
Try this