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!

Comments

rszrama’s picture

Status: Active » Closed (won't fix)

Please repost your question at http://www.drupalcommerce.org/questions. I can get you part of the way there through Commerce Customizable Products and the Physical Fields modules, and I'd love to have it there for others to find. ; )

(Oh, and be sure to drop a link in here to the Question node.)

finex’s picture

finex’s picture

Issue summary: View changes

Addedd "

" and corrected some sentences.