Any ideas on applying a coupon via popular social media and advertisement methods of the day? That is to say click here special offers on external sites that apply a promotional offering/code? I was thinking of writing a small project to establish this sort of functionality. I was thinking simply checking the url and firing a rule to check the url and if so assign the coupon to a user with the option to limit one per user.

Before going down that path, I figured I'd check to make sure such functionality is not already available or that someone else does not have an idea on how to complete this common use type in a more simple manner.

Any thoughts?


aidanlis’s picture

One piece of the puzzle would be rules_linkaction

sokru’s picture

2ndmile’s picture

Issue summary: View changes

Just thought I would resurrect this thread to see if anyone came up with a solution. About to implement this for links that we are putting into magazine ads (yes, they still exist and my boss loves them) so that we can track our ROI for these ads.

torgosPizza’s picture

Yes, I have done this using Rules Link Event and the patch from #2263315: Allow discount_coupon on orders without the discount. I did have to add a custom hook_init to look for "coupon" in the query's GET params.

It's a bit roundabout, I'll admit, and I think part of the issue is the fact that Discounts currently always expects either a product or an order; it's not stored on the user's "session" anywhere, so right now you have to write a tiny bit of code that will apply a coupon (which then doesn't require a discount). I think ideally, we'd find a way to apply a session identifier to the user's session that the Discounts module can use to satisfy the User condition to actually apply the discount.

GoZ’s picture

Status: Active » Closed (duplicate)
Related issues: +#2191265: Provide a coupon code as a link

There is a duplicate issue, and i make a patch on it