2
Answers
Vote up!
0
Vote down!

Modify price by height / width / color of a product.

How could make the price of a product varies according to height, width and color of a product?
The width and height must be entered by the user through a form. The color is chosen from a list.
I've seen your tutorials but I don't know if I can do this. Thank you.

Asked by: ces
on March 12, 2013

2 Answers

Vote up!
0
Vote down!

Thank you.
Now, I have a new problem.

In Products, I have two fields: price_cm_width and price_cm_height.
In Line item, I have other two fields: cm_width and cm_height.

The idea is put on the unit price:
price_cm_width * cm_width + price_cm_height * cm_height

For this, my steps were:
1. Store -> Configuration -> Product Pricing Rules.
2. Click "Add a pricing rule".
3. Put a rule a name.
4. Click "Add condition".
5. Select "Entity -> Entity has field".
6. Data selector: commerce-line-item
7. Select field: field_price_cm_width
8. The same for field_price_cm_height, field_cm_width and field_cm_height (steps 4 to 7).
9. Click "Add action".
10. Select "Data -> Calculate a value"
11. The data selector should be: commerce-line-item:field-price-cm-width but not displayed. However, commerce-line-item:field-cm-width and commerce-line-item:field-cm-heigth appears.

Why Product fields do not appear?
Thank you, again.

Answer by: ces
Posted: Mar 20, 2013