Hello, I need your help, I’m stuck.
On my store I have variable products with a quantity. I don’t want it to be able to proceed to payment if the quantity is greater than the stock.
I’ve managed to display text if this is the case in the repeating group, but I want to apply a condition to the payment button.
The shopping cart is a list of items that includes a product lot and a quantity. My lot also has a stock quantity.
You might be directly using the data, which can make it challenging to manage quantity or stock-related issues.
A better approach would be to create a separate Checkout item and include it in your Cart table.
If the quantity of any item in the cart exceeds the available stock, you can display an error message, preventing the item from being added to the cart.
This method is used by most online shops and avoids blocking the checkout buttkn, which is not very user-friendly.
You may need to reorganize your database structure to implement this.