2
Answers
Vote up!
0
Vote down!

Set same field value to all product variations with Rules

How to set same field value to all product variations in one product display using Rules. I have field called field_value in variations.

So when changing variation1 field_value then Rules should set same value to all other variations in that product display. How to loop through all variations?

Asked by: ace11
on March 17, 2013

2 Answers

Vote up!
2
Vote down!

Okey. Solved this by doing own List Item and adding Taxonomy reference price field to it.
Here is video tutorial which I used: http://www.youtube.com/watch?v=j9KsyvQZaAY

This worked for me becouse there is always some items to choose from Product display. Those line items use same stock so this is good for me.

And ofcourse I had to add own Rule to calclute stock when buying certain item. I added custom value field to same taxonomy and there is Integer which can be used to calculate "Item value" - "Stock = x.

Answer by: ace11
Posted: Mar 18, 2013
Vote up!
1
Vote down!

Hi,

You can do something similar to this ("rules_discount_product_one"):
http://www.drupalcommerce.org/faq/rules-field-data-selection

You just have to remove the second condition so you apply the rule
to all the products and instead of change the "amount", just change
the field that you want

Thanks

Answer by: realskorpion
Posted: Mar 17, 2013

Comments

Could you be more spesific? I have followed that "rules-field-data-selection" to make my own. But how to change all variables stock field to same value? What should I set to Actions?

What I am trying to do is to make same Stock value for all variations. I have variations which includes field_number and each has own value. Example variation1 field_value 3, variation2 field_value 7 and variation3 field_value 14.

I set manually stock to 14 for all variations. And I need to have Rule when customer buy example variation1. Then Rule changes to all variation Stock -3 from manually set 14. So it will then be 11 - in all variations.

- ace11 on March 18, 2013