Quick and Dirty Coupon with Custom Line Item and Rules (Screencast)

Tonight I needed a coupon on one product on a site that only sells one product. I didn't really want to deploy and configure Commerce Coupon, so I just did it with a quick combination of a line item field and a rule.

Here's what I did:

  1. Add a "coupon" field to the line item
  2. Create a product pricing rule that checks to see that when the right product is in the line item and the right value is in the coupon field, apply a discount. (The rule is attached to this article.)

That's it.

Here's the screencast.

Files: 
AttachmentSize
Plain text icon coupon_rule.txt1003 bytes
Posted November 4, 2011

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.