Advertisement
customfiy

order_confirmation

Feb 5th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.90 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">or <a href="{{ shop.url }}">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 subtotal_line_items %}
  137. <tr class="order-list__item">
  138. <td class="order-list__item__cell">
  139. <table>
  140. <td>
  141. {% if line.image %}
  142. {% capture link_custom %}{{ shop.url }}/apps/customify?show_custom=1&id={{ line.properties.customify_id }}{% endcapture %}
  143. {% if line.properties.customify_id %} <img src="{{ link_custom }}" align="left" width="60" height="60" class="order-list__product-image"/>
  144. <br/> {{ 'view customization' | link_to: link_custom }}
  145. {% else %}
  146. <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/> {% endif %}
  147. {% endif %}
  148. </td>
  149. <td class="order-list__product-description-cell">
  150. {% if line.product.title %}
  151. {% assign line_title = line.product.title %}
  152. {% else %}
  153. {% assign line_title = line.title %}
  154. {% endif %}
  155.  
  156. {% if line.quantity < line.quantity %}
  157. {% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
  158. {% else %}
  159. {% assign line_display = line.quantity %}
  160. {% endif %}
  161.  
  162. <span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>
  163.  
  164. {% if line.variant.title != 'Default Title' %}
  165. <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
  166. {% endif %}
  167.  
  168. {% if line.refunded_quantity > 0 %}
  169. <span class="order-list__item-refunded">Refunded</span>
  170. {% endif %}
  171.  
  172. {% if line.discount_allocations %}
  173. {% for discount_allocation in line.discount_allocations %}
  174. {% if discount_allocation.discount_application.target_selection != 'all' %}
  175. <span class="order-list__item-discount-allocation">
  176. <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
  177. <span>
  178. {{ discount_allocation.discount_application.title | upcase }}
  179. (-{{ discount_allocation.amount | money }})
  180. </span>
  181. </span>
  182. {% endif %}
  183. {% endfor %}
  184. {% endif %}
  185. </td>
  186. <td class="order-list__price-cell">
  187. {% if line.original_line_price != line.final_line_price %}
  188. <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
  189. {% endif %}
  190. <p class="order-list__item-price">
  191. {% if line.final_line_price > 0 %}
  192. {{ line.final_line_price | money }}
  193. {% else %}
  194. Free
  195. {% endif %}
  196. </p>
  197. </td>
  198. </table>
  199. </td>
  200. </tr>{% endfor %}
  201. </table>
  202.  
  203. <table class="row subtotal-lines">
  204. <tr>
  205. <td class="subtotal-spacer"></td>
  206. <td>
  207. <table class="row subtotal-table">
  208. {% for discount_application in discount_applications %}
  209. {% if discount_application.target_selection == 'all' %}
  210. {% capture discount_title %}
  211. {% if discount_application.title %}
  212. {{ discount_application.title | upcase }}
  213. {% else %}
  214. Discount
  215. {% endif %}
  216. {% endcapture %}
  217.  
  218. <tr class="subtotal-line">
  219. <td class="subtotal-line__title">
  220. <p>
  221. <span>Discount</span>
  222. <span class="subtotal-line__discount">
  223. <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
  224. <span class="subtotal-line__discount-title">{{ discount_title }}</span>
  225. </span>
  226. </p>
  227. </td>
  228. <td class="subtotal-line__value">
  229. <strong>-{{ discount_application.total_allocated_amount | money }}</strong>
  230. </td>
  231. </tr>
  232.  
  233. {% endif %}
  234. {% endfor %}
  235.  
  236.  
  237. <tr class="subtotal-line">
  238. <td class="subtotal-line__title">
  239. <p>
  240. <span>Subtotal</span>
  241. </p>
  242. </td>
  243. <td class="subtotal-line__value">
  244. <strong>{{ subtotal_price | money }}</strong>
  245. </td>
  246. </tr>
  247.  
  248.  
  249. <tr class="subtotal-line">
  250. <td class="subtotal-line__title">
  251. <p>
  252. <span>Shipping</span>
  253. </p>
  254. </td>
  255. <td class="subtotal-line__value">
  256. <strong>{{ shipping_price | money }}</strong>
  257. </td>
  258. </tr>
  259.  
  260.  
  261. {% for line in tax_lines %}
  262.  
  263. <tr class="subtotal-line">
  264. <td class="subtotal-line__title">
  265. <p>
  266. <span>{{ line.title }}</span>
  267. </p>
  268. </td>
  269. <td class="subtotal-line__value">
  270. <strong>{{ line.price | money }}</strong>
  271. </td>
  272. </tr>
  273.  
  274. {% endfor %}
  275.  
  276. {% if total_tip and total_tip > 0 %}
  277.  
  278. <tr class="subtotal-line">
  279. <td class="subtotal-line__title">
  280. <p>
  281. <span>Tip</span>
  282. </p>
  283. </td>
  284. <td class="subtotal-line__value">
  285. <strong>{{ total_tip | money }}</strong>
  286. </td>
  287. </tr>
  288.  
  289. {% endif %}
  290. </table>
  291. <table class="row subtotal-table subtotal-table--total">
  292.  
  293. <tr class="subtotal-line">
  294. <td class="subtotal-line__title">
  295. <p>
  296. <span>Total</span>
  297. </p>
  298. </td>
  299. <td class="subtotal-line__value">
  300. <strong>{{ total_price | money_with_currency }}</strong>
  301. </td>
  302. </tr>
  303.  
  304. </table>
  305.  
  306. {% if total_discounts > 0 %}
  307. <p class="total-discount">
  308. You saved <span class="total-discount--amount">{{ total_discounts | money }}</span>
  309. </p>
  310. {% endif %}
  311.  
  312. {% assign transaction_size = 0 %}
  313. {% assign transaction_amount = 0 %}
  314. {% for transaction in transactions %}
  315. {% unless transaction.kind == "capture" or transaction.kind == "void" %}
  316. {% assign transaction_size = transaction_size | plus: 1 %}
  317. {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
  318. {% endunless %}
  319. {% endfor %}
  320.  
  321. {% if transaction_size > 1 or transaction_amount < total_price %}
  322. <table class="row subtotal-table">
  323. <tr><td colspan="2" class="subtotal-table__line"></td></tr>
  324. <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>
  325.  
  326. {% for transaction in transactions %}
  327. {% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
  328. {% if transaction.payment_details.credit_card_company %}
  329. {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
  330. {% else %}
  331. {% capture transaction_name %}{{ transaction.gateway | replace: "_", " " | capitalize }}{% endcapture %}
  332. {% endif %}
  333.  
  334.  
  335. <tr class="subtotal-line">
  336. <td class="subtotal-line__title">
  337. <p>
  338. <span>{{transaction_name}}</span>
  339. </p>
  340. </td>
  341. <td class="subtotal-line__value">
  342. <strong>{{ transaction.amount | money }}</strong>
  343. </td>
  344. </tr>
  345.  
  346. {% endif %}
  347. {% if transaction.kind == 'refund' %}
  348. {% if transaction.payment_details.credit_card_company %}
  349. {% assign refund_method_title = transaction.payment_details.credit_card_company %}
  350. {% else %}
  351. {% assign refund_method_title = transaction.gateway %}
  352. {% endif %}
  353.  
  354.  
  355. <tr class="subtotal-line">
  356. <td class="subtotal-line__title">
  357. <p>
  358. <span>Refund</span>
  359. <br>
  360. <small>{{ refund_method_title | capitalize }}</small>
  361. </p>
  362. </td>
  363. <td class="subtotal-line__value">
  364. <strong>- {{ transaction.amount | money }}</strong>
  365. </td>
  366. </tr>
  367.  
  368. {% endif %}
  369. {% endfor %}
  370. </table>
  371. {% endif %}
  372. </td>
  373. </tr>
  374. </table>
  375.  
  376.  
  377. </td>
  378. </tr>
  379. </table>
  380. </center>
  381. </td>
  382. </tr>
  383. </table>
  384.  
  385. <table class="row section">
  386. <tr>
  387. <td class="section__cell">
  388. <center>
  389. <table class="container">
  390. <tr>
  391. <td>
  392. <h3>Customer information</h3>
  393. </td>
  394. </tr>
  395. </table>
  396. <table class="container">
  397. <tr>
  398. <td>
  399.  
  400. <table class="row">
  401. <tr>
  402. {% if requires_shipping and shipping_address %}
  403. <td class="customer-info__item">
  404. <h4>Shipping address</h4>
  405. {{ shipping_address | format_address }}
  406. </td>
  407. {% endif %}
  408. {% if billing_address %}
  409. <td class="customer-info__item">
  410. <h4>Billing address</h4>
  411. {{ billing_address | format_address }}
  412. </td>
  413. {% endif %}
  414. </tr>
  415. </table>
  416. <table class="row">
  417. <tr>
  418. {% if requires_shipping and shipping_address %}
  419. <td class="customer-info__item">
  420. <h4>Shipping method</h4>
  421. <p>{{ shipping_method.title }}</p>
  422. </td>
  423. {% endif %}
  424. {% assign transaction_count = transactions | size %}
  425. {% if transaction_count > 0 %}
  426. <td class="customer-info__item">
  427. <h4>Payment method</h4>
  428. {% for transaction in transactions %}
  429. {% if transaction.status == "success" or transaction.status == "pending" %}
  430. {% if transaction.kind == "authorization" or transaction.kind == "sale" %}
  431. <p class="customer-info__item-content">
  432. {% if transaction.payment_details.credit_card_company %}
  433. {% capture credit_card_url %}notifications/{{ transaction.payment_details.credit_card_company | downcase | replace: " ", "_" }}.png{% endcapture %}
  434. <img src="{{ credit_card_url | shopify_asset_url }}" class="customer-info__item-credit" height="24">
  435. <span>Payment method — <strong>{{ transaction.amount | money }}</strong></span>
  436. {% else %}
  437. {{ transaction.gateway | replace: "_", " " | capitalize }} — <strong>{{ transaction.amount | money }}</strong>
  438. {% endif %}
  439. </p>
  440. {% endif %}
  441. {% endif %}
  442. {% endfor %}
  443. </td>
  444. {% endif %}
  445. </tr>
  446. </table>
  447.  
  448. </td>
  449. </tr>
  450. </table>
  451. </center>
  452. </td>
  453. </tr>
  454. </table>
  455.  
  456. <table class="row footer">
  457. <tr>
  458. <td class="footer__cell">
  459. <center>
  460. <table class="container">
  461. <tr>
  462. <td>
  463.  
  464. <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>
  465. </td>
  466. </tr>
  467. </table>
  468. </center>
  469. </td>
  470. </tr>
  471. </table>
  472.  
  473. <img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
  474.  
  475. </td>
  476. </tr>
  477. </table>
  478. </body>
  479. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement