Commerce Customizable Products: validate custom "attribute" field
Hello!
I have a product with two prices and two quantity fields.
One is for full price, one for a reduced price.
For full prices, the quantity field is the standard field of the add to cart form on a product. The reduced price quantity field was made with a custom line item via Commerce Customizable Products.
Now it would be great:
1. to check that the reduced quantity field value is less than or equal the normal quantity field value via AJAX
2. to have these nice +/- input for my custom quantity field, like the default quantity field has
Some ideas for that would be absolutely great!
Thanks, Marc :)
Comments
It isn't really apparent to me what you're trying to do here. It sounds like you've created a custom line item field and are trying to use that instead of the normal quantity field, but then I don't get why or how it's supposed to stay in sync with the normal quantity property. You don't really indicate how these fields are supposed to work - i.e. how does someone get that reduced price, and can the same person order at full price or reduced price based on what quantity fields they fill in?
If you can provide more detail, I'm happy to help, but really it sounds like you just need to do some custom theming of the Add to Cart form to rig up the display how you want it to be. I doubt there's a configuration only solution to your scenario.