Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Order notification email missing some of the details View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 11/13/2011 8:11:12 PM
   
Order notification email missing some of the details
Hi,

I am making an e-commerce site and having problems with the order notification emails.
Emails are missing product and order details but they are having all the user details
Below is the screenshot of the emails:
User image

Below is the code I am using in my email template:


<html><head></head><body>
<table width="600" cellspacing="0" cellpadding="5" bordercolor="black" border="1">
<tbody>
<tr>
<td height="50" valign="bottom" colspan="2">
<table height="100%" width="100%">
<tbody>
<tr>
<td style="text-align: left; vertical-align: bottom;"><span style="font-size: 18pt;">Your order</span></td>
<td style="text-align: center; vertical-align: middle;"><span style="font-family: Garamond,Times,serif; font-size: 24pt; font-style: italic;">Scott Crawford</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="text-align: left;"><br />
<table width="100%">
<tbody>
<tr>
<td valign="bottom" style="text-align: left;"><strong>Invoice number:</strong></td>
<td style="text-align: right; padding-right: 10px;">{%INVOICENUMBER%}</td>
</tr>
</tbody>
</table>
</td>
<td style="text-align: left;"><br />
<table width="100%">
<tbody>
<tr>
<td valign="bottom" style="text-align: left;"><strong>Order date:</strong></td>
<td style="text-align: right; padding-right: 10px;">{%ORDERDATE%}</td>
</tr>
<tr>
<td valign="bottom" style="text-align: left;"><strong>Order status:</strong></td>
<td style="text-align: right; padding-right: 10px;">{%OrderStatus.StatusDisplayName%}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>



Has anyone came across this issue before?

Thanks
Gitesh Shah





User avatar
Member
Member
kentico_michal - 11/14/2011 2:01:16 AM
   
RE:Order notification email missing some of the details
Hello,

Could you please try to apply the latest hotfix 6.0.4? There was a bug related to backward compatibility of some old macros used in e-mail templates. From your description it seems to be the same issue.

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 11/14/2011 3:10:41 PM
   
RE:Order notification email missing some of the details
Thanks Michal,

Applied the hotfix and it works perfectly now.

Thanks for helping.

Cheers
Gitesh Shah

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 11/21/2011 3:16:05 PM
   
RE:Order notification email missing some of the details
HI Michal,

One more question on the macros in that email.

I am using this macro : {%TOTALPRICE%}

This is giving me price as 360 instead of 360.00

Is there any way of getting the value with decimals?

Thanks
Gitesh Shah

User avatar
Member
Member
kentico_michal - 11/22/2011 6:02:44 AM
   
RE:Order notification email missing some of the details
Hello,

By default, the total price is formatted according to Currency formatting string property in the currency settings. So, it should be possible to change the way it is displaying by changing this property. For some possible values, please take a look at following article: String format double.

If you do not want change the Currency formatting string for some other reasons, you can still override the OrderInfoProvider.GetTotalPrice method, as shown here: E-commerce 6-New customization model.

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 11/22/2011 3:19:58 PM
   
RE:Order notification email missing some of the details
Hi Michal,

I have tried different Currency formatting strings. They are working fine on the website.

But for some reason the Email Template macro: {%TOTALPRICE%} is not understanding this Currency Formating String.

I have used the below Currency formating string: $ {0:0.00}

Still the email template is not showing the dollar sign and the decimal values.

Thanks
Gitesh Shah

User avatar
Member
Member
kentico_michal - 11/24/2011 9:22:44 AM
   
RE:Order notification email missing some of the details
Hello,

Yes, you are right. I am sorry for incorrect answer, but the macro {%TOTALPRICE%} returns just a number by default for purposes of backward compatibility.
If you want to display formatted price with the dollar sign, you will need to use the new way of adding macros: {%TotalPrice.Format(Currency.CurrencyFormatString)%}

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 11/24/2011 2:45:22 PM
   
RE:Order notification email missing some of the details
Thanks Michal,

That works great.

Cheers
Gitesh Shah