close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Multiple Possible discounts from 1 Coupon Code

Thread began 5/30/2011 3:22 pm by psychobilly1165508 | Last modified 5/31/2011 3:12 pm by Jason Byrnes | 624 views | 1 replies |


Multiple Possible discounts from 1 Coupon Code

I have an existing database driven coupon system that works great. However, I would like to be able to create one coupon code with multiple option, like 10% Off Sub-Total, Free Shipping, excluding categoryID = 2,4,10...

My Current Fields are:
Coupon_Name | Coupon_End_Date | Coupon_Amount

I added 2 more fields/options to store the selections:
Free_Shipping | Exclude_CatID

A field for Free Shipping (Yes or No) and a field to hold the Excluded category(s).

I've added a cart column called "exclude", and have it working with 1 category, but can't seem to figure out how to get this to work with multiple categories.

Also, not sure where to start with the "Free Shipping" in the eCart "Discount" tab as it would change the coupon calculation.


Sign in to reply to this post

Jason ByrnesWebAssist

the exclude catid option will take some hand coding to accomplish, it should not be to difficult if you are comfortable hand coding PHP, if you need assitance putting it into place, I would sugest signing up for a premier ticket where we can work with you on a one to one basis.

you will need to have a catID and exclude column in your cart object.

In the set session variable code where you set the exclude catID session variable, you will need to use the explode() function to convert the comma separated list into an array, for example:

$_SESSION["exclude"] = explode(", ", $row_recordsetName['excludeCatID']);

then in the add to cart button, set the catID column of the cart object to store the catID column from the products table, you will then need to hand eddit the code to set the exclude cart column based on the exclude session array:

$ATC_itemexclude = "".(in_array($ATC_itemCatID, $_SESSION["exclude"])?1:0)."";// column binding

you can then set the discount rule to be based on the Subtotal of all items where the exclude column is equal a value of 1.

for the free shipping, you would need to create a new discount rule, set it to trigger if the free shipping session variable is equal to yes

use a flat rate calculation of:


Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...