Guest User

Langify Order Cancellation

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