Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How do you Create Coupon with rules?
How do you Create Coupon with rules?
Comments
Comment #1
joco_sp CreditAttribution: joco_sp commentedIn Rules under Actions I selected Entities -> Create a New Entity -> Commerce Coupon (in the next step no other field shows up).
When I use this action on an Event -> User has logged in, the coupon is not added. If I try to select any other entity, then is normally added at log in.
Do I need to make a custom Rule for making a New Commerce Coupon or am I doing something wrong?
Comment #2
joco_sp CreditAttribution: joco_sp commentedHere is a little help.
Actions
1. Add Action - Entites - Create a new entity
- select Commercce Coupon - Continue - Save
2. Add Action - Data - Set a data value - select the field you want (ex. entity-ecreated:commerce-coupon-number-of-uses)
- enter the value you want - Save
3. Do the 2. for the fields you want
At the end I decided to do my custom Rule action for creating a coupon, because is more flexible.