You are here

commerce-shipment-confirmation.html.twig in Commerce Shipping 8.2

Template for the shipment confirmation.

Available variables:

  • order_entity: The order entity.
  • shipment_entity: The shipment entity.
  • shipping_profile: The profile associated with a shipment.
  • tracking_code: The tracking code associated with the shipment.

File

templates/commerce-shipment-confirmation.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template for the shipment confirmation.
  5. *
  6. * Available variables:
  7. * - order_entity: The order entity.
  8. * - shipment_entity: The shipment entity.
  9. * - shipping_profile: The profile associated with a shipment.
  10. * - tracking_code: The tracking code associated with the shipment.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {% set shipmentItemCount = shipment_entity.getItems|length %}
  16. <table style="margin: 15px auto 0 auto; max-width: 768px; font-family: arial,sans-serif">
  17. <tbody>
  18. <tr>
  19. <td>
  20. <table style="margin-left: auto; margin-right: auto; max-width: 768px; text-align: center;">
  21. <tbody>
  22. <tr>
  23. <td>
  24. <a href="{{ url('<front>') }}" style="color: #0e69be; text-decoration: none; font-weight: bold; margin-top: 15px;">{{ order_entity.getStore.label }}</a>
  25. </td>
  26. </tr>
  27. </tbody>
  28. </table>
  29. <table style="margin-left: auto; margin-right: auto; min-width: 450px; margin: 5px auto 0 auto; border: 1px solid #cccccc; border-radius: 5px; padding: 40px 30px 30px 30px;">
  30. <tbody>
  31. <tr>
  32. <td style="text-align: center; font-weight: bold; padding-top:15px; padding-bottom: 15px; border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc">
  33. {% trans %}
  34. An item in your order #{{ order_entity.getOrderNumber }} has shipped!
  35. {% plural shipmentItemCount %}
  36. Items in your order #{{ order_entity.getOrderNumber }} have shipped!
  37. {% endtrans %}
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>
  42. <table style="width: 100%; padding-top:15px; padding-bottom: 15px; text-align: left; border-bottom: 1px solid #cccccc">
  43. <tbody>
  44. <tr>
  45. <td style="font-weight: bold; padding-bottom: 15px; text-align: left; vertical-align: top;">
  46. {{ 'Shipped to:'|t }}
  47. </td>
  48. </tr>
  49. <tr>
  50. <td>
  51. {% block shipping_profile %}
  52. {{ shipping_profile }}
  53. {% endblock %}
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>
  62. {% block shipment_items %}
  63. <table style="padding-top: 15px; padding-bottom:15px; width: 100%">
  64. <tbody style="text-align: left;">
  65. <tr>
  66. <td colspan="2" style="font-weight: bold; padding-bottom: 15px; text-align: left; vertical-align: top;">
  67. {% trans %}
  68. Item in shipment
  69. {% plural shipmentItemCount %}
  70. Items in shipment
  71. {% endtrans %}
  72. </td>
  73. </tr>
  74. {% for shipment_item in shipment_entity.getItems() %}
  75. <tr>
  76. <td>
  77. {{ shipment_item.quantity|number_format }} x
  78. </td>
  79. <td>
  80. <span>{{ shipment_item.title }}</span>
  81. </td>
  82. </tr>
  83. {% endfor %}
  84. </tbody>
  85. </table>
  86. {% endblock %}
  87. </td>
  88. </tr>
  89. {% if (tracking_code) %}
  90. {% block tracking_info %}
  91. <tr>
  92. <td style="font-weight: bold; padding-top:15px; padding-bottom: 15px; text-align: left; vertical-align: top; border-top: 1px solid #cccccc">
  93. {{ 'Tracking information:'|t }}
  94. </td>
  95. </tr>
  96. <tr>
  97. <td style="padding-bottom: 15px;">
  98. {{ tracking_code }}
  99. </td>
  100. </tr>
  101. <tr>
  102. <td style="padding-top:15px; padding-bottom: 15px; text-align: center; border-top: 1px solid #cccccc">
  103. {{ 'Thank you for your order!'|t }}
  104. </td>
  105. </tr>
  106. {% endblock %}
  107. {% endif %}
  108. </tbody>
  109. </table>
  110. </td>
  111. </tr>
  112. </tbody>
  113. </table>