Hello,

I wanted a module for ecommerce that would allow adminstrators to create a reusable coupon/discount code. They could create a coupon/discount code with a name they choose and can specify it to either take a certain percentage off the entire cart, or a set dollar amount.It would be a code that they could advertise to many people and it would be active until they inactivate it.

I dont mind helping to develop such a module, but I might need t ask a few questions before I could get going.

Thanks,
Frank

Comments

abramo’s picture

Priority: Normal » Critical

from a commercial standpoint the requested feature is the basic function of coupons online.
if effect, today e-commerce does not have a meaningful coupon function.
it has a meaningful gift certificate function with a misleading name.

this request should be addressed as soon as available (developer) time allows.

Christoph C. Cemper’s picture

+1 good point --- I got the same probs

Christoph C. Cemper’s picture

Version: 4.7.x-1.x-dev » 5.x-3.0
Component: cart » coupon

wrong component - prob still exists in 3.0

abramo’s picture

@ Christoph : hi : would you be interested in joining me asking gordon (coupons module developer) to quote cost of adding this feauture to the module?

(otherwise I do not see this happening any time soon . . . .)

anybody else interested in such a project?

Christoph C. Cemper’s picture

Yes, interested.

But first I need the recurring products to work without flaws... need a quote on that too

abramo’s picture

e-commerce needs a lot more work as a whole (to put it mildly) to become production-capable.

@coupons : shall shop around for a good quote.
hope others may join in.

bluecobalt’s picture

Has anyone contacted Gordon about this, or made any progress on this?

abramo’s picture

yes, I have. development of this feature will need financial backing and I have undertaken to be the project coordinator.

anybody interested in contributing financially for the speedy development of this feature (reusable coupons) please PM me as soon as possible. the new module shall eventually be made available to the Drupal community but not immediately - it shall be made available after a period of four months . only members who have contributed financially for its development shall have immediate access.

rickvug’s picture

StatusFileSize
new56.1 KB

In the past we created this functionality for a client with hopes that it would make it to ecommerce core. I do have the code but I did not write it (the developer who wrote it was a contractor). I will contact the original author about this thread to see if he can help here. Maybe he can collect the financial reward for updating the code and making it release worthy?

Rick
(screenshot attached)

abramo’s picture

@Rick : excellent !!
this is exactly what we need.

please keep us informed of any possibilities and terms - also Gordon, who maintains the module, is very helpful in every respect and trust that this time around this feature shall become part of the coupons module soon for everybody to use, with proper co-operation, as the circumstances are ripe.

designerbrent’s picture

subscribing

rickvug’s picture

@abramo: Technically, the work that has been done is a modification of GPL code so there is little I can do to NOT release this into the wild. No terms need apply :)

While I could post the code now, I have instead contacted the original coder to see if he wants to work on refining this. Offering a financial incentive will definitely help in getting the code refined to the point of it being commit worthy.

abramo’s picture

@Rick : thanks : please keep us posted (PM or otherwise, whatever convenient) : providing a financial incentive was the intention from the start, so happy to oblige.

abramo’s picture

look forward to hearing on this matter soon

abramo’s picture

many thanks go to Rick for providing, as promised, code for the coupon module enabling the generation of reusable coupons. this code must be now refined and ported to Drupal 5.

Rick has additionally expressed his intention of helping with the update however, in view of his current commitments, this may not be expected soon. for this reason I have made his code available here so that anybody interested in helping with the update may access it. unfortunately, I have no idea how to do the update myself - being totally programming challenged - so anybody capable please arise to the occasion.

abramo’s picture

bluecobalt’s picture

Is anyone working on updating the attached coupon code to 5.0?

designerbrent’s picture

bluecobalt,

I would love to, but I don't have the time yet. I'd be happy to test on it, if you want.

abramo’s picture

update: code is already under development : expected to be available by mid may.
for availability terms : see post #8 above.

bluecobalt’s picture

Who is doing the update? Who do we need to pay? How much do you need contributed?

abramo’s picture

@bluecobalt : thanks for your interest : development has been assigned to an experienced Drupal module developer/contributor. more details, including cost sharing, upon request by PM.

rickvug’s picture

abramo, do you have any progress updates about adding the functionality? I'm sorry that I haven't been able to help as much as I'd like. Things are still extremely busy for me.

abramo’s picture

@ rick : thanks to your contribution the new feature will be available very shortly : : estimated availability : in about 10 days (cross my fingers . . . .) - the update to 5.x (including refinements) is currently in testing stage !!

shall announce here.

