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.
X
In 2019 Commerce Guys rebranded to Centarro.

Change is at the center of eCommerce, but our team and mission remain the same.

Our consulting, development, and support offerings apply our expertise to help you adapt to change and grow.

Find us now at: https://www.centarro.io