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

Prices varies by Quantity

Thread began 1/13/2011 12:54 pm by kingston.andrew401728 | Last modified 1/14/2011 11:11 am by kingston.andrew401728 | 4788 views | 5 replies

Jason ByrnesWebAssist

the specifies depend on how elaborate this is going to be.

will it always have only 3 price breaks? will the breaks always be 1 - 99, 100 - 199 and 200+?

if so, then that's fairly easy, add 2 new columns to the cart lets say we call the, priceB and priceC.

In the add to cart button, the price column will get the initial price: 32, priceB will get the 100 - 199 price: 30 and the priceC column will get the 200+ price: 28

Now in the add top cart button, go to the calculations tab and create a new calculation:

((abs([Quantity] >= 1) && abs([Quantity] <= 99))?[Price]:0)+((abs([Quantity] >= 100) && abs([Quantity] <= 199))?[priceB]:0)+((abs([Quantity] > 200))?[priceC]:0)

you'll then have to edit the total price calculation from:

[Price] * [Quantity]


(((abs([Quantity] >= 1) && abs([Quantity] <= 99))?[Price]:0)+((abs([Quantity] >= 100) && abs([Quantity] <= 199))?[priceB]:0)+((abs([Quantity] > 200))?[priceC]:0)) * [Quantity]

and in the cart, change the code that displays the item price:

<?php echo WA_eCart_DisplayMoney($eCart2$eCart2->DisplayInfo("Price")); ?>

to use the realPrice instead:

<?php echo WA_eCart_DisplayMoney($eCart2$eCart2->DisplayInfo("realPrice")); ?>

Note, in the code above, eCart2 is the name of my cart object, if yours is differant, you will need to change that.

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