close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

stock in order

Thread began 10/27/2009 11:11 am by alhero_94375722 | Last modified 7/20/2010 2:05 pm by alhero_94375722 | 5061 views | 17 replies

Eric Mittman

It seems to me that the problem is the way you are handling the validations and showing the resulting error message. Currently you are only validating the posted element hbCart_1_Quantity_Add. If you were to try and add more that was available for this item it will trigger the server side validation and cause the error message to show.

To make it show the message only shows for a particular product you will first need a way to identify which item on the page was trying to be added. You could store the value of the hbCart_1_ID_Add posted element in a session variable. Then when the validation for the quantity fails you can have a check around the validation show if error message that also checks to see that the current item id is the value held in the session variable.

If you had it setup like this then you would be able to make sure that the message only showed for the id of the item that was posted. For example if you stored the submitted item id in a session variable called itemID you could add an if statement around the validation show if like this:

php:
<?php if ($_SESSION['itemID'] == $row_rsBooks["id_inventory"]){ ?>

 //validation show if code here
<?php ?>

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