Guest User

Langify Order Refund

a guest
Jan 25th, 2017
491
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {% case attributes.language %} {% when 'ly20894' %} Your refund for order {{ name }} {% else %} Deine Gutschrift für Bestellung {{ name }} {% endcase %}
  2.  
  3. {% case attributes.language %}
  4. {% when 'ly20894' %}
  5. {% if refund_line_items.size == item_count %}
  6. {% capture email_title %}Your order has been refunded {% endcapture %}
  7. {% elsif refund_line_items.size == 0 %}
  8. {% capture email_title %}You have received a refund {% endcapture %}
  9. {% else %}
  10. {% capture email_title %}Some items in your order have been refunded {% endcapture %}
  11. {% endif %}
  12. {% capture email_body %}Total amount refunded: <strong>{{ amount | money_with_currency }}</strong>{% endcapture %}
  13.  
  14. <!DOCTYPE html>
  15. <html lang="en">
  16. <head>
  17. <title>{{ email_title }}</title>
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  19. <meta name="viewport" content="width=device-width">
  20. <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
  21. <style>
  22. .button__cell { background: {{ shop.email_accent_color }}; }
  23. a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
  24. </style>
  25. </head>
  26.  
  27. <body>
  28. <table class="body">
  29. <tr>
  30. <td>
  31.  
  32. <table class="header row">
  33. <tr>
  34. <td class="header__cell">
  35. <center>
  36.  
  37. <table class="container">
  38. <tr>
  39. <td>
  40.  
  41. <table class="row">
  42. <tr>
  43. <td class="shop-name__cell">
  44. {% if shop.email_logo_url %}
  45. <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
  46. {% else %}
  47. <h1 class="shop-name__text">
  48. <a href="{{shop.url}}">{{ shop.name }}</a>
  49. </h1>
  50. {% endif %}
  51. </td>
  52.  
  53. <td class="order-number__cell">
  54. <span class="order-number__text">
  55. Order {{ order_name }}
  56. </span>
  57. </td>
  58. </tr>
  59. </table>
  60.  
  61. </td>
  62. </tr>
  63. </table>
  64.  
  65. </center>
  66. </td>
  67. </tr>
  68. </table>
  69.  
  70. <table class="row content">
  71. <tr>
  72. <td class="content__cell">
  73. <center>
  74. <table class="container">
  75. <tr>
  76. <td>
  77.  
  78. <h2>{{ email_title }}</h2>
  79. <p>{{ email_body }}</p>
  80.  
  81. </td>
  82. </tr>
  83. </table>
  84. </center>
  85. </td>
  86. </tr>
  87. </table>
  88.  
  89. <table class="row section">
  90. <tr>
  91. <td class="section__cell">
  92. <center>
  93. <table class="container">
  94. <tr>
  95. <td>
  96. <h3>Order summary</h3>
  97. </td>
  98. </tr>
  99. </table>
  100. <table class="container">
  101. <tr>
  102. <td>
  103.  
  104.  
  105. <table class="row">
  106. {% for line in line_items %}
  107.  
  108. {% if item_count == 1 %}
  109. {% assign columnWrapperClass = 'order-list__item--single' %}
  110. {% elsif forloop.first == true %}
  111. {% assign columnWrapperClass = 'order-list__item--first' %}
  112. {% elsif forloop.last == true %}
  113. {% assign columnWrapperClass = 'order-list__item--last' %}
  114. {% else %}
  115. {% assign columnWrapperClass = '' %}
  116. {% endif %}
  117. <tr class="order-list__item {{columnWrapperClass}}">
  118. <td class="order-list__item__cell">
  119. <table>
  120. <td>
  121. {% if line.image %}
  122. <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
  123. {% endif %}
  124. </td>
  125. <td class="order-list__product-description-cell">
  126. {% if line.product.title %}
  127. {% assign line_title = line.product.title %}
  128. {% else %}
  129. {% assign line_title = line.title %}
  130. {% endif %}
  131. <span class="order-list__item-title">{{ line_title }} × {{ line.quantity }}</span><br/>
  132. {% if line.variant.title != 'Default Title' %}
  133. <span class="order-list__item-variant">{{ line.variant.title }}</span>
  134. {% endif %}
  135. </td>
  136. <td class="order-list__price-cell">
  137. {% if line.original_line_price != line.line_price %}
  138. <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
  139. {% endif %}
  140. <p class="order-list__item-price">{{ line.line_price | money }}</p>
  141. </td>
  142. </table>
  143. </td>
  144. </tr>{% endfor %}
  145. </table>
  146.  
  147. <table class="row subtotal-lines">
  148. <tr>
  149. <td class="subtotal-spacer"></td>
  150. <td>
  151. <table class="row subtotal-table">
  152. {% if discounts %}
  153. {% capture discount_title %}Discount {% if discounts.first.code %}({{ discounts.first.code }}){% endif %}{% endcapture %}
  154.  
  155. <tr class="subtotal-line">
  156. <td class="subtotal-line__title">
  157. <p>
  158. <span>{{ discount_title }}</span>
  159. </p>
  160. </td>
  161. <td class="subtotal-line__value">
  162. <strong>{{ discounts_savings | money }}</strong>
  163. </td>
  164. </tr>
  165.  
  166. {% endif %}
  167.  
  168.  
  169. <tr class="subtotal-line">
  170. <td class="subtotal-line__title">
  171. <p>
  172. <span>Subtotal</span>
  173. </p>
  174. </td>
  175. <td class="subtotal-line__value">
  176. <strong>{{ subtotal_price | money }}</strong>
  177. </td>
  178. </tr>
  179.  
  180.  
  181. <tr class="subtotal-line">
  182. <td class="subtotal-line__title">
  183. <p>
  184. <span>Shipping</span>
  185. </p>
  186. </td>
  187. <td class="subtotal-line__value">
  188. <strong>{{ shipping_price | money }}</strong>
  189. </td>
  190. </tr>
  191.  
  192.  
  193. {% for line in tax_lines %}
  194.  
  195. <tr class="subtotal-line">
  196. <td class="subtotal-line__title">
  197. <p>
  198. <span>{{ line.title }}</span>
  199. </p>
  200. </td>
  201. <td class="subtotal-line__value">
  202. <strong>{{ line.price | money }}</strong>
  203. </td>
  204. </tr>
  205.  
  206. {% endfor %}
  207. </table>
  208. <table class="row subtotal-table subtotal-table--total">
  209.  
  210. <tr class="subtotal-line">
  211. <td class="subtotal-line__title">
  212. <p>
  213. <span>Total</span>
  214. </p>
  215. </td>
  216. <td class="subtotal-line__value">
  217. <strong>{{ total_price | money_with_currency }}</strong>
  218. </td>
  219. </tr>
  220.  
  221. </table>
  222.  
  223. {% assign transaction_size = 0 %}
  224. {% for transaction in transactions %}
  225. {% unless transaction.kind == "capture" or transaction.kind == "void" %}
  226. {% assign transaction_size = transaction_size | plus: 1 %}
  227. {% endunless %}
  228. {% endfor %}
  229.  
  230. {% if transaction_size > 1 %}
  231. <table class="row subtotal-table">
  232. <tr><td colspan="2" class="subtotal-table__line"></td></tr>
  233. <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>
  234.  
  235. {% for transaction in transactions %}
  236. {% if (transaction.status == "success") and (transaction.kind == "authorization" or transaction.kind == "sale") %}
  237. {% if transaction.payment_details.credit_card_company %}
  238. {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
  239. {% else %}
  240. {% capture transaction_name %}{{ transaction.gateway | replace: "_", " " | capitalize }}{% endcapture %}
  241. {% endif %}
  242.  
  243.  
  244. <tr class="subtotal-line">
  245. <td class="subtotal-line__title">
  246. <p>
  247. <span>{{transaction_name}}</span>
  248. </p>
  249. </td>
  250. <td class="subtotal-line__value">
  251. <strong>{{ transaction.amount | money }}</strong>
  252. </td>
  253. </tr>
  254.  
  255. {% endif %}
  256. {% if transaction.kind == 'refund' %}
  257. {% if transaction.payment_details.credit_card_company %}
  258. {% assign refund_method_title = transaction.payment_details.credit_card_company %}
  259. {% else %}
  260. {% assign refund_method_title = transaction.gateway %}
  261. {% endif %}
  262.  
  263.  
  264. <tr class="subtotal-line">
  265. <td class="subtotal-line__title">
  266. <p>
  267. <span>Refund</span>
  268. <br>
  269. <small>{{ refund_method_title | capitalize }}</small>
  270. </p>
  271. </td>
  272. <td class="subtotal-line__value">
  273. <strong>- {{ transaction.amount | money }}</strong>
  274. </td>
  275. </tr>
  276.  
  277. {% endif %}
  278. {% endfor %}
  279. </table>
  280. {% endif %}
  281. </td>
  282. </tr>
  283. </table>
  284.  
  285.  
  286. </td>
  287. </tr>
  288. </table>
  289. </center>
  290. </td>
  291. </tr>
  292. </table>
  293.  
  294. <table class="row footer">
  295. <tr>
  296. <td class="footer__cell">
  297. <center>
  298. <table class="container">
  299. <tr>
  300. <td>
  301. <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>
  302. </td>
  303. </tr>
  304. </table>
  305. </center>
  306. </td>
  307. </tr>
  308. </table>
  309.  
  310. <img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
  311.  
  312. </td>
  313. </tr>
  314. </table>
  315. </body>
  316. </html>
  317.  
  318.  
  319. <!-- DE TRANSLATION -->
  320. {% else %}
  321. {% if refund_line_items.size == item_count %}
  322. {% capture email_title %}Deine Bestellung wurde gutgeschrieben {% endcapture %}
  323. {% elsif refund_line_items.size == 0 %}
  324. {% capture email_title %}Hier ist Deine Gutschrift {% endcapture %}
  325. {% else %}
  326. {% capture email_title %}Ein Teil Deiner Bestellung wurde gutgeschrieben {% endcapture %}
  327. {% endif %}
  328. {% capture email_body %}Gesamtbetrag: <strong>{{ amount | money_with_currency }}</strong>{% endcapture %}
  329.  
  330. <!DOCTYPE html>
  331. <html lang="de">
  332. <head>
  333. <title>{{ email_title }}</title>
  334. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  335. <meta name="viewport" content="width=device-width">
  336. <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
  337. <style>
  338. .button__cell { background: {{ shop.email_accent_color }}; }
  339. a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
  340. </style>
  341. </head>
  342.  
  343. <body>
  344. <table class="body">
  345. <tr>
  346. <td>
  347.  
  348. <table class="header row">
  349. <tr>
  350. <td class="header__cell">
  351. <center>
  352.  
  353. <table class="container">
  354. <tr>
  355. <td>
  356.  
  357. <table class="row">
  358. <tr>
  359. <td class="shop-name__cell">
  360. {% if shop.email_logo_url %}
  361. <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
  362. {% else %}
  363. <h1 class="shop-name__text">
  364. <a href="{{shop.url}}">{{ shop.name }}</a>
  365. </h1>
  366. {% endif %}
  367. </td>
  368.  
  369. <td class="order-number__cell">
  370. <span class="order-number__text">
  371. Bestellung {{ order_name }}
  372. </span>
  373. </td>
  374. </tr>
  375. </table>
  376.  
  377. </td>
  378. </tr>
  379. </table>
  380.  
  381. </center>
  382. </td>
  383. </tr>
  384. </table>
  385.  
  386. <table class="row content">
  387. <tr>
  388. <td class="content__cell">
  389. <center>
  390. <table class="container">
  391. <tr>
  392. <td>
  393.  
  394. <h2>{{ email_title }}</h2>
  395. <p>{{ email_body }}</p>
  396.  
  397. </td>
  398. </tr>
  399. </table>
  400. </center>
  401. </td>
  402. </tr>
  403. </table>
  404.  
  405. <table class="row section">
  406. <tr>
  407. <td class="section__cell">
  408. <center>
  409. <table class="container">
  410. <tr>
  411. <td>
  412. <h3>Order summary</h3>
  413. </td>
  414. </tr>
  415. </table>
  416. <table class="container">
  417. <tr>
  418. <td>
  419.  
  420.  
  421. <table class="row">
  422. {% for line in line_items %}
  423.  
  424. {% if item_count == 1 %}
  425. {% assign columnWrapperClass = 'order-list__item--single' %}
  426. {% elsif forloop.first == true %}
  427. {% assign columnWrapperClass = 'order-list__item--first' %}
  428. {% elsif forloop.last == true %}
  429. {% assign columnWrapperClass = 'order-list__item--last' %}
  430. {% else %}
  431. {% assign columnWrapperClass = '' %}
  432. {% endif %}
  433. <tr class="order-list__item {{columnWrapperClass}}">
  434. <td class="order-list__item__cell">
  435. <table>
  436. <td>
  437. {% if line.image %}
  438. <img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
  439. {% endif %}
  440. </td>
  441. <td class="order-list__product-description-cell">
  442. {% if line.product.title %}
  443. {% assign line_title = line.product.title %}
  444. {% else %}
  445. {% assign line_title = line.title %}
  446. {% endif %}
  447. <span class="order-list__item-title">{{ line_title }} × {{ line.quantity }}</span><br/>
  448. {% if line.variant.title != 'Default Title' %}
  449. <span class="order-list__item-variant">{{ line.variant.title }}</span>
  450. {% endif %}
  451. </td>
  452. <td class="order-list__price-cell">
  453. {% if line.original_line_price != line.line_price %}
  454. <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
  455. {% endif %}
  456. <p class="order-list__item-price">{{ line.line_price | money }}</p>
  457. </td>
  458. </table>
  459. </td>
  460. </tr>{% endfor %}
  461. </table>
  462.  
  463. <table class="row subtotal-lines">
  464. <tr>
  465. <td class="subtotal-spacer"></td>
  466. <td>
  467. <table class="row subtotal-table">
  468. {% if discounts %}
  469. {% capture discount_title %}Discount {% if discounts.first.code %}({{ discounts.first.code }}){% endif %}{% endcapture %}
  470.  
  471. <tr class="subtotal-line">
  472. <td class="subtotal-line__title">
  473. <p>
  474. <span>{{ discount_title }}</span>
  475. </p>
  476. </td>
  477. <td class="subtotal-line__value">
  478. <strong>{{ discounts_savings | money }}</strong>
  479. </td>
  480. </tr>
  481.  
  482. {% endif %}
  483.  
  484.  
  485. <tr class="subtotal-line">
  486. <td class="subtotal-line__title">
  487. <p>
  488. <span>Zwischensumme</span>
  489. </p>
  490. </td>
  491. <td class="subtotal-line__value">
  492. <strong>{{ subtotal_price | money }}</strong>
  493. </td>
  494. </tr>
  495.  
  496.  
  497. <tr class="subtotal-line">
  498. <td class="subtotal-line__title">
  499. <p>
  500. <span>Versand</span>
  501. </p>
  502. </td>
  503. <td class="subtotal-line__value">
  504. <strong>{{ shipping_price | money }}</strong>
  505. </td>
  506. </tr>
  507.  
  508.  
  509. {% for line in tax_lines %}
  510.  
  511. <tr class="subtotal-line">
  512. <td class="subtotal-line__title">
  513. <p>
  514. <span>{{ line.title }}</span>
  515. </p>
  516. </td>
  517. <td class="subtotal-line__value">
  518. <strong>{{ line.price | money }}</strong>
  519. </td>
  520. </tr>
  521.  
  522. {% endfor %}
  523. </table>
  524. <table class="row subtotal-table subtotal-table--total">
  525.  
  526. <tr class="subtotal-line">
  527. <td class="subtotal-line__title">
  528. <p>
  529. <span>Gesamt</span>
  530. </p>
  531. </td>
  532. <td class="subtotal-line__value">
  533. <strong>{{ total_price | money_with_currency }}</strong>
  534. </td>
  535. </tr>
  536.  
  537. </table>
  538.  
  539. {% assign transaction_size = 0 %}
  540. {% for transaction in transactions %}
  541. {% unless transaction.kind == "capture" or transaction.kind == "void" %}
  542. {% assign transaction_size = transaction_size | plus: 1 %}
  543. {% endunless %}
  544. {% endfor %}
  545.  
  546. {% if transaction_size > 1 %}
  547. <table class="row subtotal-table">
  548. <tr><td colspan="2" class="subtotal-table__line"></td></tr>
  549. <tr><td colspan="2" class="subtotal-table__small-space"></td></tr>
  550.  
  551. {% for transaction in transactions %}
  552. {% if (transaction.status == "success") and (transaction.kind == "authorization" or transaction.kind == "sale") %}
  553. {% if transaction.payment_details.credit_card_company %}
  554. {% capture transaction_name %}{{ transaction.payment_details.credit_card_company }} (ending in {{ transaction.payment_details.credit_card_last_four_digits }}){% endcapture %}
  555. {% else %}
  556. {% capture transaction_name %}{{ transaction.gateway | replace: "_", " " | capitalize }}{% endcapture %}
  557. {% endif %}
  558.  
  559.  
  560. <tr class="subtotal-line">
  561. <td class="subtotal-line__title">
  562. <p>
  563. <span>{{transaction_name}}</span>
  564. </p>
  565. </td>
  566. <td class="subtotal-line__value">
  567. <strong>{{ transaction.amount | money }}</strong>
  568. </td>
  569. </tr>
  570.  
  571. {% endif %}
  572. {% if transaction.kind == 'refund' %}
  573. {% if transaction.payment_details.credit_card_company %}
  574. {% assign refund_method_title = transaction.payment_details.credit_card_company %}
  575. {% else %}
  576. {% assign refund_method_title = transaction.gateway %}
  577. {% endif %}
  578.  
  579.  
  580. <tr class="subtotal-line">
  581. <td class="subtotal-line__title">
  582. <p>
  583. <span>Gutschrift</span>
  584. <br>
  585. <small>{{ refund_method_title | capitalize }}</small>
  586. </p>
  587. </td>
  588. <td class="subtotal-line__value">
  589. <strong>- {{ transaction.amount | money }}</strong>
  590. </td>
  591. </tr>
  592.  
  593. {% endif %}
  594. {% endfor %}
  595. </table>
  596. {% endif %}
  597. </td>
  598. </tr>
  599. </table>
  600.  
  601.  
  602. </td>
  603. </tr>
  604. </table>
  605. </center>
  606. </td>
  607. </tr>
  608. </table>
  609.  
  610. <table class="row footer">
  611. <tr>
  612. <td class="footer__cell">
  613. <center>
  614. <table class="container">
  615. <tr>
  616. <td>
  617. <p class="disclaimer__subtext">Bei Fragen, antworte einfach auf diese Email oder schreibe uns auf <a href="mailto:{{ shop.email }}">{{ shop.email }}</a></p>
  618. </td>
  619. </tr>
  620. </table>
  621. </center>
  622. </td>
  623. </tr>
  624. </table>
  625.  
  626. <img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
  627.  
  628. </td>
  629. </tr>
  630. </table>
  631. </body>
  632. </html>
  633.  
  634. {% endcase %}
RAW Paste Data