I can see that the template object is correct.(writing it to a log file)
And looking at the exception I can see that it occurs when is rendering the template.
I think that once the notification is made after the browser is closed and skip step 6 (that’s way I need to send a email to the client), the frontend isn’t instantiated.
This is only a guess, I’m a beginner in DW modules development.
If that is true what can I do to resolve it??
templateHTML :
<table width="600" cellspacing="0" cellpadding="0">
<tr>
<td style="padding-bottom: 25px;"><a href="http://www.falesiahotel.com" target="_blank" title="Falésia Hotel"><img src="http://falesiahotel.dev.dynamicweb.pt/Files/System/FalesiaHotel/BarraNewsletter.jpg" alt="Falésia Hotel" width="600" height="100" border="0" /></a>
</tr>
<tr>
<td style="border:1px solid #cccccc;padding:35px;">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td style="font-size:10px; padding-bottom:15px; font-family:Verdana, Helvetica, Arial;">Nova reserva</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td width="80" style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Reserva:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.ID--></td>
</tr>
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Data:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Date--></td>
</tr>
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Nome:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Name--></td>
</tr>
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>E-mail:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Email--></td>
</tr>
<!--@If Defined(Ecom:Order.Customer.Phone)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Telefone:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Phone--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.Phone)-->
<!--@If Defined(Ecom:Order.Customer.Cell)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Telemóvel:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Cell--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.Cell)-->
<!--@If Defined(Ecom:Order.Customer.Address)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Morada:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Address--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.Address)-->
<!--@If Defined(Ecom:Order.Customer.Address2)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Address2--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.Address2)-->
<!--@If Defined(Ecom:Order.Customer.City)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Localidade:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.City--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.City)-->
<!--@If Defined(Ecom:Order.Customer.Country)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>País:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order.Customer.Country--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.Country)-->
<!--@If Defined(Ecom:Order.Customer.Comment)-->
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;" valign="top"><b>Comentários:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;" valign="top"><!--@Ecom:Order.Customer.Country--></td>
</tr>
<!--@EndIf(Ecom:Order.Customer.Comment)-->
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td style="padding-bottom: 8px; border-bottom:3px solid #cccccc; text-align: center; font-size:10px; font-family:Verdana, Helvetica, Arial;" colspan="2"><b>Produto</b></td>
<td style="padding-bottom: 8px; border-bottom:3px solid #cccccc; text-align: center; font-size:10px; font-family:Verdana, Helvetica, Arial;" width="90"><b>Data</b></td>
<td style="padding-bottom: 8px; border-bottom:3px solid #cccccc; text-align: center; font-size:10px; font-family:Verdana, Helvetica, Arial;" width="90"><b>Preço</b></td>
</tr>
<!--@LoopStart(OrderLines)-->
<tr>
<td style="font-size:10px; border-bottom:1px solid #cccccc;" width="120" valign="top"><img src="http://falesiahotel.dev.dynamicweb.pt<!--@Ecom:Product.ImageSmall.Default.Clean-->" alt="<!--@Ecom:Order:OrderLine.ProductName.Short-->" /></td>
<td style="font-size:10px; border-bottom:1px solid #cccccc; font-family:Verdana, Helvetica, Arial;" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td style="font-size:12px; font-family:Verdana, Helvetica, Arial;"><b><!--@Ecom:Order:OrderLine.ProductName.Short--></b></td>
</tr>
<tr>
<td style="font-size:10px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Pensão:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@HotelBooking:Reservation:BoardType--></td>
</tr>
<tr>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Adultos:</b></td>
<td style="font-size:10px; font-family:Verdana, Helvetica, Arial;"><!--@HotelBooking:Reservation:NumberOfAdults--></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="font-size:10px;">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td style="vertical-align:top; font-size:10px; font-family:Verdana, Helvetica, Arial;"><b>Suplementos:</b></td>
<td style="vertical-align:top; font-size:10px; font-family:Verdana, Helvetica, Arial;">
<!--@LoopStart(BOMItems)-->
<!--@Ecom:Order:OrderLine.ProductName.Short--><br />
<!--@LoopEnd(BOMItems)-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="font-size:10px; text-align:center; border-bottom:1px solid #cccccc; font-family:Verdana, Helvetica, Arial;">
<!--@HotelBooking:Reservation:CheckInDate--><br/>a<br/><!--@HotelBooking:Reservation:CheckOutDate-->
</td>
<td style="font-size:12px; text-align:right; border-bottom:1px solid #cccccc; font-family:Verdana, Helvetica, Arial;"><!--@Ecom:Order:OrderLine.TotalPrice--></td>
</tr>
<!--@LoopEnd(OrderLines)-->
<tr>
<td colspan="4" align="right" style="font-size:12px; font-family:Verdana, Helvetica, Arial;"><b>Total <!--@Ecom:Order.Price.PriceFormatted--></b></td>
</tr>
</table>
</td>
</tr>
</table>
The Exception:
Object reference not set to an instance of an object.
at Dynamicweb.eCommerce.Frontend.Renderer.RenderProduct(Product Product, Boolean ExtendedProperties, Template Template, Int32 loopCounter)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderOrderLine(OrderLine OrderLine, Template Template)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderOrderLines(OrderLineCollection OrderLines, Template ParentTemplate, String LoopName)
at Dynamicweb.eCommerce.Frontend.Renderer.RenderOrder(Order Order, Template Template, Boolean ExtendedProperties, Int32 stepReq)
at Dynamicweb.eCommerce.Orders.Order.SendTo(PageView& PageView, String ToMailAddress, String FromMailAddress, Template& MailTemplate)
at Redunicre3PaymentPage.Page_Load(Object sender, EventArgs e)