# Input for number of pages to calculate pricing

Thread began 6/23/2010 1:36 pm by mrobben375515 | Last modified 6/25/2010 10:21 am by Ray Borduin | 863 views | 4 replies |

## 6/23/2010 1:36 pm  |  #1 mrobben375515

### Input for number of pages to calculate pricing

I would like to have an option where the client types in the number of pages they would like in their book and the price is calculated based on what they input. The base cost for 20 pages and then \$1.50 for every page on top of that. It would probably be at the bottom of a form where they select some other options and then hit submit. Then it would take them to the shopping cart so they can pay for their book. Is something like that possible? I know that I can create a drop down with product options but I don't want to have to make an option for every number from 20 to 100...

## 6/24/2010 4:16 pm  |  #2 mrobben375515

Nevermind that last post, we're just going to make it work in our cart with the advanced options... However, I need to add a base design cost to the cost of the book. The base cost is \$30 and the book cost depends on how many pages. So let's say the book they choose is \$40, if they order 1 it will be \$70...if they order 2=\$110...etc. Is that possible?

## 6/24/2010 4:21 pm  |  #3 Ray BorduinWebAssist

There are a few ways you could do it.

One is to update the calculation:

TotalPrice = [Price] * [Quantity]

to

TotalPrice = ([Price] * [Quantity]) + 30

Did this help? Tips are appreciated...

## 6/24/2010 4:44 pm  |  #4 mrobben375515

That's a quick fix, thanks for the help Ray. The only problem I can think of is that would be the set calculation for every product correct? Is there a way that I can set that for a specific photobook product?

## 6/25/2010 10:21 am  |  #5 Ray BorduinWebAssist

This calculation would only add 30 if the product ID is 2:

TotalPrice = ([Price] * [Quantity]) + (([ID]==2)30:0)

Did this help? Tips are appreciated...

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