Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorreyesh/6606795 to your computer and use it in GitHub Desktop.
Save victorreyesh/6606795 to your computer and use it in GitHub Desktop.
1) Rule
Event: on payment completed
Action: loop through the order line-items. Each line-item has an action to call the next component with parameters of order and the line-item.
2) Component
Parameters: order, line-item
Condition: data comparison line-item:type is Product (to expose line-item:commerce-product)
Action: call next component with parameters of order and line-item:commerce-product
3) Component
Parameters: order, product
Condition: data comparison product:type is Product (to expose the product:field-points-to-add)
Action: add userpoints, number to add being product:field-points-to-add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment