Guest User

Untitled

a guest
Jan 19th, 2018
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.31 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-16"?><OrderTransaction
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cipd.co.uk/webServices/CIPDNAT"> <BillingAddress> <string>CIPD</string> <string>151 The Broadway</string> <string /> <string>Wimbledon</string> <string> </string> <string>SW19 1JQ</string> <string /> <string>GB</string> </BillingAddress> <DeliveryAddress /> <PaymentMethod>invoice</PaymentMethod> <FirstName>Chris </FirstName> <Surname>Mathews</Surname> <OrderDate>2018-01-18T10:32:18+00:00</OrderDate> <OrderId>123456789</OrderId> <OrderTotal>598.8</OrderTotal> <OrderTotalExVAT>499</OrderTotalExVAT> <OrderTotalVAT>99.8</OrderTotalVAT> <Items> <TransactionItem> <ItemName>Law On Tour Spring 2018</ItemName> <Price>598.8</Price> <Quantity>1</Quantity> <PriceExVAT>499</PriceExVAT> <PriceVAT>99.8</PriceVAT> <URL>http://shop.cipd.co.uk/shop/cipd-training/law-on-tour?___SID=U</URL> <ProductType>COURSE</ProductType> </TransactionItem> </Items> <PostageAndPacking>0</PostageAndPacking> <PostageAndPackingExVAT>0</PostageAndPackingExVAT> <PostageAndPackingVAT>0</PostageAndPackingVAT> <ProductType>COURSE</ProductType></OrderTransaction>
  3.  
  4. %%[
  5. var @xml, @orderNumber, @items, @numItems, @itemName, @rowItem, @price, @quantity, @priceExVat, @priceVat, @url, @productType
  6. var @orderTotal, @orderTotal, @orderTotalExVat, @orderTotalVat
  7. var @firstName, @surname, @paymentMethod
  8. var @tempxml, @xmlItem, @pitems_rows
  9.  
  10. set @xml = "<OrderTransaction><FirstName>Chris </FirstName><PaymentMethod>invoice</PaymentMethod><OrderId>123456789</OrderId><OrderTotal>598.8</OrderTotal><OrderTotalExVAT>499</OrderTotalExVAT><OrderTotalVAT>99.8</OrderTotalVAT><Items><TransactionItem><ItemName>Law On Tour Spring 2018</ItemName><Price>598.8</Price><Quantity>1</Quantity><PriceExVAT>499</PriceExVAT><PriceVAT>99.8</PriceVAT> <URL>http://shop.cipd.co.uk/shop/cipd-training/law-on-tour?___SID=U</URL><ProductType>COURSE</ProductType></TransactionItem></Items></OrderTransaction>"
  11.  
  12. set @xml = confirmation_xml
  13.  
  14.  
  15. set @orderNumber = order_number
  16. set @firstName = Field(Row(BuildRowSetFromXML(@xml, "/OrderTransaction/FirstName"),1), "Value")
  17. set @paymentMethod = Field(Row(BuildRowSetFromXML(@xml, "/OrderTransaction/PaymentMethod"), 1), "Value")
  18. set @items = BuildRowSetFromXML(@xml, "/OrderTransaction/Items")
  19. set @tempxml = concat("<root>", Field(Row(@items, 1), "xml"), "</root>")
  20. set @items_rows = BuildRowSetFromXML(@tempxml, "//TransactionItem")
  21. set @numItems = RowCount(@items_rows)
  22. set @orderTotal = Format(Field(Row(BuildRowSetFromXML(@xml, "/OrderTransaction/OrderTotal"),1), "Value"), "#,#.00;-#,#.00")
  23. set @orderTotalExVat = Format(Field(Row(BuildRowSetFromXML(@xml, "/OrderTransaction/OrderTotalExVAT"),1), "Value"), "#,#.00;-#,#.00")
  24. set @orderTotalVat = Format(Field(Row(BuildRowSetFromXML(@xml, "/OrderTransaction/OrderTotalVAT"),1), "Value"), "#,#.00;-#,#.00")
  25. ]%%
  26. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  27. <html xmlns="http://www.w3.org/1999/xhtml">
  28.  
  29. <meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" name="viewport" />
  30. <meta content="telephone=no" name="format-detection" />
  31. <meta content="IE=9; IE=8; IE=7; IE=edge" http-equiv="X-UA-Compatible" />
  32. <title>Confirmation Email</title>
  33.  
  34. <body>
  35. <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" border="0" cellspacing="0" cellpadding="0" width="100%">
  36. <tbody>
  37. <tr>
  38. <td style="padding: 0 0 20px 0; font-family: Arial,sans-serif; font-size: 24px; color: #da1d52; line-height: 34px;">Order Confirmation - %%order_number%%</td>
  39. </tr>
  40. <tr>
  41. <td><b>Dear %%=v(@FirstName)=%%</b></td>
  42. </tr>
  43. <tr>
  44. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;">Thank you for your order ID %%=v(@orderNumber)=%%, this has now been processed.%%[ if @paymentMethod == "invoice" then ]%% Your invoice will be emailed within 2 working days.%%[ endif ]%%
  45. </td>
  46. </tr>
  47. <tr>
  48. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;">Your course booking is now subject to terms and conditions as agreed. Notification of transfer or cancellation must be made in writing and failure to attend will result in any applicable penalty fees.</td>
  49. </tr>
  50. <tr>
  51. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;">Joining instructions will be sent to you via email three to four weeks before any event which will confirm the programme details and start time. They will also include a map for the venue, any applicable pre-course reading and details of any other requirements. Joining instructions are sent once the venue has been confirmed so please do not book travel or accommodation until you are in receipt of these. If you have not received these 10 days prior to the course please contact the Events Registrar Team on the number below. Lunch is provided on all CIPD training courses. The dress code is &lsquo;smart casual&rsquo;.</td>
  52. </tr>
  53.  
  54. <tr>
  55. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;">
  56. <table class="cta" align="center" border="0" cellspacing="0" cellpadding="0" width="95%">
  57. <tbody>
  58. <tr>
  59. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444; text-decoration: underline;" align="left" width="90"><b></b></td>
  60. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444; text-decoration: underline;" align="left" width="*"><b>Product Name</b></td>
  61. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444; text-decoration: underline;" align="left" width="10"><b>Quantity</b></td>
  62. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444; text-decoration: underline;" align="right" width="80"><b>Price</b></td>
  63. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444; text-decoration: underline;" align="right" width="60"><b>VAT</b></td>
  64. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444; text-decoration: underline;" align="right" width="80"><b>Total</b></td>
  65. </tr>
  66. <tr>
  67. <td align="left" width="*">&nbsp;</td>
  68. <td align="left" width="50">&nbsp;</td>
  69. </tr>
  70. %%[ for @i = 1 to @numItems do
  71. set @rowItem = Row(@items_rows, @i)
  72. set @xmlItem = concat("<root>", Field(@rowItem, "xml"), "</root>")
  73. set @itemName = Field(Row(BuildRowSetFromXML(@xmlItem, "//ItemName"),1), "Value")
  74. set @price = Format(Field(Row(BuildRowSetFromXML(@xmlItem, "//Price"),1), "Value"), "#,#.00;-#,#.00")
  75. set @quantity = Field(Row(BuildRowSetFromXML(@xmlItem, "//Quantity"),1), "Value")
  76. set @priceExVat = Format(Field(Row(BuildRowSetFromXML(@xmlItem, "//PriceExVAT"),1), "Value"), "#,#.00;-#,#.00")
  77. set @priceVat = Format(Field(Row(BuildRowSetFromXML(@xmlItem, "//PriceVAT"),1), "Value"), "#,#.00;-#,#.00")
  78. set @url = Field(Row(BuildRowSetFromXML(@xmlItem, "//URL"),1), "Value")
  79. set @productType = Field(Row(BuildRowSetFromXML(@xmlItem, "//ProductType"),1), "Value")
  80. ]%%
  81. <tr>
  82. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="left" valign="top" width="90">
  83. Training
  84. </td>
  85. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="left" width="*">%%=v(@itemName)=%%</td>
  86. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="left" width="10">%%=v(@quantity)=%% </td>
  87. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="right" width="60">&pound;&nbsp;%%=v(@priceExVat)=%%</td>
  88. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="right" width="60">&pound;&nbsp;%%=v(@priceVat)=%%</td>
  89. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="right" width="60">&pound;&nbsp;%%=v(@price)=%%</td>
  90. </tr>
  91. %%[ next ]%%
  92. <tr>
  93. <td align="left" width="*">&nbsp;</td>
  94. <td align="left" width="50">&nbsp;</td>
  95. </tr>
  96. <tr>
  97. <td align="left" width="*">&nbsp;</td>
  98. <td align="left" width="50">&nbsp;</td>
  99. </tr>
  100. <tr>
  101. <td align="left" width="*" colspan="3"><b>Order Total:</b></td>
  102. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="right" width="60">&pound;&nbsp;%%=v(@orderTotalExVat)=%%</td>
  103. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="right" width="60">&pound;&nbsp;%%=v(@orderTotalExVat)=%%</td>
  104. <td style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; color: #444444;" align="right" width="60">&pound;&nbsp;%%=v(@orderTotal)=%%</td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. </td>
  109. </tr>
  110.  
  111.  
  112.  
  113.  
  114.  
  115. <tr>
  116. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;"><b>Short course purchase queries</b></td>
  117. </tr>
  118. <tr>
  119. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;">
  120. If you have a question about your short course purchase, please <a href="mailto:eventsregistrar@cipd.co.uk?subject=Short%20course%20purchase%20query" style="color:#da1d52;">email our events registrars team</a> or call us on +44 (0)208 612 6095 Monday to Friday, 09:00 - 17:30.
  121. </td>
  122. </tr>
  123. <tr>
  124. <td style="padding: 0 0 15px 0; font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;">Thank you</td>
  125. </tr>
  126. <tr>
  127. <td style="font-family: Arial,sans-serif; font-size: 14px; color: #303b44; line-height: 23px;"><b>CIPD</b></td>
  128. </tr>
  129. </tbody>
  130. </table>
  131.  
  132. </td>
  133. </tr>
  134. <tr>
  135. <td style="padding: 20px; font-family: Arial,sans-serif; font-size: 22px; color: #ffffff; line-height: 32px;" bgcolor="#da1d52"></td>
  136. </tr>
  137. <tr>
  138. <td style="padding: 20px;" bgcolor="#fafafa">
  139. <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" border="0" cellspacing="0" cellpadding="0">
  140. <tbody>
  141. <tr>
  142. <td style="padding: 0 0 10px 0; font-family: Arial,sans-serif; font-size: 12px; color: #8f9194; line-height: 21px;" align="center">Chartered Institute of Personnel and Development (CIPD), 151 The Broadway, London SW19 1JQ. Incorporated by Royal Charter. Registered as a charity in England & Wales (1079797) and Scotland (SC045154).</td>
  143. </tr>
  144. <tr>
  145. <td style="font-family: Arial,sans-serif; font-size: 12px; color: #8f9194; line-height: 21px;" align="center">CIPD Enterprises Limited values your privacy. To view how we use or share your information and to change your privacy preferences visit &nbsp;<font color="#da1d52"><a style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; color: #da1d52; background-color: #f6f6f6;" href="http://www.cipd.co.uk/site-terms/privacy-policy.aspx" target="_blank"><font color="#da1d52">www.cipd.co.uk/site-terms/privacy-policy.aspx</font></a></font><span style="font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; background-color: #f6f6f6;">&nbsp;This is subject to CIPD Enterprises Limited shopping terms and conditions. Please refer to our website: <font color="#da1d52"><a style="color: #da1d52;" href="http://www.cipd.co.uk"><font color="#da1d52">www.cipd.co.uk</font></a></font></span></td>
  146. </tr>
  147. </tbody>
  148. </table>
  149. </td>
  150. </tr>
  151. </tbody>
  152. </table>
  153. <!--[if (gte mso 9)|(IE)]>
  154. </td>
  155. </tr>
  156. </table>
  157. <![endif]--></td>
  158. </tr>
  159. </tbody>
  160. </table>
  161.  
  162. </body>
  163.  
  164.  
  165.  
  166. </html><custom name="opencounter" type="tracking"/>
Add Comment
Please, Sign In to add comment