Coupon

Gift Vouchers/Discount Coupons for RC1, should also work on RC2 and RC2a , Version 1.2

I needed some way to either have Sales and/or provide store credit to my customers (like when they accidentally overpaid. The store credit would allow them to have the correct amount deducted off their next purchase. And though I kept a manual record and informed them of their store credit, customers would often forget that they had store credit and pay in full for the next purchase.) os Commerce e-commerce shopping cart does not have anything inbuilt that can do this. So yesterday I spent all day at the osCommerce Community Add-ons section as well as at the osCommerce Forums trying to find a module that could help me out.

This "Coupon" module is one of the 2 I have since installed. I have not had a chance to put it into vigorous testing but these notes should help someone decide and install.

This module is named as "Gift Vouchers/Discount Coupons for RC1, should also work on RC2 and RC2a , Version 1.2" though once installed, you will see it as "Coupon" in your osc admin section. I will just refer to it as "Coupon" for ease of typing.

First to verify that this article can be useful to you, ..

My Setup Specifications

  • osCommerce version 2.2 RC 2
  • store location: Australia (ClearlyChosen.com.au)
  • accepting only AUD (AU$) (though I can accept international currencies via PayPal) Note: this module is quite independent of your store currency in that it seems to have no other option but to use your store default currency.
You can check my other add-ons in the article "OSC Community Contributions".

Some Salient Features of "Coupon" module

  • can create coupon that is only for a one-time use or for multiple-use (repeat use of same code). The one-time use means it can be used only once by any one unique customer. So a number of different customers can use the same code, but each can use it only once.
  • the coupon can be for a fixed amount or set as a percentage of the subtotal of the order (i.e. excluding Shipping & Handling).

Some Possible Uses for me

  • to give a specific customer a one-time store credit (which they can use in their next purchase)
  • to create a coupon code for a sale (can be a single or multi-use coupon). After the sale, the coupon can be deleted from the system.
  • as a loyalty coupon - special customers can be given a coupon code that they can use (for a certain time period) so that they get a discount for every purchase they make when they use the coupon.

    Note: the module does not allow you to specify the time period. It has to be a manual administration - i.e. you delete it from the system when you no longer want the coupon to run.

Some Installation notes

Remember to always do a full backup of your osc store or the database and all osc related files. And if you are about to modify any particular file, always make a copy first so that you can revert if you have to.

You can get the "Coupon" or "Gift Vouchers/Discount Coupons for RC1, should also work on RC2 and RC2a , Version 1.2" at: www.oscommerce.com/community/contributions,5743

The download (.zip) comes with instructions but not all answers can be found there. You might have to go to the osc Forum if you need more answers. The support thread for this can be found at: forums.oscommerce.com/index.php?showtopic=327653

If you are installing this module in a new clean version of osc commerce (as long as your version is RC1, RC2, or RC2a), then it is a very straightforward install. You only need all the files in extracted folder "install on brand new osc" to be uploaded. All the files in this folder are .php files.

However, if like me, you already have a shop up and running and also have made previous customizations and installation of other modules, then the installation work can be a bit tedious. Basically you will be using the extracted folder named "shop already installed".

In this folder, you will find a mix of .php and .txt files. The .php files can be directly uploaded to the corresponding locations on your server.

However you have to open each of the .txt file and use the code found within to modify the corresponding .php file that you already have on your server. Sometimes it is not very clear as to where exactly you should put the code (found in the .txt file) into the corresponding .php file. In that case, it is useful to look at the identical (.php) file in the folder "install on brand new osc" and check where the code is to go.

A very tedious project so best to get a cuppa and pull in your concentration to ensure no mistakes are made.

Sort Order

When I first installed it, everything seemed to work well ... except ... no coupon would show up when it came to displaying the totals or in the invoice that was generated. This had to do with the sort order. And it is a peculiar fix ..

In your osc Admin side, in Admin > Modules > Order Totals, you are likely to already have some sort of sort order like 1, 2, 3, 4, ...

For this module to work properly, you need to set your sort order to 10, 20, 30, 40, ... with this particular "Coupon" module having a sort order of 15.

I am not sure if any other number would work, but as 15 worked for me ... I have left it at that.

Activation and Use

This is another part that is not exactly intuitive.

To activate this module, you go to:
Admin > Modules > Order Totals > Coupon
Here you can set:
Display Coupon = true
Sort Order = 15

But to actually create a coupon to use, you need to go to:
Admin > Customers > Coupons and use the "Insert" button to create each new coupon.

Usage Notes

Here are some facts I found out during use of this module.

  • A buyer has to enter the coupon code during checkout (in the "Payment Information" page of checkout).
  • Once they have entered their code, if they do not complete order ... the coupon will still be registered as having been applied when they return and continue with or start a new order. (This is not necessarily what you as a seller might want but that is how it seems to operate. Even clearing the cache or cookies does not seem to void the entered coupon! So if you have a time-limited sale, then the coupon method might not be the way to go.)
  • Furthermore, if a buyer has entered a coupon code and you as the administrator changes the amount or percentage of the discount, it will not affect/vary the coupon already entered. So for instance, if your original discount was for 30% and then you decide that it should be 25%, any coupon already entered (even for an incomplete order) will still calculate as the original 30%. Orders coming in after your change will however reflect the newer 25% discount.
  • The coupon codes that you create does not have to be single words. They can be multiple words. Also, the code is not case sensitive.
  • The coupon module is also not suitable if you want to offer a discount on the condition that the total sales (ex S&H) is more that a certain amount. The Quantity Discount module would be better suited for that purpose.

Comments

This version has had many updates and is now upto version 5, which changes quite a lot of the functionality for the better - as an example, it is now possible to use the coupon at the shopping_cart.php page and it is possible to remove a coupon after it has been applied. Also, it is now possible to add a "one time" coupon which is good for 1 use only - after 1 use it is automatically disabled.

Version 5 is available at www.clubosc.com only, and is supported by an installation fee.

Appreciate the info given. Link goes to the author's site (Gary). Useful. Might get him to do the new upgrade to my site at some stage :)

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

 

Healthful Soulful Things

Custom Search