I set up a rule component: 'set new unit price'
This has two parameters: commerce product and price
This has one condition: entity has field: commerce-product has commerce_price
And one action: set data value: commerce-price

I made the rule available to vbo in the product view and when executing it updates the product 'last updated' date, however the price is not updated.

I also tried set data value: commerce-price:amount
I also tried with parameters: commerce product and integer with set data value: commerce-price:amount
I also tried adding save entity action after the above.

None of these have any effect on the price value.
Some help to solve this would be appreciated.
Andrew

Comments

rfay’s picture

I don't think this has anything to do with Commerce VBO Views.

You should start by making a rule that updates the price amount to a static value - in other words, just use a single parameter to your rules component (the product) and then do the entity-has-field(commerce_price) and set the value.

When you have that working you can experiment with passing an additional parameter.

NOTE: You don't even need a rule to set entity values any more, as the current version of VBO has a "set entity values" option that you can configure. You don't need Commerce VBO Views or a rule to do this any more.

andrewscullion’s picture

Thank you for the advice, it is much appreciated.

Andrew

rfay’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.