kentico_mirekr
-
2/15/2010 1:55:23 PM
RE:Create a Custom Product Option with Open Text?
Hi,
I understand your needs, but I am afraid it is not supported now. It will require heavy customization of the e-commerce.
At first, you can add for example only one field of type boolean. This field can be then editable on the Custom fields for the product option. This will indicate if the text area should be displayed or not.
Then, in the Shopping cart selector (\CMSModules\Ecommerce\Controls\ProductOptions\ShoppingCartItemSelector.ascx.cs) you will need to add the logic, which will check the value from the custom boolean field and display or hide the text area.
There is AddProductToShoppingCart() method in this file. In this method you can see that the URL is being build with the querystring parameters. So, you will need to add new parameter which will hold the data from the text area, so they can be passed to the shopping cart itself. Then, you will also need to modify the shopping cart steps to display the value of this product option.
Then you can store this data in ShoppingCart.CustomData property.
We are already planning to add this feature in one of the next versions.
I hope it will help.
Best regards, Miroslav Remias.
|