Page 1 of 1

Quantity of 1 for a product

Posted: Tue Mar 25, 2008 11:49 am
by DBehl
I want to have a product have only a quantity of 1. I believe I can disable the quantity control to restrict this but I don't want to modify code if there is a setting for this?


Thanks for your help.

Posted: Tue Mar 25, 2008 12:26 pm
by streetlightzjon
I may not understand your questions completely.

But heres a shot.


You can set the inventory control and set the stock level at 1 and disable purchase once back ordered :?:

Posted: Tue Mar 25, 2008 12:49 pm
by DBehl
On the product page for this item there is a quantity that is shown . I want it to show a "1" with no ability to change it.

If they want a second product they must add another item to the cart.

When the product is in the shopping cart they cannot change the qualtity either.

This product has a Product Template.

I did notice that if the quantity is changed it still only shows the price calculation as if it is 1, but I don't want the quantity to show as 5.

Frankly I think this is a bug, but if they can't change the quantity then there is no problem. But they can.

Posted: Tue Mar 25, 2008 3:26 pm
by jmestep
Changing this on the BuyProductDialog.ascx to a hidden field with the value of one would probably let them put only one into the basket. But you would have to have other code in the basket to keep them from changing the quantity.
<cb:updowncontrol Width="30" id="Quantity" runat="server" DownImageUrl="~/images/down.gif" UpImageUrl="~/images/up.gif" Columns="2" MaxLength="4" Text='1' onFocus="this.select()"></cb:updowncontrol><asp:CustomValidator ID="QuantityValidaor" runat="server" ValidationGroup="AddToBasket" ErrorMessage="Quantity can not exceed the available stock of {0}." ControlToValidate="Quantity">*</asp:CustomValidator>

Posted: Tue Mar 25, 2008 4:46 pm
by DBehl
Thank you.