Giving answer, and hope to help others:
This is the rule I used for this simple calculation.
Add a field custom_quantity to your product variation type
{ "rules_multiply_quantity" : {
"LABEL" : "My custom quantity rule",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "commerce_cart" ],
"ON" : [ "commerce_cart_product_add" ],
"IF" : [
{ "entity_has_field" : { "entity" : [ "commerce-product" ], "field" : "field_custom_quantity" } }
],
"DO" : [
{ "data_calc" : {
"USING" : {
"input_1" : [ "commerce-product:commerce-price:amount" ],
"op" : "*",
"input_2" : [ "commerce-product:field-custom-quantity" ]
},
"PROVIDE" : { "result" : { "result_custom" : "Calculation result custom" } }
}
},
{ "data_set" : {
"data" : [ "commerce-product:commerce-price:amount" ],
"value" : [ "result-custom" ]
}
}
]
}
In human: and link:
http://drupal.stackexchange.com/questions/11469/commerce-rules-multiply-...
I found the solution to this, so I thought I would post it to help anyone else out who is struggling:
1) Before you can call your field under actions, you have to bring it "into scope" under conditions. Select "Entity has field". Under data selectors choose "commerce-product (saved commerce product).
2) For some reason, it seems impossible to use the "Multiple the Unit Amount by" option, as no matter what data selector you use, you will get an error. Instead select "Calculate a value"
3) Under "Input Value 1" select "commerce-product:commerce-price:amount".
4) Select which calculation to use. In my use case, I used multiply (*).
5) Under "Input Value 2" click the "switch to data selection button". You can now select your custom field. It will be located under "commerce-product: (saved commerce product)"
6) Under "Provided variables" give the result of the calculation a name. Choose a good name, as you will be using it later on.
7) Now create a new action called "Set a data value".
8) For the data select pick "commerce-product:commerce-price:amount"
9) Finally, under value, click the "switch to data selection button". You can now select the variable you created in step 6.
This is everything you need to change the price based on the value of a custom field.
Notes: 1) For the event, I used "Before saving a commerce product" 2) I would recommend creating a custom field called "base price", where the user can enter the price before calculations. The rule is applied every time a product is saved, so the commerce price field will keep on changing each time the product is saved. If you use a base price field, you can avoid this problem.