close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Minimum quantity in detail, results and cart pages.

Thread began 1/03/2012 11:02 am by bill3786 | Last modified 1/05/2012 8:42 am by bill3786 | 1321 views | 5 replies |

bill3786

Minimum quantity in detail, results and cart pages.

I need to set a minimum quantity of 2 to show on the "add to cart" area of the results and detail pages for the whole product range.

How is this best achieved and also how can I prevent a customer reducing the quantity from 2 to 1 in the cart before checkout?

Sign in to reply to this post

Jason ByrnesWebAssist

in the eCart object, create a new calculation on the calculations tab as:

setQuantity
abs([Quantity] < 2)?[Quantity] = 2:''


this calculation will force the quantity to 2 if it is set to something lower.

in the add to cart button form, you can change the initial value of the quantity text box to 2.

Sign in to reply to this post

bill3786

Thanks, works a treat.

Sign in to reply to this post

bill3786

Is it possible to add a tooltip or popup message when a visitor attempts to reduce the quantity below 2.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to add an onchange event to the quantity text field:

onChange="if(isNaN(this.value) || parseInt(this.value) < 2) {alert('Quantity cannot be less than 2'); this.value = 2;}"
Sign in to reply to this post

bill3786

Thanks, works a treat again.

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

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