This questions is about Commerce Product Options version 7.x-1.0
and not 7.x-2.0
, the 2.0 version does not have this problem.
The reason we're using 7.x-1.0
is because other module Commerce Pricing Attributes only works with 7.x-1.0
version.
Unless there is alternative how to calculate prices per product attributes/terms/select lists with potential ~50 combinations of variations per product.
Simple scenario:
- Product has Commerce Options fields like e.g. taxonomy term/select list Tables and Attendees. User can select amount of tables and amount of attendees they want to book.
- Adding product variations won't work because there's too many potential scenarios.
- Each Table and Attendee variant has different prices, so e.g. if user selected 1 Table ($1) and 1 Attendee ($1), when added to cart total is $2. But they can also select 5 Tables and 10 Attendees and so on.
- That's where Commerce Pricing Attributes comes in help, but it works only with 7.x-1.0 version of Commerce Product Options.
- After order was placed and checkout was complete, now we want to display those Commerce Product Options fields in e.g. custom text fields on the user's profile.
- This could be achieved with Rules
Set a data value
by copying the value of Commerce Product Options field to User field.
- We cannot figure out how to get those Commerce Product Options values display on Rules?
Closest working scenario is to pull and dump all Commerce Product Options fields into one User field, like e.g textarea field. And in fact it does work.
But how to achieve same, but for each Commerce Product Options field separately. So that e.g. Tables and Attendees fields would have their own separate fields in User page and not be squashed all together in one textarea field?
In this screenshot the [product_attributes]
dumps all of the fields into one User textarea field.
Update: Tried Fetch entity by ID
with Commerce Product Options and it unlocks all the Commerce Product Options tokens/values for custom fields in the Rules under Replacement Patterns section.
But when firing off the Rules it says Unable to load commerce_option with id "30"
. But Order 30 does contain a product with all the Commerce Product Options fields and data in it. And it does not fill the separate fields with fetched entities for each field separately.