Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > ShowUnitsTextBox property View modes: 
User avatar
Member
Member
eng.rupalikulkarni-gmail - 11/5/2012 1:08:02 PM
   
ShowUnitsTextBox property
Hi,

I am using following code at repeater. On click of NEXT item is getting
added to the cart. By default it shows value 1 in text box via
ShowUnitsTextBox property but i want to show 100 by default.

Can you please help me?
<%@ Register
Src="~/CMSModules/Ecommerce/Controls/ProductOptions/ShoppingCartItemSelector.ascx"
TagName="CartItemSelector" TagPrefix="uc1" %>

<div class="addToCart contentBox">

<uc1:CartItemSelector id="cartItemSelector" runat="server"
SKUID='<%# ValidationHelper.GetInteger(Eval("SKUID"), 0) %>'
SKUEnabled='<%# ValidationHelper.GetBoolean(Eval("SKUEnabled"),
false) %> ' AddToCartImageButton="addtocart.gif"
AddToCartLinkText="NEXT" ShowProductOptions="true"
ShowDonationProperties="true" ShowUnitsTextBox="true" />
</div>

Thanks!
Rupali

User avatar
Kentico Support
Kentico Support
kentico_janh - 11/8/2012 3:46:25 AM
   
RE:ShowUnitsTextBox property
Hello,

You need to edit the \CMSModules\Ecommerce\Controls\ProductOptions\ShoppingCartItemSelector.ascx.cs file and update following line:
private int mDefaultQuantity = 1;

to contain 100 instead:
private int mDefaultQuantity = 100;

Best regards,
Jan Hermann

User avatar
Member
Member
eng.rupalikulkarni-gmail - 11/13/2012 11:47:58 AM
   
RE:ShowUnitsTextBox property
Hi,

Its Done!!

I appreciate your help.

Thanks!