rickvug’s picture

StatusFileSize
new7.02 KB

Ambro,

I'm glad to hear that you're seeing this change through. Hopefully your code will be posted as patch that can be worked into the next version. I've included a copy of the module along with the new ec_coupon table structure. I hope this little bit of extra SQL code helps in some way.

Rick

abramo’s picture

ANNOUNCEMENT

have the pleasure of informing fellow drupal members that an updated Coupons module (for 5.x) including a fully functional Reusable Coupons feature is now available (tested and works fine). this is not a patch for the existing module, but a whole module replacement (for 5.x) that includes the reusable coupons feature.

anybody interested in having this module for immediate use, please send me a PM to share in the development costs and get it. the module will be made available to the drupal community for free after a 4 month period.

abramo’s picture

@ rickvug :: thanks for your valuable contributions :: you have been sent the new module for free.

abramo’s picture

Priority: Critical » Normal
nanasjetpak’s picture

I really need this reusable coupon code, codes that are user friendly (not long strings of numbers) for my e-commerce and the "terms" agreement. I would be willing to test.
Thanks in advance for any help with this.

brmassa’s picture

Assigned: Unassigned » brmassa

Abramo and Rick,

im doing the ECommerce maintaince for Coupon module. Im really interested on this feature and i will add it to the next Ecommerce version!

BUT, i need:
* support old coupom module users! we cant say "the module was totally rewriten, sorry"
* see what modifications were made to current module. i simply dont have enough time to manually check this. If you guys provide a patch against EC3 or EC4, i will analise this immediately.

regards,

massa

abramo’s picture

our work will be released free for all drupal members to enjoy by the end of October.
hope that by that time we will recuperate most of the cost of development.

brmassa’s picture

Abramo,

well, according to GPL 2 license (all modules on drupal.org should be release at GPL), you should provide all modifications you did, since you are using these mods.

but im kinfly asking you guys to release as soon as possible, since the planned release date for ECommerce 4 is just before Drupal 6 and Drupal 6 will probably released by september. The coupon code has some modifications for EC4, so will take time to adapt all changes.

i really asking for your cooperation and comprehension. Your names will be credited on the code for sure.

regards,

massa

abramo’s picture

@massa :: no, not before end October.
You may PM me on this if you want.

Anybody needing this, for whatever reason, before the end of October, must share in the cost of development. Sorry, no free ride up to then.

brmassa’s picture

abramo,

you have a misconception about open source. Do you think you are getting some kind of advantage over other users for 4 months? And after that this advantage will pass?

I spend hours and hours to fix modules, read and answer all issues and developing new features. A entire new Ecommerce module to be more precise. I dont keep to me, since i know its all about being open source. But many, really, many modules that are now on Ecommerce were sponsored by companies and individuals. They all released the code, respecting GPL.

well, i already explained to you the reasons i need the code before october. Once you will not release before this, its probably force us to make an concurrent version. what useless...

massa

abramo’s picture

me and a number of members needing this feature for immediate use have already shared in the cost of development, which has not been fully recuperated yet, nor is it expected to (I have been the main sponsor). keeping the code private for a limited period of time creates the conditions and incentive for cost sharing. this feature would not have been developed otherwise.

and by the way, massa, this issue has been open since november 2006 and, correct me if I am wrong, your interest on this has only been very recent - just wondering . . . . .

brmassa’s picture

Abramo,

im a ecommerce developer (accessing the CVS) since May. I was just working with Subproducts module (because i forked the subproducts module some time ago, calling it EC Live Subproducts, which, by the way, i published just after i created). Now im reviewing all issues and trying to fix them, even from other EC modules. Note the new solution (if any) might conflict with yours on Ecommerce 4.

As you refused to follow GPL license, i have no more to add to this discussion.

massa

gordon’s picture

Version: 5.x-3.0 » 5.x-4.x-dev

Just to point out that what abramo is doing is not against the GPL.

As far as I know the GPL does not mean that you have to contribute any changes back to the community. It only means that if you distribute the code you must provide source code.

As for the change it self, it will never be committed to v3, as v3 is only in maintenance, and only bug fixes are committed.

If you want this change to be considered to v4 then it needs to be updated and submitted to v4 sooner rather than later, as Once I have finished all the changes that I want, and none of the other developers have any other changes I will freeze the updates and get it stable for release.

v4 has had the product api re-written and there is a host of other changes to products.

If it doesn't make it into v4 then it will need to wait for v5

Lastly I am not convinced that this is the way that global discount codes should work and I have not seen any arguments to change my mind.

