Hi there - I'm following along with the videos on how to use the customizable products module as I create a computer store, but when I get to rules - it's throwing errors. I'm not sure it the issue is with a missing module or with the rules module its self.
Here is the process I'm taking:
1. Add a custom line item Store > Configuration > Create New Line Item Type
• “Custom Computers”

2. Create a Taxonomy,
• "Computer Antivirus" or whatever
• Add price field (with currency) called "Price" – Field Type “Price” > Currency CDN
• Add a few terms with prices

3. Add a Taxonomy term reference field "Pizza Toppings" to custom line item type
• Store > Configuration > “Antivirus”
• Manage Fields
• Add new field “Antivirus” – Term Reference – Checkboxes
• Choose “Computer Antivirus” Taxonomy Vocabulary
• Include this field on Add to Cart Forms…

4. Set up products to use new line type. Configure the display of the add to cart form on the custom product type to use the custom line item type
• Structure > Content Types
• Choose Manage Display on the Content type you need to change
• Edit the Product – Add to Cart form > Choose the Line item type “Custom Computer”
• SAVE!!!

5. The custom options will now appear below the product

6. Change the price
• Create a Pricing rule
• Store > Configuration > Product Pricing Rules
• Add new Rule named “Antivirus Rule”
• Add a condition: Entity has field
a. Data Selector: commerce-line-item
b. Value: field_antivirus
• Add a Loop:
a. Data Selector: commerce-line-item:field-antivirus -- this field is not available - it gives me commerce-line-item: field-antivirus: ______???
b. Current List Item: change name
At this point I'm not showing an error of "Error: Data selector commerce-line-item:field-antivirus: for parameter list is invalid."
I can't add a proper action to the loop now because the loop isn't formatted correctly.

Has anyone else had this issue or know how to fix this?

CommentFileSizeAuthor
product pricing rule error.jpg428.31 KBcmgdesign
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cmgdesign created an issue.

cmgdesign’s picture

I have the answer! Whoop! The issue is that you don't need a rule loop unless your term reference is set to unlimited. If you are only allowing for one term reference value, then you can ignore the loop and go straight to creating the action! Thanks to No Sssweat on Drupal Stack Exchange. http://drupal.stackexchange.com/questions/191782/adding-priced-options-to-products-in-drupal-commerce