4
Answers
Vote up!
2
Vote down!

Variable pricing based on range values

Hi :-) I'm trying to add two extra range fields on a product (width and height) which should be used to calculate the product price directly by the buyer.

Let's see an example:

The product is a carpet, the price is 100$ per per square meter.
The minimum width is 1 meter, the maximum width is 4 meters. The minimum height is 1 meter and the maximum width is 6 meters. The minimum size step is 1 centimeter but creating a product variation for each possible combination is not a solution (you need about 150.000 products to accomplish this task).
If the user select 150cm x 320cm (writing the values on a input text field, or using a couple of sliders) the price should be 384$ (1.5m x 3.2m x 100$).
Moreover every carpet could have many colors, like "green", "red" and "blue". But color variation can be implemented using product variations which could change the base price.

How could be implemented this situation? Do you have suggestions? I've read the the developers guide but I've found nothing useful. Currently I'm playing with some custom jQuery on the client side but the price is not updated when the product is added to the cart. Maybe the product price could be re-calculated using a rule when the product is added to the cart? But how the user input value can be stored? What do you think about?

Thanks for the attention!

[ P.S: Initially reported on http://drupal.org/node/1700392 ]

Asked by: FINeX
on July 25, 2012

Comments

FINeX,

Did you found a solution for this. I'm having the same problem calculating the price of wallpaper.

- DEJU on January 10, 2013

4 Answers

Vote up!
2
Vote down!

FINeX,

You can create a product with variable pricing using Pricing Rules.

The trick will be to add customizable fields that the user submits with their add-to-cart click. That's pretty easy as well:

Josh Miller
Answer by: Josh Miller
Posted: Sep 5, 2012
Vote up!
0
Vote down!

FINeX,

Did you found a solution for this. I'm having the same problem calculating the price of wallpaper.

Answer by: DEJU
Posted: Jan 10, 2013
Vote up!
0
Vote down!

Is it also possible to update / show the calculated price on the product page?

Answer by: mori
Posted: Jan 27, 2013