brmassa’s picture

Status: Active » Postponed

Abramo,

i just read againg the GPL and gordon was right. i am sorry for all this.

but as we said, it will probably not be included on EC4 unless someone else provide a free patch before october.

sorry again,

bruno massa

abramo’s picture

Status: Postponed » Active

thanks gordon for your contribution to this discussion, much appreciated.

I am currently sponsoring the development of four modules in total, and more to come.
all shall be made available for free to the drupal community after a limited period in private distribution (and this has been the explicit intention since inception) -- necessary to induce development-cost sharing.

as stated before, I find this an expedient method for cost sharing and for the development of code that would otherwise not be made readily available.

nobody was interested in developing the respective modules under development before my intervention. call it open-market open-source, if you wish, but it does work and optimizes the open-source idea. eventually, there will be positive contribution to the community where there would actually be no code at all. I am much indebted to the drupal community, and fully intend to contribute back to the measure of my ability.

peace,
abramo

abramo’s picture

gordon said :

Lastly I am not convinced that this is the way that global discount codes should work and I have not seen any arguments to change my mind.

the reusable coupons code is and extra feature, in addition to the exiting features, not in place of the existing ones.

abramo’s picture

(correction of typos :)

gordon said :

Lastly I am not convinced that this is the way that global discount codes should work and I have not seen any arguments to change my mind.

the reusable coupons code is an extra feature, in addition to the existing features, not in place of the existing ones.

designerbrent’s picture

brmassa, gordon, and abramo,

As one of the 'paying' parties to this module, I'm a little frustrated by this situation. Obviously, this is a feature that we needed and were willing to pay for. We also were advised up from about this 4 month waiting period. However, I was unaware that that 4 month wait would jeopardize the chances of it making into the Ecommerce V4.x line.

In the interest of the good of the whole Drupal community, I would like to see this code released and made available for the developers on Ecommerce V4.x. This is something that should be in the package on an ongoing basis.

abramo: In comment #25, (http://drupal.org/node/93143#comment-247290) posted on May 21, the same day that I paid you, you stated that the code will be released in 4 months to the community in general. Yes in comment #32 (http://drupal.org/node/93143#comment-271915), you state that not before the end of October will the code be released. That would make it September 21 that it should be released, not the end of October.

So, if it were up to me, i would like to see the code released now, or at least in time for it to be upgraded so this valuable work can be included in Ecommerce V4.x.

rickvug’s picture

designerbrent,

I agree that the code should be opened up so that it can be re-worked and considered for inclusion in Ecommerce 4. I have been contacted off list by more than one person frustrated with the situation wanting the code that Ambro has paid to have developed. You are not alone in this.

Ambro,

Due to your request I have not released your code as I want to respect your terms. While I'm not sure if the GPL has been breached I know that the "spirit" of open collaboration is being stifled by with-holding code. I think that the best situation for everyone would be to open things up with the intention of working towards extending the EC core coupon module for the 4.0 release. If this doesn't happen soon it'll end up being too late.

If you are wanting to further fund development and re-coup your costs I implore you to set a fund raising goal and advertise the bounty widely within the Drupal community. Having this sit until September 24 does not help yourself or anyone else. There are other efforts that have been posted on groups.drupal.org and elsewhere that have raised over a thousand dollars. I think that if you show openness about this and advertise more people will contribute. If you are interested in this please contact me privately or post here if you want an open discussion.

Gordon,

You point out that you do not think that this is the way that global discount codes should work. Please give more information about what you are looking for so some requirements for inclusion in EC4 can be hashed out for any potential developers. I believe that more end users have a need for global discounts over over single use codes. Not having this as a default feature is a confusing omission as many people expect the coupon module to behave in this way.

The code that I provided in message #24 adds to the existing coupon functionality. If you see the posted screenshot (http://drupal.org/files/issues/coupon_example.png) you can see that the current system has been made a tab ("single use coupons"), with the multiple use coupon functionality ("discount code") being another option.

gordon’s picture

For me this is overhead, not only for the system but for the store owners.

The coupon module does a lot of things that are just not needed for a all encompassing discount.

For a start you do not need to track how much money has been discounted, or given is gift certificates as you can just run a report from a single misc item to get to total amount that has been discounted. With the global codes that have been added to the the system you have the overhead of the single codes which is not needed for global codes.

Also there is the fact that you are giving away codes which are most likely based on the entire cart is just crazy. Examples where this global codes have been implemented correctly is Dell and Audibility which the codes are just urls which set cookies which set a specific discount. eg, free harddisk upgrade on purchase. Not a global $x.xx or a % which means that if someone used the code on a $10000 order, 10% would be $1000 in lost sales.

