Would it be too out of scope to request an auto-apply functionality for a coupon? That is - you don't actually have to enter any coupon code, you just satisfy the conditions?
I have to admit that it doesn't have much to do with a coupon anymore if you don't actually enter a code. But the functionality of the module is already so nice that this would be a simple addition and could be quite useful.
For example:
a) earlybird coupon. Create an auto-apply coupon with an expiry date. People ordering before that date automatically get a discount.
b) members discount. Create an auto-apply coupon that is only valid for users with a certain role. Anyone with this role automatically gets a discount when they order.
Comments
Comment #1
jalane81 CreditAttribution: jalane81 commentedI would love this feature. When can it be done? :)
Comment #2
ColinMctavish CreditAttribution: ColinMctavish commentedsubscribe
Comment #3
longwaveHad an idea on how to implement this: change the "active" checkbox to a set of radio buttons: "inactive", "active" and "automatic" - and then test the conditions of all automatic coupons during checkout, or maybe whenever new items are added to the cart?
Implementing #390900: Multiple Coupons, one order may also be useful here, so you can have many automatic discounts applied, as well as normal coupon(s) on top of that - but we likely need further restriction settings, so you can stop multiple automatic discounts from stacking up in some circumstances (say if you wanted to offer tiered discounts), and so normal coupons can cancel out automatic ones as well.
Comment #4
mandreato CreditAttribution: mandreato commentedI vote for the activating methods (inactive/active/automatic) to be evaluated during item addition into cart.
Indeed, I'll need two kind of discount:
1) a coupon based one: where I discount whole orders to users with specific coupon they get from advertisement
2) a term specific one: where certain products have to be discounted for everyone
The first option is excellently managed by Ubercart Discount Coupons; the second is somehow managed by Ubercart Discounts (Alternative) or Ubercart Discounts, but they lacks the VAT support or other properties.
I think that, with the functionality described in this thread, we could finally have one single place where to configure discounts.
Comment #5
Melissamcewen CreditAttribution: Melissamcewen commentedsubscribing
Comment #6
fooby CreditAttribution: fooby commentedsubscribing
Comment #7
hanoiisubscribe
Comment #8
wodenx CreditAttribution: wodenx commentedA simpler way to implement this might be to add CA triggers for "Product added to cart" and/or "Customer proceeds to checkout pane" - and then define an action "Apply coupon to order" with a coupon code as the argument. That way you would just define one predicate for every automatic coupon (no need to create an automatic coupon class) - and you could check to see if the order already had a coupon applied and choose whether or not the automatic coupon would supersede the one applied manually. This might need to be written so that the coupon would be automatically removed from an order if the conditions weren't met - so, for example, a discount dependent on a particular product wouldn't be applied if that product were later removed from the cart, though that could be handled by the coupon restriction as well.
Comment #9
2dogrc CreditAttribution: 2dogrc commentedSubscribing,
I like the CA method as well. I like the CA method because we are trying to built a Custom Product kit type. So if a customer bought one of remote control planes, then add a motor he might get 5% off, but if he add a battery and servos, then 10%. This would be great to setup with CA and coupon settings.
Will donate when finished:)
2dogrc
Comment #10
wodenx CreditAttribution: wodenx commentedThis has been implemented in the D7 branch. Is it worth backporting to D6 if there is not multiple coupon functionality?
Comment #11
DementedManiac CreditAttribution: DementedManiac commented+1 for backporting to D6
Comment #12
mandreato CreditAttribution: mandreato commentedHope it will be backported to D6.
Comment #13
wodenx CreditAttribution: wodenx commentedIt would be relatively easy to backport the auto-apply feature - but backporting multiple coupons for a single order (which would be required for the use-case described in #4) is more involved. The question is - is the former useful without the latter?
Comment #14
mandreato CreditAttribution: mandreato commentedThinking to a scenario when there is backport of just auto-apply feature without multi-coupons:
- a discount coupon is set up for saving 10% on specific terms/products --> call it discounted products
- user puts in a cart 10 items each @10€
- 5 products are eligible for the discounted products coupon
- so the auto-apply function adds a discounted products coupon line: 1€ x 5 items = 5€ discount line
- order total = 100€ -5€ = 95€
OK: that's good, because we simply decided to discount certain products and no customer action was needed !
Now, since we cannot have multi-coupons feature:
- if a coupon was already applied --> it should be removed (an explanation message would be useful, ie: "discounted products is not cumulative with other discounts")
- else if the customer tries to apply another coupon, he'll be warned that's not possible (ie: same message as before)
Yes: having both features would be perfect, but even the above limited scenario is good enought !
My 2 cents.
Comment #15
wodenx CreditAttribution: wodenx commentedOK - I'll try to implement when I get a chance. But should the automatic discount always pre-empt a coupon discount? i.e., in your case, when customer applies coupon, maybe sometimes you want the discounted products to return to full price and the coupon to be applied. Maybe this needs to be an option?
Comment #16
mandreato CreditAttribution: mandreato commentedWell, I think that the rule of only one coupon applied must always be clarified to customer, so when one kind of coupon is applied, any trying to apply another kind must generate message to the customer to explain the conflict.
I don't know if it is possible, at this point, to ask the customer to commit the new coupon application or just avoid the new application.
In my example that would be:
case 1
- no coupon is applied
- customer add products which implies an automatic discount coupon
- customer tries to apply another coupon but the system warn that it is not possible (or the system asks a confirmation to loose the automatic discount on products: they will return to full price)
case 2
- a manual coupon is applied to the cart
- customer tries to add a product which implies an automatic discount coupon
- the system warn that the product will be added without discount because another coupon is already applied (or the system asks if loosing the initial coupon and gain the new discounted product price)
case 3
- customer add products which implies an automatic discount coupon
- customer tries to add products which implies another automatic discount coupon
...
...maybe backporting multiple coupons for a single order would be easier...
Comment #17
brisath CreditAttribution: brisath commentedI'm looking for this function too, specifically a backport to D6
Comment #18
MegaChriz CreditAttribution: MegaChriz commentedI have made an experimental module for applying discounts automatically:
http://drupal.org/sandbox/megachriz/1320702
For the Drupal 6 version only.
Comment #19
diggingrelic CreditAttribution: diggingrelic commentedI do not understand the solution. I would like to have a 5% discount for a particular set of users applied to any order and all products automatically. How can I accomplish this using Drupal 7?
Brandon
Comment #20
wodenx CreditAttribution: wodenx commentedCreate a coupon that produces the desired discount and is restricted to the specified users.
Create a rule responding to the "check for automatic discounts" event; in response to that event apply the coupon you created above. Be sure to specify that the coupon should be applied as an automatic discount, and that multi-coupons are enabled.
Comment #21
diggingrelic CreditAttribution: diggingrelic commentedThank you sooooo much for your response wodenx. I was unable to revisit this issue until now and your solution works like a charm!
Brandon
Comment #22
wildguy CreditAttribution: wildguy commentedIf this functionality gets back ported, I'd love to know. Some key modules I need are not ready for Drupal 7, so I cannot use it at this time. With or without multiple applied coupons would work for me, although I have scenarios where both would be beneficial. This Module has been very useful, but in limited ways without automatic application.
Comment #23
parrottvision CreditAttribution: parrottvision commentedBackporting +1000 please
Comment #24
gv.me CreditAttribution: gv.me commentedHi wodenx,
Can you explain #20 little more? Will it work for Drupal 7? We are interested to apply this solution.
Comment #25
DanZ CreditAttribution: DanZ commentedThis function is already built into the 7.x-3.x version, and presumably 7.x-2.x, too.
It uses Rules. You just add a new Rule. The event for the rule is "Check for automatic discounts." The action for the rule is "Apply a coupon to the current order." Edit that action to select the coupon you want to apply automatically. Apply conditions, if you like, although the coupons themselves probably have all the conditions you need.
Comment #26
wildguy CreditAttribution: wildguy commentedAny chance auto-apply will be ported to drupal 6? If not, is there another means to apply a discount automatically, perhaps with a hook/custom module?
Comment #27
MegaChriz CreditAttribution: MegaChriz commented@wildguy
See #18.
Comment #28
wildguy CreditAttribution: wildguy commentedOh, I did see that, but the limitation of only having one coupon apply automatically makes it not work.... although perhaps I could modify that behavior.
Comment #29
scotwith1tI was able to finally make this work, hopefully sharing what I learned for my use case will help someone else. in my case, I wanted a tiered setup like this:
- qty 0-9 = full price
- 10-19 15% off
- 20-29 20% off
- 30-49 25% off
- 50-99 30% off
- 100-499 35% off
- 500+ 40% off
- Set up each individual coupon, setting the minimum quantity for the coupon to apply (10, 20, 30, 50, 100 and 500) and also only apply to certain product classes
- Set up a rule as described above, where the event is "check for automatic discounts"
- Add an action "Apply a coupon to current order" for each coupon i created.
- The key now is to ensure that the coupons are arranged by weight in the rule settings to put the highest qty first...so it checks if the qty is > 500...nope? greater than 100? nope? well, greater than 50?........greater than 10? yes! 15% discount applied.
Really glad to be able to use this module instead of another discount module. this site doesn't need additional bloat when this module is capable. THanks all who made this possible.
Comment #30
scotwith1tI did run into an additional complication...i don't see a way to apply the coupon to a qty on a line item...as it stands, the coupon auto-applies if i have 5 of one product in the class the coupon applies to and 5 of another product in the same class (10 total, but 2 different products, same class). what i really want is to only apply the coupon to the LINE ITEM where that line item's quantity only should trigger the coupon, not a combination of 2 different products...
Comment #31
sterlingedsrv@gmail.com CreditAttribution: sterlingedsrv@gmail.com commentedsubscribing
Comment #32
sui_page CreditAttribution: sui_page commentedIs there a setting I'm over looking, I can't seem to find the 'check for automatic discounts' event. #29 by scotself looks like a very straightforward way to getting the job done but I'm stuck setting up the rule.
EDIT: Found my problem. I was using an older version which didn't feature this event. All good now.
Comment #33
sui_page CreditAttribution: sui_page commentedI'm trying to setup a coupon range, for instance 5% for > $100 and 15% for > $300. I've put in the my coupons and automatic events however it will only apply either of my two coupons.
I've tried changing the weights so the rule with the coupon with the large amount is applied first which worked. But then my 5% coupon wouldn't work anymore. Has anyone successfully implemented this tiered coupon setup before?
EDIT: Found solution which involved going to coupon settings and checking 'Allow multiple coupons to apply to a single order.'