Sample email templates

186 views
Skip to first unread message

yale.sc...@gmail.com

unread,
Sep 13, 2021, 11:57:57 PM9/13/21
to XMPie Interest Group
Good evening,

I am wondering if anyone would be willing to share with me their message template for showing all of the products ordered. I tried to modify the "Order Submission in Customer App - Detailed" message template but all I am seeing in my test order of 2 products is:

2021-09-13 20_56_11-Window.png

I'm not sure why the specs of the 2 products are not showing under the column headings.

Thanks,

Yale

couch

unread,
Sep 14, 2021, 12:39:23 AM9/14/21
to XMPie Interest Group
The default message template for #5 is below, but I have a feeling that maybe there is some other problem:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html"/><xsl:variable name="DownloadableCount" select="count(//Sqls/OrderProductList/Row[DownloadOutput!=''])"/><xsl:variable name="FormatPattern" select="//Sqls/Order/Row/FormatPattern"/><xsl:decimal-format name="DecimalFormat" decimal-separator="," grouping-separator="."/><xsl:template match="/">Dear <xsl:value-of select="//Sqls/CustomerName/Row/FirstName"/> <xsl:value-of select="//Sqls/CustomerName/Row/LastName"/>, <br/><br/>Thank you for your order. <br/><br/>Your order number is: <xsl:value-of select="//Sqls/Order/Row/EncryptedOrderId"/>. <br/><br/>The product(s) you ordered are: <br/><table border="1" cellpadding="4" cellspacing="2" style="border-collapse:collapse"><tr style="background-color:#eeeeee;"><td>Item #</td><td>Product Name</td><td>Quantity</td><xsl:if test="//Sqls/Permission/Row/IsPriceAllowed = 'True'"><td>Total Price</td></xsl:if><xsl:if test="//OrderDetailsUrl and $DownloadableCount&gt;0"><td/></xsl:if><xsl:if test="//Sqls/OrderProductList/Row/IsPack = 'True'"><td/></xsl:if></tr><xsl:for-each select="//Sqls/OrderProductList/Row"><tr><td><xsl:value-of select="OrderProductID"/></td><td><xsl:if test="IsKitItem = 'True'"><xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text></xsl:if><xsl:value-of select="Name"/></td><td><xsl:value-of select="TotalQuantity"/>  <xsl:value-of select="ProductUnitName"/><xsl:if test="IsPack = 'True'">*</xsl:if></td><xsl:if test="//Sqls/Permission/Row/IsPriceAllowed = 'True'"><td><xsl:if test="((RawTotalPrice != 0) or ((IsKitItem = 'False') and (IsKit = 'False')))"><xsl:value-of select="TotalPrice"/></xsl:if></td></xsl:if><xsl:if test="//OrderDetailsUrl and $DownloadableCount&gt;0"><td><xsl:if test="DownloadOutput!=''"><xsl:element name="a"><xsl:attribute name="href"><xsl:value-of select="//OrderDetailsUrl"/></xsl:attribute>Download</xsl:element></xsl:if></td></xsl:if><xsl:if test="//Sqls/OrderProductList/Row/IsPack = 'True'"><td><xsl:if test="IsPack = 'True'">* <xsl:value-of select="ProductUnitConversionString"/></xsl:if></td></xsl:if></tr></xsl:for-each></table><xsl:if test="//Sqls/Permission/Row/IsPriceAllowed = 'True'"><br/><table border="1" cellpadding="4" cellspacing="2" style="border-collapse:collapse;"><tr><td style="background-color:#eeeeee;">Subtotal Price:</td><td><xsl:value-of select="//Sqls/OrderProductList/Row/OrderAmount"/></td></tr><xsl:if test="//Sqls/OrderSummary/Row/ShowDeliveryPrice = 'True'"><tr><td style="background-color:#eeeeee;">Shipping and Handling:</td><td><xsl:value-of select="//Sqls/OrderSummary/Row/DeliveryPriceFormatted"/></td></tr></xsl:if><tr><td style="background-color:#eeeeee;">Tax:</td><td><xsl:value-of select="//Sqls/OrderProductList/Row/TaxAmount"/></td></tr><xsl:if test="//Sqls/Order/Row/CouponCode != ''"><tr><td style="background-color:#eeeeee;">Coupon # <xsl:value-of select="//Sqls/Order/Row/CouponCode"/>:</td><td>- <xsl:value-of select="//Sqls/Order/Row/CouponDiscountAmount"/></td></tr></xsl:if><tr><td style="background-color:#eeeeee;">Total Price:</td><td><xsl:value-of select="//Sqls/OrderProductList/Row/BillAmount"/></td></tr></table></xsl:if><br/><b>Payment Details:</b>  <xsl:value-of select="//Sqls/Order/Row/PaymentMethod"/><br/><xsl:if test="//Sqls/Order/Row/ClearingResult/UserData/PaymentDisplayString"><xsl:value-of select="//Sqls/Order/Row/ClearingResult/UserData/PaymentDisplayString" disable-output-escaping="yes"/><br/></xsl:if><xsl:if test="//Sqls/Order/Row/ClearingResult/UserData/ThirdParty">Third Party: <xsl:value-of select="//Sqls/Order/Row/ClearingResult/UserData/ThirdParty"/><br/>PO number: <xsl:value-of select="//Sqls/Order/Row/ClearingResult/UserData/ThirdPartyOrderNumber"/><br/></xsl:if><br/>Sincerely Yours, <br/>The <xsl:value-of select="//Sqls/StoreName/Row/StoreName"/> team. <xsl:if test="//Sqls/Merchant/Row/AddressID&gt;0"><br/><br/><img src="{//Parameters/MerchantLogo}"/><br/><div><table id="tblAddressDetails"><tr><td><span id="lblCompany"><xsl:value-of select="//Sqls/Merchant/Row/Company"/></span></td></tr><xsl:if test="//Sqls/Merchant/Row/TaxRegistration!=''"><tr><td><span id="lblTaxRegistrationHeading">Tax registration:</span><span id="lblTaxRegistration"><xsl:value-of select="//Sqls/Merchant/Row/TaxRegistration"/></span></td></tr></xsl:if><xsl:if test="//Sqls/Merchant/Row/Address1!=''"><tr><td><span id="lblAddress1"><xsl:value-of select="//Sqls/Merchant/Row/Address1"/></span></td></tr></xsl:if><xsl:if test="//Sqls/Merchant/Row/Address2!=''"><tr><td><span id="lblAddress2"><xsl:value-of select="//Sqls/Merchant/Row/Address2"/></span></td></tr></xsl:if><tr><td noWrap="noWrap" xml:space="preserve"><span id="lblCity"><xsl:value-of select="//Sqls/Merchant/Row/City"/></span><span id="lblState"><xsl:value-of select="//Sqls/Merchant/Row/StateName"/></span><span id="lblZip"><xsl:value-of select="//Sqls/Merchant/Row/Zip"/></span></td></tr><tr><td><span id="lblCountry"><xsl:value-of select="//Sqls/Merchant/Row/CountryName"/></span></td></tr><xsl:if test="//Sqls/Merchant/Row/Phone!=''"><tr><td><span id="lblPhone"><xsl:value-of select="//Sqls/Merchant/Row/Phone"/></span></td></tr></xsl:if><xsl:if test="//Sqls/Merchant/Row/Fax!=''"><tr><td><span id="lblFax"><xsl:value-of select="//Sqls/Merchant/Row/Fax"/></span></td></tr></xsl:if><xsl:if test="//Sqls/Merchant/Row/Email!=''"><tr><td><span id="lblEmail"><xsl:value-of select="//Sqls/Merchant/Row/Email"/></span></td></tr></xsl:if></table></div></xsl:if></xsl:template></xsl:stylesheet>

