Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Ecommerce -> trying to add IF statment to product options View modes: 
User avatar
Member
Member
eagleag - 9/22/2009 7:51:04 AM
   
Ecommerce -> trying to add IF statment to product options
HI,
I've added a product options that looks like this:
User image

I would like to have it that when someone chose one of the radio buttons, that another product option will appear- depending on what the client chooses.

I tried using this code in the transformation:

<% if (Eval("chooseItemWeightPrice") == "Items"){ "<b>dsfsdfsdfsd</b>" } %>


but not sure how to find out the the field name is for the different radio button options.
And even if I had that how would I add another product option to appear?
Is something lik this possible:

<div class="productOptions">
<uc1:CartItemSelector id="cartItemSelector" runat="server" SKUID='<%# ValidationHelper.GetInteger(Eval("SKUID"), 0) %>' SKUEnabled='<%# ValidationHelper.GetBoolean(Eval("SKUEnabled"), false) %>' AddToCartImageButton="btn-add-to-cart.gif" ShowProductOptions="true" ShowUnitsTextBox="true"
AddToWishlistImageButton="" ShowTotalPrice="true" />
<br/ >

<% if (Eval("chooseItemWeightPrice") == "Items"){
//have the CartItemSelector control apper again but only with the new product
//options
/>

} %>
</div>


Thanks for helping :)

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 9/29/2009 6:19:21 AM
   
RE:Ecommerce -> trying to add IF statment to product options
Hi,

I am sorry we do not support such behavior with our product options in ShoppingCartItemSelector.

I have an idea that you could develop a custom control with standard ASP.NET radio buttons and your options and ensure this behavior in the code behind. You would use it instead of ShoppingCartItemSelector.

Then you could use the link with Query strings to add the product with requested options/quantity to shopping cart. Please see here: http://devnet.kentico.com/docs/ecommerceguide/adding_items_to_the_shopping_c.htm for more details.

Best regards,
Helena Grulichova