Using coupon2 with discount,
discount type: product discount
Product discount conditions: Apply to Product attributes --> Taxonomy term (304)
offer type: % off
Leave blank for both Maximum usage
Coupon conditions: random code generated, Recipient: admin (1), Conditions: apply to all

When added this code in the checkout process, only got an error "Unable to redeem coupon", in the RULES EVALUATION LOG, there is nothing related to coupon or discount.

Any hint where i should look into is appreciated...

CommentFileSizeAuthor
#9 discount_coupon.png50.15 KBsureshpotnuru

Comments

mubiesam’s picture

some more testing with following findings...
SET Product discount conditions: Apply to ALL, it worked...but can not set back to product attributes again.

dpolant’s picture

The "unable to redeem" coupon message gets displayed when a discount level condition evaluates as false at the point when you redeem a coupon. In your case, the term comparison condition seems to be the culprit. Are you sure the product in question has the right term?

What happens if you take off the coupon code? Does the discount work as expected, or do you see the same problem?

-Mania-’s picture

I am getting this with all coupons. Nothing works. I have no conditions set to coupons should apply in all cases but every time the error "Unable to redeem coupon" comes up.

Kercsi’s picture

The latest DEV version is same: "Unable to redeem coupon."
Condition: Apply to All :)

Module:
Commerce Coupon 7.x-2.x-dev (Date: 2014-Oct-06 )

pun_pun’s picture

Hello!
The reason of this problem is default permissions settings.
Try to enable permissions with "Redeem" and check the result.
More about "Redeem" meaning here.

guguss’s picture

Granted the Redeem permission fixed the issue on my side.

Thanks @pun_pun !

capfive’s picture

#5 was my issue! CHECK THE TUTORIAL GUYS! :)

joshtaylor’s picture

Probably want to add this to the README... ran into this today. :)

sureshpotnuru’s picture

StatusFileSize
new50.15 KB

hi mubiesam,

I am understand your problem. I think little bit change to solve this. i.e., in commerce discount settings page tick the checkbox of "Product" under heading "Line item types to use for discounts". My side this is working. I hope its works well, try it. For more clear understanding see attached screenshot.
Thankq.

discipolo’s picture

I got the same error message Unable to redeem coupon." because i tried to reuse an exisiting order discount i had configured to apply to certain user roles. it worked fine once i made sure the discount applies to "all"

its best to create a new discount for your coupons and edit the discount and add the coupon there (instead of just creating the coupon and wondering where to assign it to a discount or reusing discounts you have previously created in a different context)

jantoine’s picture

I was getting this same error. The first thing I recommend doing is test whether or not this is a discount issue or a coupon issue by removing the coupon from the discount and seeing if the discount applies. If it does, the issue is with the coupon. If it doesn't, the issue is with the discount. In my case, I am using multiple currencies and discounts, for the most part, are incompatible with multiple currencies. You can follow this issue here: #2345311: Multi Currency Support

jantoine’s picture

It turns out that I continued to have this issue, even for order discounts which should not have been affected by #2345311: Multi Currency Support. It turns out that my issue was related to #1519884: EntityMetadataWrapperException: Unknown data property og_group_ref__og_membership. I was not providing enough cache storage and once it filled up, things would start breaking. Increasing the amount of APC/OPCACHE storage resolved the issue for me.

jantoine’s picture

This issue just will not go away! Cache corruption definitely seems to be the issue here, but it doesn't appear to have been caused by the amount available to APC/OPCACHE. It seems that a recent update to the rules module is the culprit: #2406863: stampede protection should be flexible ("Cache rebuild lock hit" watchdog message) (see comment #19 for a workaround).

jantoine’s picture

I hope this is my last update to this issue as I believe I have my particular issue finally resolved.

There is a very obscure bug in Drupal core where an incomplete list of hook implementations is cached: #496170: module_implements() cache can be polluted by module_invoke_all() being called (in)directly prior to full bootstrap completion.

Commerce Coupon invokes hook_module_implements_alter to ensure that it's implementation of the 'commerce_cart_order_refresh' hook is invoked after Commerce Discount's invocation of this hook. Drupal was caching the list of invoking modules without having run Commerce Coupon's implementation of hook_module_implements_alter. This was causing Commerce Coupon's hook to run first removing the coupon from the order since the discount hadn't been added to the order yet. This then caused the discount to not get added to the order since the coupon didn't exist on the order.

This patch resolved my issue: https://www.drupal.org/node/496170#comment-10216663.

thirstysix’s picture

Unable to redeem coupon error on "Order discount. But, it's work on Product discount type.
I chose Line item types to use for discounts 1) Product discounted, 2) Product

Thanks in advance.

g.paluch’s picture

It might be not apparent at first but before discount or coupon module conditions are evaluated Drupal permissions need to clear first. So please check your permissions yoursite.com/admin/people/permissions for Commerce Coupon and Commerce Coupon User. By default users are NOT allowed to redeem coupons.