# price based on quantity but prices are dynamic

Thread began 9/22/2009 1:50 pm by vjc111265867 | Last modified 9/22/2009 5:13 pm by Jason Byrnes | 758 views | 1 replies |

## 9/22/2009 1:50 pm  |  #1 vjc111265867

### price based on quantity but prices are dynamic

I have a similar question as in this post

but I am having trouble because I have price ranges that are dynamic based on quantity of order and type of shirt. One shirt from 12-23 pieces will have a price of \$12.95 , when another shirt from 12-23 will have a price of 16.95. I have the the different price ranges based on the Item_ID coming in from a recordset but I am not sure how to alter the calculations in the cart object based on quantity dealing with different dynamic price ranges.

any help would be appreciated.

thanks vjc

## 9/22/2009 5:13 pm  |  #2 Jason ByrnesWebAssist

You will need to create new columns in the cart to hold the price for each range, then in the add to cart button, have the price for that range for that product added to the cart.

You can then use the price range column in the calculation. So you would have the columns: [Price] [PriceRange1] [PriceRange2] [PriceRange3]

then you could your you calculation as:
(abs([Qunatity]>0 && [Qunatity] <= 5) * ([Price] * [Quantity])) + (abs([Qunatity]>5 && [Qunatity] <= 10) * ([PriceRange1] * [Quantity])) + (abs([Qunatity]>10 && [Qunatity] <= 15) * ([PriceRange2] * [Quantity])) + (abs([Qunatity]>15 ) * ([PriceRange3] * [Quantity]))

Your ranges will be different, I was using 1-5, 6-10, 11-15, greater then 15

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