Discounts are not a generic module which is why there is only 2 very basic discount modules in core. Everyone wants to do discounts differently, which is why I only really added the infrastructure and not the prebuilt modules.

I have been saying that this implementation has been wrong for the last 18 months and no one has given me any reason to think any differently.

If you wanted to get this committed to into e-Commerce, then you should have consulted with me before paying money for it to be developed. I have not been silent about my issues with this method of implementation, and you would have been better off just developing a simple module which created the discount during checkout which would have take a lot less time to develop. Admin would have been easier and reporting would have been simpler.

Unless there is some serious reasons about why this is the best method, then please let me know or this will not be commited.

gordon’s picture

Assigned: brmassa » gordon
Status: Active » Postponed (maintainer needs more info)
bluecobalt’s picture

Gordon,

I disagree with your opinion that "giving away codes which are most likely based on the entire cart is just crazy". I have a client right now that has become part of a coupon book that offers purchasers of the book 10% off of all purchases with my client for one full year. You might think it's crazy. For them it's working.

Different clients have different needs. It seems like the best option would be to have all options.

I would like to see:

1. the ability to create purchase discounts that can be limited to a specific product or product type, or be applied cart-wide

2. the ability to set the expiration date or length of time - so that a discount could be a one-time discount, or be good for a period of time, such as 3 months or a year

3. the ability to have the purchase discount code be auto-generated or manually entered when the discount is created

This seems like it would cover all potential bases.

artha6’s picture

is this code available now for free ?
this shuld really help the community a lot, and they may incluide it as e-com core

btw i hv noticed one imp problem in e-commerce

