drupaldrupal-commerce

Drupal Commerce - How to programmatically create a fixed coupon?


What is the best practice for creating a fixed amount coupon programmatically in a custom module?

I want to calculate a value and then create a coupon code for that fixed amount it programmatically.

Thanks


Solution

  • Check out answer here:

    https://drupal.stackexchange.com/questions/88484/is-there-a-way-to-programatically-create-a-commerce-coupon-fixed-amount

    Also check the tutorial from within the answer.