# 3 for the price of 2

Thread began 11/17/2009 1:52 pm by bjgarner241692 | Last modified 1/05/2010 6:59 pm by Jason Byrnes | 1033 views | 4 replies |

## 11/17/2009 1:52 pm  |  #1 bjgarner241692

### 3 for the price of 2

I need to create a discount rule that looks at each line item in the cart and if the quantity of that item is greater than 2, I want to discount the product by 34%.

In the eCart setup I've started a new rule called Quantity.
I've selected Number of itmes with a specific column value
I've picked Quantity as the field

Here's where I'm confused.

What I want to say is "Where Quantity is greater than 2" or "Where Quantity is 3 or more", but the option I am presented with is:

If the total number of items where Quantity has a value of _____ is ___ a value of ____

This seems to be taking me towards, if 1 or more columns has 1 or more items in it then apply a discount to the whole cart.

I only want to discount that item where there are 2 or more purchased.

## 11/17/2009 7:30 pm  |  #2 Jason ByrnesWebAssist

rules that should be applied on a lime item basis should be created on the Calculations tab.

to create a 34% discount on 2 or more, modify the TotalPrice calculation to;
(([Quantity] >= '2')?([Price]-([Price]*0.34)):[Price]) * [Quantity]

this basically says:
if the quantity is 2 or more, the price of each item is [Price] - ([Price] * 0.34) else the price of each item is [Price]

## 1/03/2010 9:59 pm  |  #3 bjgarner241692

This worked perfectly on the cart and confirm pages but we just discovered that it does not flow through to PayPal.

The PayPal connection takes the Item Price and Quantity and re-does the math. It is not capturing the revised row value and since the Discount is done without a Discount rule, there is no Discount at PayPal.

## 1/04/2010 10:13 am  |  #4 bjgarner241692

Is it possible to create a Discount based on this same logic, instead of altering the line price.

ie:
Items go into cart
Discount rule says: if any row above has 3 or more items then discount amount is total of that particular row times .34? and have it cumulative?

This way, the Discount field would be populated.

## 1/05/2010 6:59 pm  |  #5 Jason ByrnesWebAssist

Not really, you would need to create a seperater rule for each item ID in your shop.

a better way is to create a new calculation named truePrice as:
(([Quantity] >= '2')?([Price]-([Price]*0.34)):[Price])

and instead of passing the price to paypal for the items, change it to pass the truePrice instead

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

## Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

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 Window

## We were unable to retrieve the attached file

Close Window

### Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

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