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

rating

Free Product from Particular Category

Thread began 12/14/2010 12:51 pm by psychobilly1165508 | Last modified 12/15/2010 9:41 am by Jason Byrnes | 1135 views | 7 replies |

psychobilly1165508

Free Product from Particular Category

I need to create a coupon code that when applied will provide a 100% discount to any product from a particular category. I can't seem to figure out the correct triggers.

It only must be applied to one product, if another product or multiple quantities of a product from that category is added to cart it will be charged as normal.

Thanks

Sign in to reply to this post

CraigRBeta Tester

take a look at this thread, especially posts 5 & 6

showthread.php?t=15712

it may help

Sign in to reply to this post

psychobilly1165508

Hi Craig, thanks for the response. I can't quite wrap my head around how to apply this to a coupon?

I have an dynamic coupon system in place already that is a straight forward % off with expiration date.

Not sure what the correct trigger combinations in the discount tab should be.

Sign in to reply to this post

Jason ByrnesWebAssist

well, you will need to add a category column to the cart object to be able to trigger the discount, you will also need to have a discountAmount column. in the add to cart button, you will need to assign the discount amount column to be the same as the price, and assign the category to the category column.

the discount amount column should only be given a value for items the discount should apply to.

lets the category to apply the discount to is 3 for example sakes:

for the trigger, you will use your basic trigger for applying a discount code, based on the session value, but you will need to add a second trigger as well:

AND
Number of Items with a specific column value-
if the total number of items where 'category' has a value of '3' is '=' a value of '1'


for the calculation, use:
based on column subtotal-
subtotal for column 'discountAmount' 'plus' '0'

Sign in to reply to this post

psychobilly1165508

Thanks, Jason the "discountAmount" column was the missing ingredient.

It works fine when the coupon is applied to one item, but if another item from the same category is added to cart, the free item discount disappears?

Also, if other items from other categories are added to cart it discounts the entire column subtotal...

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is how you said you wanted it to work:

  It only must be applied to one product, if another product or multiple quantities of a product from that category is added to cart it will be charged as normal.  




perhaps I missed something? i read that as meaning that the discount only applies if one item in the category is in the cart, if a second item in the category is in the cart, the discount does not apply, if that is not the case, change the trigger to

AND
Number of Items with a specific column value-
if the total number of items where 'category' has a value of '3' is '>=' a value of '1'

if the discount applies when multiple items are in the cart, then the discountAmount column cannot be used, you will need to hard code the discount amount, it cannot be dynamic.

Sign in to reply to this post

psychobilly1165508

Sorry, it was poorly worded.

The first item added is free, all other items added after that would be charged as normal.

Sign in to reply to this post

Jason ByrnesWebAssist

ok, so the trigger needs to be:
AND
Number of Items with a specific column value-
if the total number of items where 'category' has a value of '3' is '>=' a value of '1'



and the discount will need to be hard coded, you wont be able to do the discount amount dynamically without significant hand coding to loop through the cart and find the price for the first item in that category.

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

Content

rating

Layout

rating

Ease of use

rating

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...