Is it possible to add multiple coupons to one order. Maybe, apply each of it? or a comma between the coupons.

Jurgen

Comments

longwave’s picture

Not at present. I think any such feature should be heavily restricted by default, otherwise stores may be abused if users figure out an unintended combination of coupons.

Jurgen8en’s picture

Hi,

Thanks for the reply. I only want to use the coupons for specific products.
Why don´t use multiple coupons in that situation?

Coupon for product x
Coupon for product y

Jurgen

longwave’s picture

Component: Documentation » Code

I can see how that could be useful in some stores, but I don't currently have a need for this feature. As always, offers of sponsorship or patches are welcome!

slabcreek’s picture

First, Ubercart has been a great solution for our small non-profit's bookstore. Thanks for all of your time!

This feature would be really great. Though I am using 6x... Scenario is: my organization gives discounts off of two different books if you are a member ($5 off each one). How does a member buy both books at once, and get a discount on both? Two ways that would be the same end:allow two coupon codes to be entered at once, or perhaps an easier way would be to allow a coupon code to be assigned to two items.

Thanks!

doublejosh’s picture

What a bummer. I really thought this would be in there.

Will definitely need this... and it's a pretty normal online order scenario.

In our store...
We're using bulk coupons worth a dollar amount, and certainly want to allow people to redeem more than one at a time.
This allow bulk coupons to act as cash token, which is powerful stuff for creating your own little economy.

I understand why percentage could get harry... but that's why there is a field for "MAXIMUM NUMBER OF REDEMPTIONS (PER USER)" and "MAXIMUM NUMBER OF REDEMPTIONS (PER CODE)"

Guess we'll need a "MAXIMUM NUMBER OF REDEMPTIONS (PER ORDER) - for use on bulk coupons only"

Looks like I'll have to patch and test this one. Any helpers?

servantleader’s picture

Version: 5.x-1.7 » 6.x-1.3

+1
Needing this now

nickbn’s picture

+1 this would be really great.

quicksilver1024’s picture

I thought coupon stacking was possible. :S
+1 Really need this.

pdemarte’s picture

My store admin has requested this feature as well.

WiredEscape’s picture

I noticed that Achieve Internet has done a bunch of work to coupons module including multiple coupons handling. Maybe encourage them to contribute their improvements?

http://www.achieveinternet.com/blogs/ubercart/bella-pictures-launches-dr...

Jackinloadup’s picture

@longwave or anyone familiar with the module.

I have a client that is interested in sponsoring the development of this feature. Would you like to quote it?

sijumpk’s picture

@jackinloadup I like the concept of applying multiple coupons to an order. As an open source drupal developer I am interested to develop a module for the the whole community ( without expecting any sponsorship ). The project page is created at http://drupal.org/project/uc_multi_coupon and I started working on it. You can expect a release within a short time. :)

EvanDonovan’s picture

@sijumpk: There's about a 75% chance I was going to need to develop this feature, and contribute it back as a patch in the next few weeks. Glad to hear that you are working on it. :)

Do you have any ideas on timeline? I may have to write my own solution if yours is not released by Dec. 10.

Since I need this for use with my Ubercart/Salesforce Integration module, I was planning on making the discount coupons into an array rather than a string, and having the UI be kind of like the UI for CCK when you have a field for which you can add multiple values (the "Add another" link). Is that in line at all with how you were planning on doing it?

longwave’s picture

I would happily include this feature directly in uc_coupon itself if someone provides a patch, rather than having it available as a separate module.

sijumpk’s picture

@EvanDonovan The module is almost done and the some work is there on finding the applicable amount for an order, I can complete and publish the module on or before Dec 9th. The UI is made in the same way as in multiple CCK fields. Its done by using ahah in cart pane and ajax in the checkout pane as checkout pane is not cacheable.

@longwave Eventhough I am creating a new module, its like a supporting module to the existing one. Initially I thought of providing a patch to the uc_coupon module but later I found its better to make a new one. Coupon module is a required module for the new module.

longwave’s picture

@sijumpk: I still don't understand why we need two modules to enable this feature, when I'm willing to accept a patch. From http://drupal.org/node/23789:

Work to improve an existing module rather than introduce yet another random module, as that leads to confusion and frustration for the development, support and end user communities.

sijumpk’s picture

@longwave That is really a fact and a base idea for an opensource community. But in the existing coupon module everything which takes the coupon code ( $_SESSION['uc_coupon'], $arg1->data['coupon'], uc_coupon_validate() etc ) is taking a single value instead of an array. So its better to create a new one than to completely alter an existing stable module. I really appreciate the way now its implemented in the coupon module.

