Closed (duplicate)
Project:
Commerce Coupon (D7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2012 at 15:58 UTC
Updated:
31 Mar 2016 at 12:25 UTC
Jump to comment: Most recent
Comments
Comment #1
aidanlis commentedOne piece of the puzzle would be rules_linkaction
Comment #2
sokru commentedThis might help to get started http://www.realtidings.com/blog/12/Apr/26/drupal-commerce-custom-add-car...
Comment #3
2ndmile commentedJust 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.
Comment #4
torgospizzaYes, 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.
Comment #5
goz commentedThere is a duplicate issue, and i make a patch on it