i created a coupon with say 50% discount and if i try to use 2 different coupon code for one purchase, it allows buyer to do so, i.e. SALES = ZERO, Purchase = 100% :(

only if u use the same coupon twice it gives error, which is normal because for tht period coupon 1 is used

abramo’s picture

ANNOUNCEMENT

have the pleasure of informing fellow drupal members that module version which includes a reusable coupon function shall be made available to the community for free on the 1st of October 2007. This is for 5.x. A download link shall be provided here by then.

For 4.x try the code available here (code kindly provided by Rick (rickvug) -- not tested by me).

all the best,
abramo

.

gordon’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

We are currently rebuilding the flexicharge module so you will be able to implement any type of mass discount that you want.

You will be able to implement this so that the customer will be able to access the code via a url, a field, or extend it to do anything you want. Also on the back end you will be able to implement any type of method of calculating the discount, eg based on a single product or the entire cart.

abramo’s picture

this sounds very interesting, providing indeed the definitive long-term solution :: any time estimate?

however, for anybody needing a solution here and now as discussed above, the code already developed for reusable coupons is a sound intermediate solution :: and works fine too.

abramo’s picture

Coupons module including reusable coupons function (for 5.x) may be downloaded HERE
Coupons module including reusable coupons function (for 4.x) may be downloaded HERE

Enjoy!

best,
abramo

johnalbin’s picture

Version: 5.x-4.x-dev » 5.x-3.x-dev
StatusFileSize
new15.29 KB

Abramo et al, thanks so much for this modification! I had a client ask for this very functionality yesterday and voila! there’s the new code!

For those who need it, I’ve converted the code to a patch for the 5.x-3.x-dev version of the coupon module.

abramo’s picture

many thanks, John, this is great!

abramo’s picture

Status: Closed (won't fix) » Fixed
bluecobalt’s picture

Status: Fixed » Needs review

hey abramo,

Unless I'm mistaken, this thread should only be marked "fixed" if and when the patch is applied to the official module.

peace,
blue

abramo’s picture

Status: Needs review » Fixed

hi, blue :: gordon the official maintainer had classified this as "won't fix" - he will not support this function (as noted in his post) but shall provide a more advanced and flexible solution in the (very far away, I estimate) future. However the classification "won't fix" I felt was misleading for members looking for an intermediate solution, which needs NO further coding to function properly and is available for immediate use :: therefore the "fixed" classification for lack of anything better. for proctical purposes this is very much fixed.

rickvug’s picture

Ambro et. al.,

If this is something that is marked as "wont fix" but is requested by multiple users it may be best if the module lives on as an Ecommerce contrib module outside of the package itself. Gordon already has enough to maintain as it is and there is no way this is going in.

Gordon, do you have any thoughts about forking this off for the time being? Forking is often bad practice in Drupal so I want to make sure that no one's toes are being stepped on here.

Any volunteers for taking this on? I have a CVS account and may have work to do on this in the future. However, I'm very pressed for time so I'd rather have another person as maintainer or co-maintainer if this is to become its own project.

Thanks.

abramo’s picture

gordon feels very negative about this "reusable" function, and judging from the broad perspective of an overall e-commerce developer, which he happens to be, this present function here does not look like the right approach and permanent solution :: I appreciate his feelings and what he has proposed instead is much superior to this intermediate solution offered here. my own feeling is that his time shall be better spent on what he himself has proposed instead of dealing with the intermediate solution. but do not hold your breath, this is a long-tem undertaking, to say the least . . .

having said that, I also believe that whoever has the knowledge and capacity to advance the intermediate condition of things to a higher level should be much encouraged to do so, and the appreciation of all of us non-programmers is for granted. the patch contributed by John is a move to the right direction. any improvements to the module functionality and flexibility should also be very welcome.

what classification this thread is given ("fixed" or "won't fix") is rather secondary to the discussion, which by all means should be kept alive.

nicrodgers’s picture

Hi there.
Firstly, abramo, thanks for your contribution. It's great. Exactly what I was looking for.

I have found a slight bug, but have an easy fix. When trying to delete coupons or add coupons, where you get Unauthorized Access (403) even if you're the administrator.

This is caused by a typo on the module file, do a search for 'administor' and replace with 'administer'

Hope this helps everyone, and maybe abramo can update the source tar.

jeremdow’s picture

StatusFileSize
new3.76 KB

First - thanks to all who contributed to this - glad it was finally made available, despite the disagreements.

When I tried to port this to my site, I realized that there was still a problem with the mail tokens as described and patched here - http://drupal.org/node/136217.

So what I've done is just converted that patch to update the 5.x module posted by abramo above.

It also fixes the "administor" -> "administer" typos, and the one-line ec_settings change from the latest 10/17 official release for good measure - hope this is useful / moving in the right direction.

jeremdow

rickvug’s picture

jeremdow,

This port is exactly the type of work that I was hoping would spring out of this work being shared. As we know this will not get into Ecommerce core, how do you feel about making an actual project out of this work until Ecommerce 4 and a better solution arrive? I have a CVS account that need to be be broken in. Are you interested in being the maintainer or co-maintainer?

jeremdow’s picture

rickvug,

Yes, I'd definately be interested - I've just started to look at EC4, but until then, I think this is actually a very workable solution for a lot of sites.

What would be your main goals - just to keep and up to date fork of the module - or more features?

One thing I really want is to get the reusable codes assignable to multiple products, or by taxonomy - so I'd be interested in working on that as well.

abramo’s picture

hi all :: very glad that this is going somewhere, and my great appreciation to everybody involved :: for good measure the original tar has been modified according to the correction suggested by nicrodgers at #58 (many thanks to nicrodgers :) .

abramo’s picture

kris reports that the "reusables" code does not function with the new e-commerce module - has anybody else tested this?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

gojasonw’s picture

Status: Closed (fixed) » Active

I've happened on a bit of a problem with this module. The discount is computing incorrectly. I have a reusable coupon for a 10% discount set up to apply to all nodes. I'm checking out a cart with two different products @ $99.95 each. When I apply the coupon it gives a discount of $19.98 - not $19.99.

Could I be doing something wrong? Can anyone help shed a little light on this issue? Thanks in advance!

defigart’s picture

Ok I am new. How do I add the patch so I can have reusable coupons?

Doran

medden’s picture

For those who want reusable promo codes, using only the flexinode module..... this works....(example for free local deliver, but should be easy to change to whatever you need)

Create a new page in drupal, with the url 'local'

Thank you for using the promotion code listed in our advert.
<br />

This entitles you to free local delivery.<br />
<br />

Simply browse our website, and when you checkout, your postage fee will be automatically refunded.<br />
<br />

<?php
session_start(); 
$_SESSION['freelocal'] = 1; // store session data
?>

Then add this to the end of your 'shipping.inc' file in 'modules/ecommerce/contrib/flexicharge/providers' directory

if(isset($_SESSION['freelocal'])){
$rate = '0';
}

  return $rate;
}   //end of file here.

Job done... if someone goes to www.yoursite.com/local they get free postage.
Should work for 10% discounts or whatever you need.

pwhite’s picture

Does anyone have a copy of this module for download? The link above ( http://veneodevelopment.com/drupal/coupon.zip ) no longer works. Many thanks