I made a slight modification to the Vendor Notification email template. Here is my html code:
<table class="Email"> <tbody><tr> <td valign="top"><strong>$store.Name</strong><br /> <div style="padding-left: 30px;">$store.DefaultWarehouse.FormatAddress(true) <br />Phone: $store.DefaultWarehouse.Phone <br />Email: $store.DefaultWarehouse.Email</div></td> <td align="right"><h1>Packing Slip</h1> <strong>Order Number</strong>: $order.OrderId<br /> <strong>Order Date</strong>: ${order.OrderDate}</td> </tr> </tbody></table> <p>#foreach( $shipment in $VendorShipments ) #end</p><table class="Email"><tbody><tr> <td><strong>Ship To:</strong> <div style="padding-left: 30px;"><p>$shipment.FormatToAddress(true) <br />Phone: $shipment.ShipToPhone #if ($shipment.ShipMessage.Length > 0) <br /> <strong>Message:</strong> $shipment.ShipMessage #end</p><p> </p><p style="text-align: center;"><span style="color: rgb(255, 0, 0); "><strong>Shipment Method:</strong></span></p> <div style="padding-left: 30px; text-align: center;">$shipment.ShipMethodName</div></div></td> </tr> <tr> <td>#foreach( $orderItem in $VendorItems ) #if ($orderItem.OrderShipmentId == $shipment.OrderShipmentId) #end #end <table width="100%" border="2" align="center"> <tbody><tr> <th class="Email">SKU</th> <th class="Email">Product Name</th> <th class="Email">Options</th> <th class="Email">Quantity</th> </tr><tr> <td style="text-align: center;">$orderItem.Sku</td> <td>$orderItem.Name<br /><font size="2"><strong>$orderItem.LineMessage</strong></font></td> <td>$orderItem.VariantName</td> <td style="text-align: center;">$orderItem.Quantity</td> </tr></tbody></table></td> </tr> <tr> <td style="text-align: center;"><br /> Thank you for your order. If you have any questions, please contact $store.Name</td> </tr></tbody></table>
Now, when the email sends, all I see is this in the email:
Lexical error: NVelocity.Runtime.Parser.TokenMgrError: Lexical error at line 1, column 673. Encountered: "g" (103), after : "&" at NVelocity.Runtime.Parser.Parser.Directive() at NVelocity.Runtime.Parser.Parser.Statement() at NVelocity.Runtime.Parser.Parser.Process() at NVelocity.Runtime.Parser.Parser.Parse(TextReader reader, String templateName)
Also, am I correct that if a customer orders multiple products (say 3 for example) and all 3 are shipped from different warehouses and from different vendors, that 3 of these Vendor Notification emails should be triggered to send (1 to each of the 3 vendors)? I have the trigger for this email to send set for "Payment Captured." The email is triggered appropriately when the payment is captured, but I get the error message above in the email, and only one email is sent when I think multiple emails should be triggered in some cases.
Any help would be greatly appreciated!
Jay
Email Template Problem
Re: Email Template Problem
When some order is placed, vendors information is available for some products and you have configured the Email trigger for vendors then all vendors will receive vendor notification. All vendors will recieve all products information means their own products as well as the other vendors products. If you want to send the vendor specific Email which I think you want to because of you Email template code then you have to send the Email manually. This issue is already discussed in following thread.
viewtopic.php?f=42&t=8571
Now the regarding NVelocity errors, they are there becuase you are trying to use the variable that doesn't exist. For example $VendorShipments, $VendorItems etc. In order to access the NVelocity variable first you need to create them. Read the above posted solution carefully and hopefully you will get things fixed.
viewtopic.php?f=42&t=8571
Now the regarding NVelocity errors, they are there becuase you are trying to use the variable that doesn't exist. For example $VendorShipments, $VendorItems etc. In order to access the NVelocity variable first you need to create them. Read the above posted solution carefully and hopefully you will get things fixed.
Re: Email Template Problem
What's happened is the HTML editor has tried to URL-encode some of the HTML content. It's happened to me several times - I stopped using the HTML editor because it would always mess up the nVelocity scripting if it contained greater-than or less-than comparison symbols like ">" or "<".amgym-jt wrote:Lexical error: NVelocity.Runtime.Parser.TokenMgrError: Lexical error at line 1, column 673. Encountered: "g" (103), after : "&" at NVelocity.Runtime.Parser.Parser.Directive() at NVelocity.Runtime.Parser.Parser.Statement() at NVelocity.Runtime.Parser.Parser.Process() at NVelocity.Runtime.Parser.Parser.Parse(TextReader reader, String templateName)
You'll have to dig through the HTML template - look specifically for where there's a #IF statement. What you'll see is something like ">" in the command where there actually should be a ">". Change the > to > and save it.
There might be more than one, so don't stop looking after you find the first one.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com