I've set up discounts in my form with negative values. The problem is when the discount is greater than the cost of the product, it results in a negative balance. How do I round keep the balance from dropping below zero?
I've set up discounts in my form with negative values. The problem is when the discount is greater than the cost of the product, it results in a negative balance. How do I round keep the balance from dropping below zero?
I guess I would first ask why you are giving discounts that can cause the balance to drop to zero or below?
Are you using conditional logic to show the discount?
One of the discounts is $5 off. The cheapest product is $3, so hypothetically a customer could buy the $3 product using the $5 coupon and end up with a -$2 total. I am using conditional logic to show the discount. Each discount is a product with a negative value, and they only appear if the correct discount code is applied.
Hmm, I can see that would be an issue. What would you like to have happen instead?
Either the price should be limited to $0 (so any total that is negative is rounded up to 0), or the coupon should only work if the total is greater than the value of the discount. I keep trying to add a condition that says the total must be greater than $5 for the $5 discount to apply, but for some reason the Total field is not an option...
Here's the form address for reference: http://websitetest.us/order/
No, you can't do any comparison on the total field. I'm going to ask our developers regarding best practices in this situation.
You should be able to use a calculated number field here that adds up all of your product fields, so as they become selected the number field tallies alongside and then you can use conditional logic based on that number field.