1
Answers
Vote up!
7
Vote down!

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 :)

Asked by: dasmoermel
on March 8, 2013

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.

- Ryan Szrama on August 5, 2013

1 Answer

Vote up!
0
Vote down!

dasmoermel,

As with most things for customizable products (line item fields), it would be amazing if the line item fields would trigger an ajax price change. I mention as much at the end of my customizable pizza store demo:

www.youtube.com/watch?v=j9KsyvQZaAY

Which brings us to the feature request: https://drupal.org/node/1541886

On a slightly different note, there's a new module on the block called "Commerce Bundles." And a great Tech Talk where we explain how it can handle unique quantities of different parts of the bundles (if you want to say, get two large pizzas and a small one, you could make that a bundle for $25 or change the price of each pizza to be a little less).

http://commerceguys.com/webinars/tech-talks/commerce-bundles

Josh

Josh Miller
Answer by: Josh Miller
Posted: Apr 25, 2014