Currently, Discount coupons module only adds a conditional action to check if a coupon is applied. It does not allow checking if a particular coupon is applied. I modified the code to allow selection of coupon (if no coupon is selected, the default behavior will work which is to just check if any coupon is applied, so current installations should not be impacted). Also there seems to be a bug in current dev branch, when you check for used coupon reports you get a _uc_coupon_date_range not found because the uc_coupon.admin.inc was not getting included. I added a require in uc_coupon.reports.inc for the admin file. I posted the patch to show how can it be used to create a free shipping coupon at http://drupal.org/node/637814#comment-3794696.
Can this be reviewed and included in main stream.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| patch_uc_coupon_coupon_selection_for_ca.patch | 2 KB | novice |
Comments
Comment #1
longwaveI would be more inclined to add a text field for coupon codes rather than a multiple select, as it could be difficult to manage for sites with lots of coupons. This would also allow the possibility of wildcards to match bulk coupons, or even different coupons that share the same prefix. Would this be a workable alternative?
Comment #2
longwaveChanging status.
Comment #3
novice commentedAs such adding text field would be fine too, but makes it difficult if you have to select one of many. Could do comma separated etc. How about putting both selection + text field.
Thanks
Comment #4
longwaveBy textfield I meant multiple lines; you could enter as many coupons as you like (one per line), and also possibly use * to indicate a wildcard.
Comment #5
novice commentedThat would work.
Thanks
Comment #6
novice commentedOh and BTW, when you are adding the code, could you please add the logic to not show the coupon discount in checkout, if the discount amount is 0.00, but still apply the coupon.
Thanks
Comment #7
longwaveThis feature has been added and committed to CVS. The "order has a coupon applied" condition accepts any number of coupon codes to check for, including wildcard matches.
Please open a separate feature request for #6, I am not sure that all users will want this to happen and will have to consider it a bit more.