Version 2 of Gift Vouchers and Discount Coupons (MS2, RC1, RC2)

STOP PRESS: This contribution is now updated to Version 5 and has all sorts of cool extras. Please see the latest post about this.

I wanted to give an update on where the GV DC contribution presently stands.  It’s been updated to Version 2.

Version 2 works with;

  • osCommerce MS2
  • osCommerce MS2 (060817)
  • osCommerce RC1
  • osCommerce RC2
  • osCommerce RC2a

Version 2 also deal with Tax properly, which was problematic with Version 1.x

Due to the number of problems that people had installing Version 1.x – I haver decided at the moment to offer this contribution only as an installable service.  The cost of an install is a usually about $50 and my guarantee is that it will work as it is intended to, or you receive a full refund.

So, if you want to have a Discount Coupon system in YOUR osCommerce store that DOES work with Tax calculations and is coded very cleanly, please contact me on and we can go from there.  Install can be made on ANY osCommerce store, whether it is a Template Monster templated store, a highly modified store or even a brand new install.

If you do not want to pay me too install

That’s not a problem – the older version is readily available at the osCommerce Contributions area.  And you can install it yourself, make any changes to it etc.

39 Replies to “Version 2 of Gift Vouchers and Discount Coupons (MS2, RC1, RC2)”

  1. Hi

    I used the coupon code and it works great! I just have one question. Is it possible to restrict coupon use to certain products?

    For example, if certain users have a coupon that gives them a certain 5% discount, and I want to put only say 3 items with a larger discount on the site. I dont want the 5% to be applied on top of the present discount.

    Is this possible?

  2. Gary,

    Is the only difference b/n version 1 and 2 the tax calculation? I dont have any problems with tax so if thats the only change, I can stick to my version.

    Also if I want to offer free shipping on amounts greater than X, (after coupon), would it be best to edit the shipping module? (Im using table rate shipping for free shipping)


  3. Camille – as well as the Tax – which works great…

    It also has start and end date for coupons as well – is pretty much untested so I am loathe to actually get anyone to install it as yet as I have not tested it fully myself.

  4. I installed the contribution, it is working like it was intended, but I am having one slight problem. After install, and running atest, the test account showed no address info, and the in the admin it shows none neither. any suggestions.

  5. Hi Gary, The gift voucher contrib seems really excellent! I’d like to try it, but I have OSc Version 2.2-MS2. Will it work?? And can you please email me the correct package. I went looking Osc contributions but only found the one for Osc RC1,2 etc. Need the 2.2-MS2 version..

    And has the coupon date duration been added??

    I would really appreaciate it if you can email me the full package for 2.2-MS2..

  6. Hi Gary, Your contrib seems to be exactly what I’ve been looking for! However I can’t get it to display / work correctly. Have tried the following:

    1) Vanilla install
    2) Manual Install
    3) Toggle on/off in order totals
    4) Different variations of coupons

    SQL did not return any errors during install.

    Problem: Couponbox is shown and seems to register the rebate (as if you backtrack later it will tell you you have already entered a coupon). The rebate is however not shown in OT and is not deducted from the cart?

  7. I have the same Problem as jessica, Once you submit the order that dosnt take the discount off it will say you have already entered a coupon on the next order, Is there a fix for this

  8. Never mind about the coupon error, its to do with the sessions, close the window and reopen it, The main problem is the discount not being taken off, i have double checked the files and the code and it is exactly what it should be

  9. I just uploaded the files and edited the text files. Everything seemed to be fine, but when I go into the admin area, I can’t find “coupons” under the customers area on the left. I also can’t find the coupon module under order total. I know it’s probably something that I did wrong. Any ideas? Thanks for all your help!

  10. James – counds like you have uploaded files to incorrect places – so it’s a bad install. Start over. Note also that I offer an install service should you need it.

  11. this is my test site need 2 things one is the voucher gift card thingy not so much installed as the component module files, also my fonts are loading correctly because the files aren’t in the right place for the index.php for main page and cant figure out where to put the font files. what can you do for me and how much would ti cost me.

  12. I just installed the coupon module. Everything works great except that product attributes aren’t saving. Does anyone have any advice?

  13. I should explain a bit more. I see all attributes on the checkout_confirmation page, but all are blank in the backend and the database. It acts like it just ignores them when the order is complete.

  14. Patrick – could be any number of problems. I suggest to re-install – the easiest way is to create a new test shop and just install the brand new files. Alternatively, uninstall and re-install – but this is usually not fruitful as if you made a mistake, you are likely to make the same mistake again.

    Go over your files with an eagle eye. I just tested on a brand new install and it works fine with attributes – the contribution is coded so that it touches as few files as possible…

  15. Thanks Gary. You would know better than me, but if the attributes are showing up on the conformation page, wouldn’t the problem almost have to be on either the confirmation or process pages?

  16. Thanks Gary for this contribution. I’m not fussed about the tax bit – my customers will just tell the customers the coupon applies to the POST-tax value – it’s a discount after all, and this is perfectly consistent with the way GST works in Australia.
    To all you whingers (like Stephan whoever) – learn PHP or pay someone (like Gary) to do the work. It was obvious from the 1.x version that this contribution was not going to handle pre-tax. Improve your PHP skills or don’t go installing modules you don’t first understand FROM THE CODE.

  17. Pete – thanks for your kind words.

    I think that most people don’t understand that just because osc is a “free” piece of software, everything that is linked to it is not also free. That’s a historic problem that most all open source software suffers with. If more people would realise that open source means they can take, mash up and reproduce (or pay someone to do so), it’d be much better!

    Anyway – cheers for your comment – I appreciate it.

  18. Hi Gary,

    I would LOVE to have the new version of this but my client is not going to allow me to give out her domain information so that you can install it.

    Is there another option besides letting you in? Do I make a default storefront for you to use to install the newest release and then move your changes over to the actual store she has running now?

    Also, running the one that you do allow us to download gives this in the total:

    Sub-Total: $1.00
    Coupon (test7) -$0.07
    Flat Rate (Best Way): $0.00
    Total: $0.86

    The coupon is for .07 cents and by my yankee math the total should be 0.93 cents and not 0.86 cents.
    Any ideas on where to look to see what is happening?

    Thanks and I look forward to hearing from you soonest!

  19. Deb – maybe the coupon is being deducted twice – check your coding for that…

    In my test shop a 7c coupon works fine, image below – don’t mind the extra “gift wrap” setting, nothing to do with it.

    Your client will have to allow access – speak bluntly with her 😉

    Cheers, Gary

  20. Hi Gary,

    Good eye! I guess I didn’t use yankee math to double the number and see what was happening before I posted here. Surprised I even got the Spam Protection question correct. Had to use all my fingers and a few toes from my Lab.


    I will look at it closer to see if I can find the snippet that doubles the discount.
    I already tried with my client, she isn’t gonna budge.
    Lets see if I can fix this and will poke back.
    I do have some other mods installed.



  21. Hi Gary
    Thanks – the install went well and seems to be working!

    I do have a followup question – Neesha asked on May 21 about restricting coupons to specific items. Is this something you might do? My client would like to offer coupons for let’s say only running shoes for the next month but not anything else…can this be done?

    Thanks again!

  22. Hi Melody – that’s not something I’d need myself, so probably wouldn’t be interested in adding to the codebase – sorry.

  23. Why is this called the “Gift Vouchers and Discount Coupons” contribution when it does not do Gift Vouchers?
    Do you have a timeline for when you will implement the vouchers?
    Are you able to install on modded osCommerce installations?
    Do you charge on an hourly basis?

  24. Ric

    1. Because that’s what I called it when I was uploading it, in readiness for future versions.
    2. No.
    3. Yes.
    4. No.

    You can email me on if you wish to enquire about installation prices etc


  25. Nice contribution but I have a small problem
    Say if i set the coupon to $100 and purchase it with an item that cost less ($50)

    The Total will be -$45
    any ideas?

  26. Hi Gary,

    The fact that you can charge for install and still be listed on the OSC forums tells me that the OSC team is done, dead, and doesn’t care anymore.

    I might pay you the $50 to install this just so I can do better things with my time. As a business owner I get frustrated with oscommerce and all the BS contribuitions out there. I Need to know… If I pay you $50 to install this WHAT IS YOUR WARRANTY? I will need you to be available to fix it when it breaks, as it ultimately will when someone finds a way to break it.

    PS – Does the older contrib work on MS2, and do you offer any discounts for installing on older stores?

  27. Hi John,

    I offer no warranty. Once it is installed and tested to see it is working as it should be, then it is down to you to keep that environment working. It’s coded solidly.

    The older contrib works on MS2.

    “I might pay you the $50 to install this just so I can do better things with my time. As a business owner I get frustrated with oscommerce and all the BS contribuitions out there.”

    Which is where people like me make a business out of it, and have done for the last 8 years 😉

    “The fact that you can charge for install and still be listed on the OSC forums tells me that the OSC team is done, dead, and doesn’t care anymore.”

    Don’t get FREE and GPL and FORUM mixed up 😉

  28. Hi I have installed this great contrib on my testsite (closed for public)
    I have a problem – it does not deduct the cupon but this is what it writes on chechout_confirmation:
    Coupon (test) -0,00 DKK

    I have made a coupon named test in admin on fixed amount 50 – but it does not calculate this in the shop.

    Can anyone tell me what I have done wrong – I have installed 3 times and with same result.

    I have an 2.2 RC2a shop.

Leave a Reply

Your email address will not be published. Required fields are marked *