Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.42 KB | None | 0 0
  1. {% capture email_title %}Thank you for your purchase! {% endcapture %}
  2. {% capture email_body %}
  3. {% if requires_shipping %}
  4. Hi {{ customer.first_name }}, we're getting your order ready to be shipped. We will notify you when it has been sent.
  5. {% endif %}
  6. {% endcapture %}
  7.  
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. <head>
  11. <title>{{ email_title }}</title>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <meta name="viewport" content="width=device-width">
  14. <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
  15. <style>
  16. .button__cell { background: {{ shop.email_accent_color }}; }
  17. a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
  18. </style>
  19. </head>
  20.  
  21. <body>
  22. <table class="body">
  23. <tr>
  24. <td>
  25. <table class="header row">
  26. <tr>
  27. <td class="header__cell">
  28. <center>
  29.  
  30. <table class="container">
  31. <tr>
  32. <td>
  33.  
  34. <table class="row">
  35. <tr>
  36. <td class="shop-name__cell">
  37. {%- if shop.email_logo_url %}
  38. <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
  39. {%- else %}
  40. <h1 class="shop-name__text">
  41. <a href="{{shop.url}}">{{ shop.name }}</a>
  42. </h1>
  43. {%- endif %}
  44. </td>
  45.  
  46. <td class="order-number__cell">
  47. <span class="order-number__text">
  48. Order {{ order_name }}
  49. </span>
  50. </td>
  51. </tr>
  52. </table>
  53.  
  54. </td>
  55. </tr>
  56. </table>
  57.  
  58. </center>
  59. </td>
  60. </tr>
  61. </table>
  62.  
  63. <table class="row content">
  64. <tr>
  65. <td class="content__cell">
  66. <center>
  67. <table class="container">
  68. <tr>
  69. <td>
  70.  
  71. <h2>{{ email_title }}</h2>
  72. <p>{{ email_body }}</p>
  73. {% if order_status_url %}
  74. <table class="row actions">
  75. <tr>
  76. <td class="actions__cell">
  77. <table class="button main-action-cell">
  78. <tr>
  79. <td class="button__cell"><a href="{{ order_status_url }}" class="button__text">View your order</a></td>
  80. </tr>
  81. </table>
  82. {% if shop.url %}
  83. <table class="link secondary-action-cell">
  84. <tr>
  85. <td class="link__cell"><a href="{{ shop.url }}" class="link__text"><span class='or'>or</span> Visit our store</a></td>
  86. </tr>
  87. </table>
  88. {% endif %}
  89.  
  90. </td>
  91. </tr>
  92. </table>
  93.  
  94. {% else %}
  95. {% if shop.url %}
  96. <table class="row actions">
  97. <tr>
  98. <td class="actions__cell">
  99. <table class="button main-action-cell">
  100. <tr>
  101. <td class="button__cell"><a href="{{ shop.url }}" class="button__text">Visit our store</a></td>
  102. </tr>
  103. </table>
  104. </td>
  105. </tr>
  106. </table>
  107. {% endif %}
  108.  
  109. {% endif %}
  110.  
  111. </td>
  112. </tr>
  113. </table>
  114. </center>
  115. </td>
  116. </tr>
  117. </table>
  118.  
  119. <table class="row section">
  120. <tr>
  121. <td class="section__cell">
  122. <center>
  123. <table class="container">
  124. <tr>
  125. <td>
  126. <h3>Order summary</h3>
  127. </td>
  128. </tr>
  129. </table>
  130. <table class="container">
  131. <tr>
  132. <td>
  133.  
  134.  
  135. <table class="row">
  136. {% for line in line_items %}
  137. <tr class="order-list__item">
  138. <td class="order-list__item__cell">
  139. <table>
  140. <td>
  141. {% if line.image %}
  142. <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
  143. {% endif %}
  144. </td>
  145. <td class="order-list__product-description-cell">
  146. {% if line.product.title %}
  147. {% assign line_title = line.product.title %}
  148. {% else %}
  149. {% assign line_title = line.title %}
  150. {% endif %}
  151.  
  152. {% if line.quantity < line.quantity %}
  153. {% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
  154. {% else %}
  155. {% assign line_display = line.quantity %}
  156. {% endif %}
  157.  
  158. <span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>
  159.  
  160. {% if line.variant.title != 'Default Title' %}
  161. <span class="order-list__item-variant">{{ line.variant.title }}</span>
  162. {% endif %}
  163. </td>
  164. <td class="order-list__price-cell">
  165. {% if line.original_line_price != line.line_price %}
  166. <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
  167. {% endif %}
  168. <p class="order-list__item-price">{{ line.line_price | money }}</p>
  169. </td>
  170. </table>
  171. </td>
  172. </tr>{% endfor %}
  173. </table>
  174.  
  175. <table class="row subtotal-lines">
  176. <tr>
  177. <td class="subtotal-spacer"></td>
  178. <td>
  179. <table class="row subtotal-table">
  180. {% if discounts %}
  181. {% capture discount_title %}Discount {% if discounts.first.code %}({{ discounts.first.code }}){% endif %}{% endcapture %}
  182.  
  183. <tr class="subtotal-line">
  184. <td class="subtotal-line__title">
  185. <p>
  186. <span>{{ discount_title }}</span>
  187. </p>
  188. </td>
  189. <td class="subtotal-line__value">
  190. <strong>{{ discounts_savings | money }}</strong>
  191. </td>
  192. </tr>
  193.  
  194. {% endif %}
  195.  
  196.  
  197. <tr class="subtotal-line">
  198. <td class="subtotal-line__title">
  199. <p>
  200. <span>Subtotal</span>
  201. </p>
  202. </td>
  203. <td class="subtotal-line__value">
  204. <strong>{{ subtotal_price | money }}</strong>
  205. </td>
  206. </tr>
  207.  
  208.  
  209. <tr class="subtotal-line">
  210. <td class="subtotal-line__title">
  211. <p>
  212. <span>Shipping</span>
  213. </p>
  214. </td>
  215. <td class="subtotal-line__value">
  216. <strong>{{ shipping_price | money }}</strong>
  217. </td>
  218. </tr>
  219.  
  220.  
  221. {% for line in tax_lines %}
  222.  
  223. <tr class="subtotal-line">
  224. <td class="subtotal-line__title">
  225. <p>
  226. <span>{{ line.title }}</span>
  227. </p>
  228. </td>
  229. <td class="subtotal-line__value">
  230. <strong>{{ line.price | money }}</strong>
  231. </td>
  232. </tr>
  233.  
  234. {% endfor %}
  235. </table>
  236. <table class="row subtotal-table subtotal-table--total">
  237.  
  238. <tr class="subtotal-line">
  239. <td class="subtotal-line__title">
  240. <p>
  241. <span>Total</span>
  242. </p>
  243. </td>
  244. <td class="subtotal-line__value">
  245. <strong>{{ total_price | money_with_currency }}</strong>
  246. </td>
  247. </tr>
  248.  
  249. </table>
  250.  
  251. {% assign transaction_size = 0 %}
  252. {% for transaction in transactions %}
  253. {% unless transaction.kind == "capture" or transaction.kind == "void" %}
  254. {% assign transaction_size = transaction_size | plus: 1 %}
  255. {% endunless %}
  256. {% endfor %}
  257.  
  258. {% if transaction_size > 1 %}
  259. <table class="row subtotal-table">
  260. <tr><td colspan="2" class="subtotal-table__line"></td></tr>
  261. <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>
  262.  
  263. {% for transaction in transactions %}
  264. {% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
  265. {% if transaction.payment_details.credit_card_company %}
  266. {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
  267. {% else %}
  268. {% capture transaction_name %}{{ transaction.gateway | replace: "_", " " | capitalize }}{% endcapture %}
  269. {% endif %}
  270.  
  271.  
  272. <tr class="subtotal-line">
  273. <td class="subtotal-line__title">
  274. <p>
  275. <span>{{transaction_name}}</span>
  276. </p>
  277. </td>
  278. <td class="subtotal-line__value">
  279. <strong>{{ transaction.amount | money }}</strong>
  280. </td>
  281. </tr>
  282.  
  283. {% endif %}
  284. {% if transaction.kind == 'refund' %}
  285. {% if transaction.payment_details.credit_card_company %}
  286. {% assign refund_method_title = transaction.payment_details.credit_card_company %}
  287. {% else %}
  288. {% assign refund_method_title = transaction.gateway %}
  289. {% endif %}
  290.  
  291.  
  292. <tr class="subtotal-line">
  293. <td class="subtotal-line__title">
  294. <p>
  295. <span>Refund</span>
  296. <br>
  297. <small>{{ refund_method_title | capitalize }}</small>
  298. </p>
  299. </td>
  300. <td class="subtotal-line__value">
  301. <strong>- {{ transaction.amount | money }}</strong>
  302. </td>
  303. </tr>
  304.  
  305. {% endif %}
  306. {% endfor %}
  307. </table>
  308. {% endif %}
  309. </td>
  310. </tr>
  311. </table>
  312.  
  313.  
  314. </td>
  315. </tr>
  316. </table>
  317. </center>
  318. </td>
  319. </tr>
  320. </table>
  321.  
  322. <table class="row section">
  323. <tr>
  324. <td class="section__cell">
  325. <center>
  326. <table class="container">
  327. <tr>
  328. <td>
  329. <h3>Customer information</h3>
  330. </td>
  331. </tr>
  332. </table>
  333. <table class="container">
  334. <tr>
  335. <td>
  336.  
  337. <table class="row">
  338. <tr>
  339. {% if requires_shipping and shipping_address %}
  340. <td class="customer-info__item">
  341. <h4>Shipping address</h4>
  342. {{ shipping_address | format_address }}
  343. </td>
  344. {% endif %}
  345. {% if billing_address %}
  346. <td class="customer-info__item">
  347. <h4>Billing address</h4>
  348. {{ billing_address | format_address }}
  349. </td>
  350. {% endif %}
  351. </tr>
  352. </table>
  353. <table class="row">
  354. <tr>
  355. {% if requires_shipping and shipping_address %}
  356. <td class="customer-info__item">
  357. <h4>Shipping method</h4>
  358. <p>{{ shipping_method.title }}</p>
  359. </td>
  360. {% endif %}
  361. {% assign transaction_count = transactions | size %}
  362. {% if transaction_count > 0 %}
  363. <td class="customer-info__item">
  364. <h4>Payment method</h4>
  365. {% for transaction in transactions %}
  366. {% if transaction.status == "success" or transaction.status == "pending" %}
  367. {% if transaction.kind == "authorization" or transaction.kind == "sale" %}
  368. <p class="customer-info__item-content">
  369. {% if transaction.payment_details.credit_card_company %}
  370. {% capture credit_card_url %}notifications/{{ transaction.payment_details.credit_card_company | downcase | replace: " ", "_" }}.png{% endcapture %}
  371. <img src="{{ credit_card_url | shopify_asset_url }}" class="customer-info__item-credit" height="24">
  372. <span>Ending in {{ transaction.payment_details.credit_card_last_four_digits }} — <strong>{{ total_price | money }}</strong></span>
  373. {% else %}
  374. {{ transaction.gateway | replace: "_", " " | capitalize }} — <strong>{{ transaction.amount | money }}</strong>
  375. {% endif %}
  376. </p>
  377. {% endif %}
  378. {% endif %}
  379. {% endfor %}
  380. </td>
  381. {% endif %}
  382. </tr>
  383. </table>
  384.  
  385. </td>
  386. </tr>
  387. </table>
  388. </center>
  389. </td>
  390. </tr>
  391. </table>
  392.  
  393. <table class="row footer">
  394. <tr>
  395. <td class="footer__cell">
  396. <center>
  397. <table class="container">
  398. <tr>
  399. <td>
  400. <p class="disclaimer__subtext">If you have any questions, reply to this email or contact us at <a href="mailto:{{ shop.email }}">{{ shop.email }}</a></p>
  401. </td>
  402. </tr>
  403. </table>
  404. </center>
  405. </td>
  406. </tr>
  407. </table>
  408.  
  409. <img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
  410.  
  411. </td>
  412. </tr>
  413. </table>
  414. </body>
  415. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement