close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Setting Maximum Quantities

Thread began 5/28/2009 6:03 am by jenbar3378469 | Last modified 5/29/2009 9:40 am by Ray Borduin | 3545 views | 10 replies |

jenbar3378469

Setting Maximum Quantities

Hi, I need to set items so the online buyer cannot order more than a set maximum per item. For instance, a site that allows sales reps to order catalogs would not be able to order more than 25 of a particular catalog. How do you suggest I do this so that if they attempt to put in more than 25 in the quantity column, it will not let them do so.

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

I would create a column in the cart called MaxQty.

Then I would create a calculation:
TrueQty = (([Quantity]<[MaxQty])?[Quantity]:[MaxQty])

Finally I would Update the TotalWeight and TotalPrice Calculations to:
TotalPrice = (([Quantity]<[MaxQty])?[Quantity]:[MaxQty]) * [Price]
TotalWeight = (([Quantity]<[MaxQty])?[Quantity]:[MaxQty]) * [Weight]

Then wherever I display the quantity I would display the MaxQty instead.

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

jenbar3378469

Thanks Ray, but when you say where ever I display the quantity you would display the max quantity instead. Where? And in your code, where do I put the max qty amount, for example 25, how does the software know the max quantity. Please forgive my ignorance. I truly appreciate your help.

Sign in to reply to this post

Ray BorduinWebAssist

You would update the add to cart button to set the max quantity.

Probably the only place you display your quantity is on your cart page, your confirm page, and your pp_confirm page. So just find anywhere on those pages where it has ->displayInfo("Quantity")

and change it to:
->displayInfo("TrueQty")

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

jenbar3378469

Thanks Ray, but I still don't understand how I code in that a buyer can't buy more than 25 of an item. Where does the number "25", for instance go in the code that you wrote?

Sign in to reply to this post

Ray BorduinWebAssist

You added MaxQty as a column to the cart... this means in your add to cart button you can specify a value for it. Specify the value of 25.

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

jenbar3378469

Yes, I can see where you can specify the value, but can I specify a max value in the "add to cart" button so that it won't let them order more than the 25. I also wouldn't want it to populate 25 automatically. For instance right now all the defaults are set to 1 per ecart's instructions, I would not want the default set to 25, but rather the customer not be allowed to order more than 25. Sorry for sounding so ignorant.

Sign in to reply to this post

Ray BorduinWebAssist

Just try what I am telling you.... it would still say 1 in the quantity field. Just if they typed more than 25 it would only show 25 in the cart once added. They could change it to a lower number, just not a higher one.

What I am telling you to do will accomplish what you are trying. Please try it and then describe what you might not like about this solution. Your arguments against this technique do not seem valid.

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

jenbar3378469

Ray,

Honestly I am not arguing just very confused! You are a great help and I appreciate everything! I will try it and let you know.

Thanks!!!

Sign in to reply to this post

jenbar3378469

Ray,

I added the column "maxQty" to my cart. Now in the bindings on the "Add to Cart" do I put 25 in the default value for the maxQty? Also do I make it updateable and as a text field? Then would I adjust the shopping cart page to display a column that says Max Quantity?

You also said you would just display the maxQty, so do I disable and delete the Quantity column from the bindings and the shopping cart page?

Again, I am just trying to understand and appreciate the help!

Sign in to reply to this post
loading

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