EvanDonovan’s picture

@sijumpk: I agree with longwave on this one. I think that if you completely alter an existing stable module, then the best thing to do is to create a new branch (i.e., UC Coupon 2.x). That way, only people who need the new functionality can upgrade, but there is not the potential confusion of an additional module to have to download.

In any case, if I need this functionality, I will need coupon as an array, I believe, since that will make for a cleaner integration with Ubercart/Salesforce Integration module, which I maintain.

That said, I appreciate your work, and don't mean to discourage you from contributing. Perhaps we can come to a solution that is best for all of us.

sijumpk’s picture

@EvanDonovan The idea of creating a 2.x version is a good one, but in my opinion creating a new module is much better. If we do so, users won't get confused as only those people who want to use multiple coupons will install the new module as an addon. The new module is not ment for creating coupons its just for adding a multiple coupon pane and coupon validation methods to the order. Its just like adding a new payment method to the existing uc_payment module. As the case of applying multiple coupon to multiple products and finding the least amount is complex and different from the existing one, its better to have a different submodule, for better issue handling and keep the stability of existing coupon module.

longwave’s picture

I still think it would be far easier to add a configuration checkbox to the uc_coupon checkout pane options: "Allow multiple coupon codes to be applied" or something similar.

Also, how are you going to handle the case where the store owner might want some coupons to work together, but not all of them? For example if they set up two 50% off coupons, they probably don't want them both to be applied at the same time...

sijumpk’s picture

Initially I was thinking of applying only one coupon for a single quantity of product, but in that case the total amount will be different depending on coupon properties and the order of application to different products. For finding the lowest value we have to take the whole permutations of the coupons and individual product items, which may cause some serious performance issues. Now I changed the code so that the price coupons are applied first and then the percentage coupons, one after another. In the new method if two 50% off coupons are applied the total price will be 25% in case all products are applicable.

EvanDonovan’s picture

@sijumpk: You make a good case. I'll just wait for your code, then.

sijumpk’s picture

@EvanDonovan I can make a dev release on Dec 9th. The code is completed and I am checking on different combinations and coupon restrictions.

EvanDonovan’s picture

Thanks! :)

sijumpk’s picture

@everyone The multiple coupons module is released and is available at the location http://drupal.org/project/uc_multi_coupon . This module is tested only on a limited environment, so if you found any problem with the workflow or with the functionality please register an issue. :)

EvanDonovan’s picture

@sijumpk: Thanks - after looking at the code, it looks like it is a good thing this was a separate module. It looks like it was harder to write than I had thought.

I may not have to use it in this phase of my development but I will let you know when I do, if there are any issues I encounter.

sijumpk’s picture

Cheers :)

hanoii’s picture

subscribe

wodenx’s picture

Status: Active » Fixed

I have rolled this feature into the D7 port - currently only in the DEV branch. It was a fairly extensive refactoring, so I don't think I'll be backporting to D6. Hopefully the uc_multi_coupon submodule at #25 will suffice.

Status: Fixed » Closed (fixed)

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

rcharamella’s picture

As of Sept 2011, is multi-coupon in 7.x-2.1-alpha3 or only in the 7.x-2.x-dev as stated in June?

wodenx’s picture

In any 2.1 version.

ratinakage’s picture

Any chance of back-porting this to D6??

wodenx’s picture

Unlikely at this point unless sponsored, but have you looked at http://drupal.org/project/uc_multi_coupon?

ratinakage’s picture

Thanks....

fineartist99’s picture

What I did was altered the uc_coupon.module file in uc_coupon

making uc_coupon_allow_multiple', FALSE

to

uc_coupon_allow_multiple', TRUE and this works just fine.

any mention of making uc_coupon_allow_multiple', FALSE just change FALSE to TRUE and be sure to set your coupons up correctly, so if you have a 10% off and a 20% off coupon in the combinations portion of your coupon be sure to select the coupons that you don't want to be used in conjunction with one another.

check this
Allow this coupon to be combined with all coupons except those selected below.

and be sure to select the coupons that you don't want to be used in conjunction with one another.

hondaman900’s picture

Fineartist, did you do this in D6 or D7? I'm using D6 and added the UC Multiple Discounts Coupon module. I now have an option to allow multiple coupons on an order, and there is a field for add another coupon, but it still only allows one coupon(?!). If you're "patch" was on D6 UC then I'll give that a shot.

Thanks in advance for your reply....