Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > auto convert measurment in product transformation View modes: 
User avatar
Member
Member
eagleag - 8/31/2009 3:18:16 AM
   
auto convert measurment in product transformation
Hi again :)

I have a product that when you create it in cmsdesk you can choose a measurement type (kg, L, ml etc.) and then the amount.

I would like the actual product page on the site to display what I entered + a conversion of this measurement. this should be done automatically.

I sure it is possibel throw the transformation.
this is the line in the transformation that displays the amounts:

<td><%# Eval("ProductAmount") %> - <%# Eval("ProductAmountType") %></td>


This auto convert system should be able to convert liters to OZ., KG to pounds and it should know when to convert each one to the other :)

any ideas how to accomplish this?

Thanks

User avatar
Member
Member
kentico_pavelk - 9/1/2009 2:41:37 AM
   
RE:auto convert measurment in product transformation
Hello,

You can use custom function that gets ProductAmount and ProductAmountType as parameters and returns converted value. You can find more information about this in our Developer's guide:
http://devnet.kentico.com/docs/devguide/index.html?adding_custom_functions_to_transformations.htm


Best Regards,
Pavel Knotek