Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.21 KB | None | 0 0
  1. {% capture email_title %}Obrigado pela compra! {% endcapture %}
  2. {% capture email_body %}
  3. {% if requires_shipping %}
  4. Olá, {{ customer.first_name }}! Estamos preparando seu pedido para enviá-lo. Enviaremos uma notificação pra você quando ele for enviado.
  5. {% endif %}
  6. {% endcapture %}
  7.  
  8. <!DOCTYPE html>
  9. <html lang="pt-BR">
  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. Pedido {{ 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="empty-line"> </td>
  77. </tr>
  78. <tr>
  79. <td class="actions__cell">
  80. <table class="button main-action-cell">
  81. <tr>
  82. <td class="button__cell"><a href="{{ order_status_url }}" class="button__text">Visualizar seu pedido</a></td>
  83. </tr>
  84. </table>
  85. {% if shop.url %}
  86. <table class="link secondary-action-cell">
  87. <tr>
  88. <td class="link__cell">ou <a href="{{ shop.url }}">Acesse nossa loja</a></td>
  89. </tr>
  90. </table>
  91. {% endif %}
  92.  
  93. </td>
  94. </tr>
  95. </table>
  96.  
  97. {% else %}
  98. {% if shop.url %}
  99. <table class="row actions">
  100. <tr>
  101. <td class="actions__cell">
  102. <table class="button main-action-cell">
  103. <tr>
  104. <td class="button__cell"><a href="{{ shop.url }}" class="button__text">Acesse nossa loja</a></td>
  105. </tr>
  106. </table>
  107. </td>
  108. </tr>
  109. </table>
  110. {% endif %}
  111.  
  112. {% endif %}
  113.  
  114. </td>
  115. </tr>
  116. </table>
  117. </center>
  118. </td>
  119. </tr>
  120. </table>
  121.  
  122. <table class="row section">
  123. <tr>
  124. <td class="section__cell">
  125. <center>
  126. <table class="container">
  127. <tr>
  128. <td>
  129. <h3>Resumo do pedido</h3>
  130. </td>
  131. </tr>
  132. </table>
  133. <table class="container">
  134. <tr>
  135. <td>
  136.  
  137.  
  138. <table class="row">
  139. {% for line in subtotal_line_items %}
  140. <tr class="order-list__item">
  141. <td class="order-list__item__cell">
  142. <table>
  143. <td>
  144. {% if line.image %}
  145. <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
  146. {% endif %}
  147. </td>
  148. <td class="order-list__product-description-cell">
  149. {% if line.product.title %}
  150. {% assign line_title = line.product.title %}
  151. {% else %}
  152. {% assign line_title = line.title %}
  153. {% endif %}
  154.  
  155. {% if line.quantity < line.quantity %}
  156. {% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
  157. {% else %}
  158. {% assign line_display = line.quantity %}
  159. {% endif %}
  160.  
  161. <span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>
  162.  
  163. {% if line.variant.title != 'Default Title' %}
  164. <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
  165. {% endif %}
  166.  
  167. {% if line.refunded_quantity > 0 %}
  168. <span class="order-list__item-refunded">Refunded</span>
  169. {% endif %}
  170.  
  171. {% if line.discount_allocations %}
  172. {% for discount_allocation in line.discount_allocations %}
  173. {% if discount_allocation.discount_application.target_selection != 'all' %}
  174. <span class="order-list__item-discount-allocation">
  175. <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
  176. <span>
  177. {{ discount_allocation.discount_application.title | upcase }}
  178. (-{{ discount_allocation.amount | money }})
  179. </span>
  180. </span>
  181. {% endif %}
  182. {% endfor %}
  183. {% endif %}
  184. </td>
  185. <td class="order-list__price-cell">
  186. {% if line.original_line_price != line.final_line_price %}
  187. <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
  188. {% endif %}
  189. <p class="order-list__item-price">
  190. {% if line.final_line_price > 0 %}
  191. {{ line.final_line_price | money }}
  192. {% else %}
  193. Grátis
  194. {% endif %}
  195. </p>
  196. </td>
  197. </table>
  198. </td>
  199. </tr>{% endfor %}
  200. </table>
  201.  
  202. <table class="row subtotal-lines">
  203. <tr>
  204. <td class="subtotal-spacer"></td>
  205. <td>
  206. <table class="row subtotal-table">
  207. {% for discount_application in discount_applications %}
  208. {% if discount_application.target_selection == 'all' %}
  209. {% capture discount_title %}
  210. {% if discount_application.title %}
  211. {{ discount_application.title | upcase }}
  212. {% else %}
  213. Desconto
  214. {% endif %}
  215. {% endcapture %}
  216.  
  217. <tr class="subtotal-line">
  218. <td class="subtotal-line__title">
  219. <p>
  220. <span>Desconto</span>
  221. <span class="subtotal-line__discount">
  222. <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
  223. <span class="subtotal-line__discount-title">{{ discount_title }}</span>
  224. </span>
  225. </p>
  226. </td>
  227. <td class="subtotal-line__value">
  228. <strong>-{{ discount_application.total_allocated_amount | money }}</strong>
  229. </td>
  230. </tr>
  231.  
  232. {% endif %}
  233. {% endfor %}
  234.  
  235.  
  236. <tr class="subtotal-line">
  237. <td class="subtotal-line__title">
  238. <p>
  239. <span>Subtotal</span>
  240. </p>
  241. </td>
  242. <td class="subtotal-line__value">
  243. <strong>{{ subtotal_price | money }}</strong>
  244. </td>
  245. </tr>
  246.  
  247.  
  248. <tr class="subtotal-line">
  249. <td class="subtotal-line__title">
  250. <p>
  251. <span>Frete</span>
  252. </p>
  253. </td>
  254. <td class="subtotal-line__value">
  255. <strong>{{ shipping_price | money }}</strong>
  256. </td>
  257. </tr>
  258.  
  259.  
  260. {% for line in tax_lines %}
  261.  
  262. <tr class="subtotal-line">
  263. <td class="subtotal-line__title">
  264. <p>
  265. <span>{{ line.title }}</span>
  266. </p>
  267. </td>
  268. <td class="subtotal-line__value">
  269. <strong>{{ line.price | money }}</strong>
  270. </td>
  271. </tr>
  272.  
  273. {% endfor %}
  274.  
  275. {% if total_duties %}
  276.  
  277. <tr class="subtotal-line">
  278. <td class="subtotal-line__title">
  279. <p>
  280. <span>Taxas de importação</span>
  281. </p>
  282. </td>
  283. <td class="subtotal-line__value">
  284. <strong>{{ current_total_duties | money }}</strong>
  285. </td>
  286. </tr>
  287.  
  288. {% endif %}
  289.  
  290.  
  291. <tr class="subtotal-line">
  292. <td class="subtotal-line__title">
  293. <p>
  294. <span>Impostos</span>
  295. </p>
  296. </td>
  297. <td class="subtotal-line__value">
  298. <strong>{{ tax_price | money }}</strong>
  299. </td>
  300. </tr>
  301.  
  302.  
  303. {% if total_tip and total_tip > 0 %}
  304.  
  305. <tr class="subtotal-line">
  306. <td class="subtotal-line__title">
  307. <p>
  308. <span>Tip</span>
  309. </p>
  310. </td>
  311. <td class="subtotal-line__value">
  312. <strong>{{ total_tip | money }}</strong>
  313. </td>
  314. </tr>
  315.  
  316. {% endif %}
  317. </table>
  318. <table class="row subtotal-table subtotal-table--total">
  319.  
  320. <tr class="subtotal-line">
  321. <td class="subtotal-line__title">
  322. <p>
  323. <span>Total</span>
  324. </p>
  325. </td>
  326. <td class="subtotal-line__value">
  327. <strong>{{ total_price | money_with_currency }}</strong>
  328. </td>
  329. </tr>
  330.  
  331. </table>
  332.  
  333. {% if total_discounts > 0 %}
  334. <p class="total-discount">
  335. You saved <span class="total-discount--amount">{{ total_discounts | money }}</span>
  336. </p>
  337. {% endif %}
  338.  
  339. {% assign transaction_size = 0 %}
  340. {% assign transaction_amount = 0 %}
  341. {% for transaction in transactions %}
  342. {% unless transaction.kind == "capture" or transaction.kind == "void" %}
  343. {% assign transaction_size = transaction_size | plus: 1 %}
  344. {% assign transaction_amount = transaction_amount | plus: transaction.amount %}
  345. {% endunless %}
  346. {% endfor %}
  347.  
  348. {% if transaction_size > 1 or transaction_amount < total_price %}
  349. <table class="row subtotal-table">
  350. <tr><td colspan="2" class="subtotal-table__line"></td></tr>
  351. <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>
  352.  
  353. {% for transaction in transactions %}
  354. {% if transaction.status == "success" and transaction.kind == "authorization" or transaction.kind == "sale" %}
  355. {% if transaction.payment_details.credit_card_company %}
  356. {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
  357. {% else %}
  358. {% capture transaction_name %}{{ transaction.gateway_display_name }}{% endcapture %}
  359. {% endif %}
  360.  
  361.  
  362. <tr class="subtotal-line">
  363. <td class="subtotal-line__title">
  364. <p>
  365. <span>{{transaction_name}}</span>
  366. </p>
  367. </td>
  368. <td class="subtotal-line__value">
  369. <strong>{{ transaction.amount | money }}</strong>
  370. </td>
  371. </tr>
  372.  
  373. {% endif %}
  374. {% if transaction.kind == 'refund' %}
  375. {% if transaction.payment_details.credit_card_company %}
  376. {% assign refund_method_title = transaction.payment_details.credit_card_company %}
  377. {% else %}
  378. {% assign refund_method_title = transaction.gateway %}
  379. {% endif %}
  380.  
  381.  
  382. <tr class="subtotal-line">
  383. <td class="subtotal-line__title">
  384. <p>
  385. <span>Reembolsar</span>
  386. <br>
  387. <small>{{ refund_method_title | capitalize }}</small>
  388. </p>
  389. </td>
  390. <td class="subtotal-line__value">
  391. <strong>- {{ transaction.amount | money }}</strong>
  392. </td>
  393. </tr>
  394.  
  395. {% endif %}
  396. {% endfor %}
  397. </table>
  398. {% endif %}
  399. </td>
  400. </tr>
  401. </table>
  402.  
  403.  
  404. </td>
  405. </tr>
  406. </table>
  407. </center>
  408. </td>
  409. </tr>
  410. </table>
  411.  
  412. <table class="row section">
  413. <tr>
  414. <td class="section__cell">
  415. <center>
  416. <table class="container">
  417. <tr>
  418. <td>
  419. <h3>Informações do cliente</h3>
  420. </td>
  421. </tr>
  422. </table>
  423. <table class="container">
  424. <tr>
  425. <td>
  426.  
  427. <table class="row">
  428. <tr>
  429. {% if requires_shipping and shipping_address %}
  430. <td class="customer-info__item">
  431. <h4>Endereço de entrega</h4>
  432. {{ shipping_address | format_address }}
  433. </td>
  434. {% endif %}
  435. {% if billing_address %}
  436. <td class="customer-info__item">
  437. <h4>Endereço de faturamento</h4>
  438. {{ billing_address | format_address }}
  439. </td>
  440. {% endif %}
  441. </tr>
  442. </table>
  443. <table class="row">
  444. <tr>
  445. {% if requires_shipping and shipping_address %}
  446. <td class="customer-info__item">
  447. <h4>Forma de frete</h4>
  448. <p>{{ shipping_method.title }}</p>
  449. </td>
  450. {% endif %}
  451. {% assign transaction_count = transactions | size %}
  452. {% if transaction_count > 0 %}
  453. <td class="customer-info__item">
  454. <h4>Forma de pagamento</h4>
  455. {% for transaction in transactions %}
  456. {% if transaction.status == "success" or transaction.status == "pending" %}
  457. {% if transaction.kind == "authorization" or transaction.kind == "sale" %}
  458. <p class="customer-info__item-content">
  459. {% if transaction.payment_details.credit_card_company %}
  460. {% capture credit_card_url %}notifications/{{ transaction.payment_details.credit_card_company | downcase | replace: " ", "_" }}.png{% endcapture %}
  461. <img src="{{ credit_card_url | shopify_asset_url }}" class="customer-info__item-credit" height="24">
  462. <span>Forma de pagamento — <strong>{{ transaction.amount | money }}</strong></span>
  463. {% else %}
  464. {{ transaction.gateway_display_name }} — <strong>{{ transaction.amount | money }}</strong>
  465. {% endif %}
  466. </p>
  467. {% endif %}
  468. {% endif %}
  469. {% endfor %}
  470. </td>
  471. {% endif %}
  472. </tr>
  473. </table>
  474.  
  475. </td>
  476. </tr>
  477. </table>
  478. </center>
  479. </td>
  480. </tr>
  481. </table>
  482.  
  483. <table class="row footer">
  484. <tr>
  485. <td class="footer__cell">
  486. <center>
  487. <table class="container">
  488. <tr>
  489. <td>
  490.  
  491. <p class="disclaimer__subtext">Se você tiver alguma dúvida, responda a esta mensagem ou entre em contato conosco pelo e‑mail <a href="mailto:{{ shop.email }}">{{ shop.email }}</a></p>
  492. </td>
  493. </tr>
  494. </table>
  495. </center>
  496. </td>
  497. </tr>
  498. </table>
  499.  
  500. <img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
  501.  
  502. </td>
  503. </tr>
  504. </table>
  505. </body>
  506. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement