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


Conditional Validation in Display Manager for Minimum Order Quantity

Thread began 7/30/2009 3:48 pm by chris369732 | Last modified 8/03/2009 3:51 pm by CraigR | 2396 views | 4 replies |


Conditional Validation in Display Manager for Minimum Order Quantity

In the shopping cart display manager, customers have the option to change the order quantity. The problem is, how do we validate at that time for the minimum order quantity?

We have the conditional client validation for the minimum order quantity set up in "ADD TO CART" forms on the results and detail pages that have the shopping cart, but once the items are added to the cart, the customers can change the order quantity below the minimum quantity.

I've tried to use client validation, but the field ISRCart_Quantity_<?php echo $ISRCart->DisplayIndex; ?> doesn't appear as a valid form field.

In trying to use server validation, if any of the rows have a order quantity that is below a minimum quantity for any other row, it triggers the validation.



Sign in to reply to this post

Ray BorduinWebAssist

Here is what you can do...

Create a new column in your cart called MinQty and update your add to cart button to store that value.

Then add a calculation to your cart:
TrueQuantity = (([Quantity]>[MinQty])?[Quantity]:[MinQty])

and update the calculation:
TotalPrice = (([Quantity]>[MinQty])?[Quantity]:[MinQty]) * [Price]

Now in your cart display update the value in the textfield form element to show the "TrueQuantity" instead of the "Quantity" and the same thing on the confirm and other pages. Also update your store cart details in database so that the "TrueQuantity" is stored.

Sign in to reply to this post
Did this help? Tips are appreciated...

CraigRBeta Tester

order quantity - read only

Do you want the order quantity to be editable in the cart ?

You could make the quantity non-editable which would prevent the customer changing the quantity.

Sign in to reply to this post


Forcing a minimum quantity in the cart


Thank you very much for the idea. Of course this would prevent quantities below the minimum from being ordered, but without validation text that explains why, it could be confusing and irritating to customers. We've got the minimum quantity validation working well on our results and detail pages and it would be nice to have it in the cart as well. I've done some experimentation since I first posted this and it looks like minimum validation in the cart is a "no go."


We could remove the ability to edit the quantity in the cart, but then if the customer made a mistake or changed their mind, they would have to delete the item and go back to the results or detail page.

At this point, I think we will just move forward with a Spry Tooltip and the honor system.


Sign in to reply to this post

CraigRBeta Tester

I seem to remember setting up a trigger on the cart display page for a site I did a while ago, which produced an alert if the customer changed the order quantity so that it exceeded the stock quantity.

This displayed a warning and disabled the checkout button.

If this would help, I could probably find an example.

Sign in to reply to this post

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