close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to limit choices in cart quantity

Thread began 2/03/2011 8:20 am by James L | Last modified 2/05/2011 12:00 pm by Jason Byrnes | 2267 views | 14 replies |

James L

How to limit choices in cart quantity

My client has a product which can be ordered in only 3 quantities: 1, 3, or 5.
On the cart page the Quantity text box accepts any amount. How can I limit the customers choices to change it to only 1, 3, or 5?

Sign in to reply to this post

Jason ByrnesWebAssist

make a note of the name of the quantity text box. then delete it and replace it with a select list.

Set the name of the select list to the same as the text box that you just deleted, and set the values for the select list to use 1,3 or 5

Sign in to reply to this post

James L

I see how that works, but I'm still doing something wrong in the code, because when I make a different choice, it just reverts back to the original quantity.

Here's what I have:

<td class="eC_FormItem">
<select name="coffeeCart_Quantity_<?php echo $coffeeCart->DisplayIndex; ?>" >
<option value="1">1</option>
<option value="3">3</option>
<option value="5">5</option>
</select></td>

Sign in to reply to this post

James L

Obviously this is very wrong, since it always displays 1 even when the input page sent 3.

Sign in to reply to this post

Jason ByrnesWebAssist

the list wont show the quantity you selected to add to the cart, the cart will show the selected quantity.

Sign in to reply to this post

James L

How can I have it do both, the original amount and then the new updated amount?

Sign in to reply to this post

Jason ByrnesWebAssist

I dont understand what you mean, once the quantity is in the cart, the list will just revert back to the original selections.

The quantity list is there to show what _can_ be selected, not what has been selected. go to the cart display page to see what quantity _has_ been selected.

Sign in to reply to this post

James L

Sorry If I've not been clear. What I need is to have a customer select, 1 on the input page, they then click "add to cart", the cart page is displayed and the quantity 1 is displayed and the appropriate price is charged. But when they're on the cart page they may decide to change their order to 3 (with the dropdown list), click "update", and 3 should be displayed and the price will become thrice what it was.

Sign in to reply to this post

Jason ByrnesWebAssist

OK, On the ccart page, you need to replace the quantity text box with an eCart updateable list.

remove the existing quantity filed in the cart display, then go to Insert -> ecart -> Updateable List, set the cart column to quantity.

Sign in to reply to this post

James L

I tried that originally, but if it's an updatable list, aren't I back to the same problem of someone entering an odd number, like 7? I guess I don't understand what are the possibilities with an updatable list.

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