Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > EproductsTable for non-eproducts View modes: 
User avatar
Certified Marketer 13
Certified Marketer 13
bruce.williams-thundertech - 1/17/2013 2:40:38 PM
   
EproductsTable for non-eproducts
i have trying to have different language in ecommerce email templates:

1. for just digital (e product types)
2. for just physical products (products)
3. for both

how would i accomplish that?

right now i have the following in Order payment notification to customer:

Thank you for your order. Below you can find the order details.
{%IfDataSourceIsEmpty(EproductsTable, "Your order will be shipped in the next 7-10 business days.",
"Your e-products download links were activated</b>, please download the files before their expiration. Once the files expire, you won't be able to download them." +
EproductsTable.ApplyTransformation("Ecommerce.Transformations.Order_EproductsTable")%}

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/1/2013 11:20:56 AM
   
RE:EproductsTable for non-eproducts
Hi,

You could generally use Localize or GetResourceString methods in your email or invoice template macros.
See Available macro methods article, methods:

String Localize (String inputText, String culture)
Localizes given text (resolves localization macros). This method is overloaded, while the String culture parameter is optional.
String inputText: Text to be localized.
String culture: Required culture of the translation.

The localization macros are described at types of macros article.

String GetResourceString (String resourceStringKey, String culture)
Translates given resource string. This method is overloaded, while the String culture parameter is optional.
String resourceStringKey: Name of the resource string.
String culture: Target culture of the translation.

Should you need any additional details, please feel free to ask.

Regards,
Zdenek

User avatar
Certified Marketer 13
Certified Marketer 13
bruce.williams-thundertech - 2/28/2013 2:28:21 PM
   
RE:EproductsTable for non-eproducts
sorry for being so needy, but can you give me example of how this would then be implemented in context of the email template design?
Thank you for your order. Below you can find the order details. 
{%IfDataSourceIsEmpty(EproductsTable, "If you ordered hard products, your order will be shipped in the next 7-10 business days.",
"Your e-products download links were activated, please download the files within 30 days of purchase. Once the files expire, you won't be able to download them." +
EproductsTable.ApplyTransformation("Ecommerce.Transformations.Order_EproductsTable")%}

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 3/15/2013 10:08:31 PM
   
RE:EproductsTable for non-eproducts
Hi,

You've probably found a way since the last post, but anyway, I think you could use something like:

{%IfDataSourceIsEmpty(
EproductsTable,
GetResourceString("hardProductsOrder", CurrentUser.PreferredCultureCode),
GetResourceString("eProductsOrder", CurrentUser.PreferredCultureCode) +
EproductsTable.ApplyTransformation("Ecommerce.Transformations.Order_EproductsTable")
%}

... where the "hardProductsOrder" and "eProductsOrder" will be the resource strings with the full texts defined in UI (see DevGuide article) or .RESX files
The transformation result could be even outside the condition, as if there are no e-products, the table shouldn't be rendered.

Please let me know if I can be of any further help.

Regards,
Zdenek