I thought this module was exactly what I needed until I realized it applies only to percentage coupons. I need to support fixed amount coupons.

Could you please describe why you built it only for percentage coupons? Perhaps there is some technical nuance that isn't apparent to me just now.

Have you thought about what would be required to support fixed amount coupons? I have a short-term need for it and am willing to supply patches to extend it if I can do it soon.

Thanks.

Comments

AndyF’s picture

No, there's no good reason! This module was originally nothing more than a simple feature for % coupons that worked along with a patch for commerce_coupon. The commerce_coupon maintainer suggested I keep the contents of the patch in this module as well, so it's slightly grown from its original intent.

I'd happily accept a patch. The module's a normal feature with a field and default rules, and also a custom .rules.inc.

Thanks

agileadam’s picture

I might be jumping the gun here, as I'm still testing, but I believe the module does work with fixed coupons. The rule "Coupon Validation: Check the referenced products" works no matter what type of coupon is being viewed. Adding the existing "field_commerce_couponprodref" field to the "Fixed Coupon" coupon type seems to be all that is required to make this work.

AndyF’s picture

Great to hear, thanks for feeding back! Feel free to close the issue if your testing shows it to work, and I'll update the project page and readme with instructions.

agileadam’s picture

AndyF, I've been doing some more testing this morning and yes, everything seems to work great! Again, all I had to do was enable the module using the directions provided on the project landing page. Then, I had to add the field to the Fixed Amount coupon type. I have tested with multiple products referenced, a single product referenced, and no product referenced. They all work. I tested coupons when a matching product is NOT in the cart and it failed validation as it should.

Thanks for your work on this module! BTW, I give you some credit in a README on a sandbox module I wrote that does the same behavior, but for taxonomy terms (e.g., Allow coupon for all products tagged with "Accessories"). See http://drupal.org/sandbox/agileadam/1822436

AndyF’s picture

Status: Active » Fixed

Cool, thanks - I'll update the docs.

I give you some credit in a README on a sandbox module I wrote that does the same behavior, but for taxonomy terms

Thanks so much! I'd actually already read that README and I did feel very special (:

benschaaf’s picture

ooOO, this is exactly what I am looking for. When do you think this will be elevated to a project @agiledam?

agileadam’s picture

@snowfox, I'm still waiting on approval for full project access... maybe I'll submit Commerce Coupon by Terms too. Sorry!

AndyF’s picture

@agileadam I don't think you're supposed to have more than one simultaneous application, so I'd be careful about submitting another.

@snowfox dunno if you have spare time and are a developer, but you could potentially help push agileadam through the project application process by providing peer review of his application (if he puts up a link).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Pere Orga’s picture

Status: Closed (fixed) » Active

As far as I see this module doesn't work properly when the user use multiple coupons.

If multiple coupons are used, customers get the discount applied multiple times, even if they buy only one unit of the product. That means that coupons of one product could be used to get discount in other products when the discounted amount exceeds the unit amount of the referenced product.

Probably this was not an issue with percentage coupons, as they were applied to the line item.
I think the problem is in the rule: the condition only checks for the existence of the referenced product, regardless of its quantity.

AndyF’s picture

Status: Active » Closed (fixed)

@netol thanks for reporting that. Would you mind starting a new issue for it? Also, I find it a little difficult to understand exactly what the problem is. Would you be able to describe a) the steps you take, b) what happens, c) what should happen, and that will help me look into it.

Thanks!

Pere Orga’s picture

esbon’s picture

I've Been looking for something to go with the commerce coupon fixed amount module. What I'd like to know is if the coupon fixed amount rules will interfere.

Thanks for writing the module