yale.sc...@gmail.com

unread,
Sep 15, 2021, 11:54:08 PM9/15/21
to XMPie Interest Group
Hi Steve,

Thanks for sending the Message Template. I was able to get it to work and I am now customizing the email. The customer I am working with is migrating from PageFlex to uStore and I am trying to make the uStore emails look closer to the PageFlex. So far it is coming along well. How can I retrieve the product thumbnail so I can show it on the order detail page?

Thanks,

Yale

couch

unread,
Sep 16, 2021, 1:11:08 AM9/16/21
to XMPie Interest Group
It's possible, but not as simple as you would want. The location of the thumbnail varies depending on the product type, and also, the locations are not shared to IIS. (XMPie uses an image proxy to deliver the images rather than direct links.) So, you end up having to either expose the thumbnail folders to the internet via  IIS or write a similar proxy/handler.

Anyhow...
From the orderproduct table, you can get the productID and join to the doc table. From the doc table, use the DocTypeId to get the document type from the docType table.
Now you know what type of document is ordered, the location to get the thumbnails from:
1) static:   X:\XMPie\uStore\App\uStoreShared\ProductImages\Store_XXX\Product_XXXX\Pages\Thumbnails
2) dynamic: from the proof table, use the orderproductid to get the cache location and file extension. The path will be  X:\XMPie\uStore\App\uStoreShared\ + cacheLocation + '.' + fileExtension
If you are delivering pdf proofs, then you will have to use the default thumbnail for the product instead of the customized proof - unless you go the proxy route and convert it.

Personally, I think XMPie needs to add it to the default order confirmation template, but this feature request is not high on the list at the moment. 


Reply all
Reply to author
Forward
0 new messages