close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Prices varies by Quantity

Thread began 1/13/2011 9:54 am by kingston.andrew401728 | Last modified 1/14/2011 8:11 am by kingston.andrew401728 | 8426 views | 5 replies

kingston.andrew401728

Prices varies by Quantity

Hi,
I have a list of products where the price per item varies depending on how many are being purchased. Its quite straightforward really - the more you buy the cheaper the product gets.
For example:

1 - 99 - €32 each
100 - 199 - €30 each
200+ - €28 each

I setup a separate table in my database to store these details and each one is tied to a product using the product ID.

I have managed to write some code into my products page to check what price to use according to the quantity selected, which works well, but the problem I have is if the person changes the quantity, either by adding more products through the products page or by changing the quantity in the shopping cart. If they change the quantity it continues to use the initial price regardless.

So basically I'm wondering how I can ensure it runs the same check again. Perhaps I need to clear out the price for the item in the session but I don't know how to do that. Alternatively I'm thinking maybe my code to check the quantity should be in the ecart1_PHP.php file but I have no idea where I would need to put it in there.

I hope this all makes sense. Please let me know if you need more details.

Thanks,
Andrew.

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