close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

adding Rules

Thread began 11/08/2010 8:07 am by elewis93815 | Last modified 11/10/2010 11:23 am by CraigR | 2969 views | 13 replies |

elewis93815

adding Rules

Hi,

I would like to know if someone can tell me how to add rules to an oder page i.e. minimum order of a products - customer must order a minimum of 6 cupcakes.

Thanks

Erick

Sign in to reply to this post

CraigRBeta Tester

are you looking to have a minimum order of 6 cupcakes in total, or 6 of any particular kind ?

Sign in to reply to this post

elewis93815

Hello Craig,

6 of a particular kind

Thanks

Erick

Sign in to reply to this post

CraigRBeta Tester

Ok, here's the next question.

Do you only want to sell in multiples of 6, or would a customer be able to add, for example, 8 to their cart ?

Sign in to reply to this post

elewis93815

The customer can order any number more than 6, so say 6, or more - but no less than 6

Sign in to reply to this post

CraigRBeta Tester

Do you have validation toolkit or one of the WA apps which include validation toolkit?

you could try adding server side validation to your page with the add to cart form, checking for the quantity value in the add to cart form.

you would also need to do something similar on your cart page, so if the customer removes items from the cart to below 6 of any one item, they get a similar warning

Sign in to reply to this post

elewis93815

Yes we do have Server and Client validation webassist tools, can you provide me with an examples of:
Validation trigger
Validation type
server variable

Thanks again

Erick

Sign in to reply to this post

CraigRBeta Tester

ok.

Assuming you are on your page with an add to cart form...

the validation trigger would be either any form post or cartname_ATC_button press

the validation type would be number

the server variable would be the add to cart form quantity field.

when you add the validation, set the minimum number to 6.

you then need to add the validation show if code

there is a validation toolkit guide here

validation-toolkit/

Sign in to reply to this post

elewis93815

Do we use "server" or "client" validation? We have attempted both without luck. In the last post you stated to choose the quantity field from the server variables, we are not seeing that as an option.

Any direction is appreciated.

Thanks Erick

all files are attached

Attached Files
serverValidationCUPCAKE.zip
Sign in to reply to this post

CraigRBeta Tester

i modified cupcakes.php as you had a lot of duplicate code in there.

I set up server side validation for add to cart form 3, which is for all simple cupcakes.

i also changed your recordsets so all data comes from a table called cupcake1, (as i had this table with all of your items which i used to help you with your image display in an earlier post) and just filtered by product type

if you take a look at the code, it should be clear.

attached is the updated page

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