spree_emails 6.0.0.beta4 → 6.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -74
  3. data/Rakefile +23 -0
  4. data/app/mailers/spree/company_mailer.rb +4 -7
  5. data/app/mailers/spree/customer_mailer.rb +6 -8
  6. data/app/mailers/spree/digital_asset_mailer.rb +18 -11
  7. data/app/mailers/spree/fulfillment_mailer.rb +11 -7
  8. data/app/mailers/spree/newsletter_mailer.rb +1 -2
  9. data/app/mailers/spree/order_group_mailer.rb +16 -20
  10. data/app/mailers/spree/order_mailer.rb +15 -20
  11. data/app/mailers/spree/return_mailer.rb +10 -5
  12. data/app/mailers/spree/seller_mailer.rb +8 -13
  13. data/app/models/spree/emails/amount_line.rb +32 -0
  14. data/app/serializers/spree/emails/address_serializer.rb +6 -0
  15. data/app/serializers/spree/emails/amount_line_serializer.rb +13 -0
  16. data/app/serializers/spree/emails/applied_promotion_serializer.rb +7 -0
  17. data/app/serializers/spree/emails/customer_group_serializer.rb +6 -0
  18. data/app/serializers/spree/emails/customer_serializer.rb +19 -0
  19. data/app/serializers/spree/emails/delivery_method_serializer.rb +6 -0
  20. data/app/serializers/spree/emails/delivery_rate_serializer.rb +12 -0
  21. data/app/serializers/spree/emails/delivery_serializer.rb +6 -0
  22. data/app/serializers/spree/emails/fee_serializer.rb +7 -0
  23. data/app/serializers/spree/emails/freight_summary_serializer.rb +6 -0
  24. data/app/serializers/spree/emails/fulfillment_group_serializer.rb +25 -0
  25. data/app/serializers/spree/emails/fulfillment_serializer.rb +21 -0
  26. data/app/serializers/spree/emails/gift_card_serializer.rb +7 -0
  27. data/app/serializers/spree/emails/line_item_serializer.rb +24 -0
  28. data/app/serializers/spree/emails/market_serializer.rb +6 -0
  29. data/app/serializers/spree/emails/newsletter_subscriber_serializer.rb +6 -0
  30. data/app/serializers/spree/emails/option_value_serializer.rb +6 -0
  31. data/app/serializers/spree/emails/order_group_serializer.rb +50 -0
  32. data/app/serializers/spree/emails/order_serializer.rb +27 -0
  33. data/app/serializers/spree/emails/parcel_item_serializer.rb +36 -0
  34. data/app/serializers/spree/emails/payment_method_serializer.rb +6 -0
  35. data/app/serializers/spree/emails/payment_serializer.rb +11 -0
  36. data/app/serializers/spree/emails/purchase_summary_attributes.rb +41 -0
  37. data/app/serializers/spree/emails/purchased_item_attributes.rb +28 -0
  38. data/app/serializers/spree/emails/return_serializer.rb +19 -0
  39. data/app/serializers/spree/emails/stock_location_serializer.rb +6 -0
  40. data/app/services/spree/emails/samples/base.rb +79 -0
  41. data/app/services/spree/emails/samples/company_invitation.rb +19 -0
  42. data/app/services/spree/emails/samples/data_export.rb +11 -0
  43. data/app/services/spree/emails/samples/downloads.rb +28 -0
  44. data/app/services/spree/emails/samples/fulfillment.rb +33 -0
  45. data/app/services/spree/emails/samples/newsletter_confirmation.rb +11 -0
  46. data/app/services/spree/emails/samples/order.rb +22 -0
  47. data/app/services/spree/emails/samples/order_group.rb +22 -0
  48. data/app/services/spree/emails/samples/password_reset.rb +15 -0
  49. data/app/services/spree/emails/samples/payment_link.rb +17 -0
  50. data/app/services/spree/emails/samples/return.rb +29 -0
  51. data/app/subscribers/spree/order_email_subscriber.rb +2 -2
  52. data/app/subscribers/spree/order_group_email_subscriber.rb +1 -1
  53. data/app/subscribers/spree/return_email_subscriber.rb +2 -0
  54. data/app/views/spree/company_mailer/invitation_email.liquid +13 -0
  55. data/app/views/spree/customer_mailer/data_export_email.liquid +18 -0
  56. data/app/views/spree/customer_mailer/password_reset_email.liquid +14 -0
  57. data/app/views/spree/digital_asset_mailer/files_ready_email.liquid +23 -0
  58. data/app/views/spree/fulfillment_mailer/fulfilled_email.liquid +21 -0
  59. data/app/views/spree/newsletter_mailer/email_confirmation.liquid +13 -0
  60. data/app/views/spree/order_group_mailer/confirm_email.liquid +35 -0
  61. data/app/views/spree/order_group_mailer/store_owner_notification_email.liquid +11 -0
  62. data/app/views/spree/order_mailer/cancel_email.liquid +12 -0
  63. data/app/views/spree/order_mailer/confirm_email.liquid +12 -0
  64. data/app/views/spree/order_mailer/payment_link_email.liquid +12 -0
  65. data/app/views/spree/order_mailer/store_owner_notification_email.liquid +11 -0
  66. data/app/views/spree/return_mailer/refunded_email.liquid +19 -0
  67. data/app/views/spree/seller_mailer/approved_email.liquid +13 -0
  68. data/app/views/spree/seller_mailer/rejected_email.liquid +11 -0
  69. data/app/views/spree/seller_mailer/suspended_email.liquid +11 -0
  70. data/app/views/spree/shared/_fulfillment_group.liquid +25 -0
  71. data/app/views/spree/shared/_line_item.liquid +29 -0
  72. data/app/views/spree/shared/_order_summary.liquid +17 -0
  73. data/app/views/spree/shared/_purchase_totals.liquid +35 -0
  74. data/config/initializers/typelizer.rb +61 -0
  75. data/config/locales/ar.yml +40 -0
  76. data/config/locales/be.yml +37 -0
  77. data/config/locales/bg.yml +31 -0
  78. data/config/locales/ca.yml +35 -0
  79. data/config/locales/cs.yml +38 -0
  80. data/config/locales/da.yml +37 -0
  81. data/config/locales/de-CH.yml +11 -0
  82. data/config/locales/de.yml +38 -0
  83. data/config/locales/el.yml +37 -0
  84. data/config/locales/en.yml +0 -25
  85. data/config/locales/es-CL.yml +21 -0
  86. data/config/locales/es-EC.yml +22 -0
  87. data/config/locales/es-MX.yml +26 -0
  88. data/config/locales/es.yml +40 -0
  89. data/config/locales/et.yml +31 -0
  90. data/config/locales/fa.yml +37 -0
  91. data/config/locales/fi.yml +37 -0
  92. data/config/locales/fr.yml +38 -0
  93. data/config/locales/hu.yml +37 -0
  94. data/config/locales/id.yml +37 -0
  95. data/config/locales/it.yml +38 -0
  96. data/config/locales/ja.yml +36 -0
  97. data/config/locales/km.yml +37 -0
  98. data/config/locales/ko.yml +36 -0
  99. data/config/locales/ku.yml +37 -0
  100. data/config/locales/lt.yml +37 -0
  101. data/config/locales/lv.yml +39 -0
  102. data/config/locales/nb.yml +37 -0
  103. data/config/locales/ne.yml +37 -0
  104. data/config/locales/nl.yml +38 -0
  105. data/config/locales/pl.yml +39 -0
  106. data/config/locales/pt-BR.yml +34 -0
  107. data/config/locales/pt.yml +34 -0
  108. data/config/locales/ro.yml +37 -0
  109. data/config/locales/ru.yml +38 -0
  110. data/config/locales/sk.yml +31 -0
  111. data/config/locales/sl-SI.yml +31 -0
  112. data/config/locales/sv.yml +37 -0
  113. data/config/locales/th.yml +37 -0
  114. data/config/locales/tr.yml +38 -0
  115. data/config/locales/uk.yml +42 -0
  116. data/config/locales/vi.yml +35 -0
  117. data/config/locales/zh-CN.yml +38 -0
  118. data/config/locales/zh-TW.yml +40 -0
  119. data/lib/spree/emails/engine.rb +27 -3
  120. data/lib/spree/emails/previews/company_preview.rb +10 -0
  121. data/lib/spree/emails/previews/customer_preview.rb +4 -0
  122. data/lib/spree/emails/previews/digital_asset_preview.rb +20 -0
  123. metadata +110 -55
  124. data/app/helpers/spree/base_helper.rb +0 -45
  125. data/app/helpers/spree/digital_asset_helper.rb +0 -16
  126. data/app/helpers/spree/fulfillment_helper.rb +0 -12
  127. data/app/helpers/spree/mail_helper.rb +0 -10
  128. data/app/views/spree/company_mailer/invitation_email.html.erb +0 -8
  129. data/app/views/spree/company_mailer/invitation_email.text.erb +0 -11
  130. data/app/views/spree/customer_mailer/data_export_email.html.erb +0 -12
  131. data/app/views/spree/customer_mailer/data_export_email.text.erb +0 -9
  132. data/app/views/spree/customer_mailer/password_reset_email.html.erb +0 -10
  133. data/app/views/spree/customer_mailer/password_reset_email.text.erb +0 -13
  134. data/app/views/spree/digital_asset_mailer/files_ready_email.html.erb +0 -20
  135. data/app/views/spree/digital_asset_mailer/files_ready_email.text.erb +0 -10
  136. data/app/views/spree/fulfillment_mailer/fulfilled_email.html.erb +0 -22
  137. data/app/views/spree/fulfillment_mailer/fulfilled_email.text.erb +0 -18
  138. data/app/views/spree/newsletter_mailer/email_confirmation.html.erb +0 -12
  139. data/app/views/spree/newsletter_mailer/email_confirmation.text.erb +0 -9
  140. data/app/views/spree/order_group_mailer/confirm_email.html.erb +0 -38
  141. data/app/views/spree/order_group_mailer/confirm_email.text.erb +0 -26
  142. data/app/views/spree/order_group_mailer/store_owner_notification_email.html.erb +0 -14
  143. data/app/views/spree/order_group_mailer/store_owner_notification_email.text.erb +0 -11
  144. data/app/views/spree/order_mailer/cancel_email.html.erb +0 -12
  145. data/app/views/spree/order_mailer/cancel_email.text.erb +0 -13
  146. data/app/views/spree/order_mailer/confirm_email.html.erb +0 -12
  147. data/app/views/spree/order_mailer/confirm_email.text.erb +0 -13
  148. data/app/views/spree/order_mailer/payment_link_email.html.erb +0 -11
  149. data/app/views/spree/order_mailer/store_owner_notification_email.html.erb +0 -11
  150. data/app/views/spree/order_mailer/store_owner_notification_email.text.erb +0 -13
  151. data/app/views/spree/return_mailer/refunded_email.html.erb +0 -22
  152. data/app/views/spree/return_mailer/refunded_email.text.erb +0 -20
  153. data/app/views/spree/seller_mailer/approved_email.html.erb +0 -8
  154. data/app/views/spree/seller_mailer/approved_email.text.erb +0 -8
  155. data/app/views/spree/seller_mailer/rejected_email.html.erb +0 -6
  156. data/app/views/spree/seller_mailer/rejected_email.text.erb +0 -7
  157. data/app/views/spree/seller_mailer/suspended_email.html.erb +0 -6
  158. data/app/views/spree/seller_mailer/suspended_email.text.erb +0 -7
  159. data/app/views/spree/shared/_fulfillment_group_section.html.erb +0 -37
  160. data/app/views/spree/shared/_fulfillment_group_section.text.erb +0 -12
  161. data/app/views/spree/shared/_item_thumbnail_link.html.erb +0 -18
  162. data/app/views/spree/shared/_order_summary_section.html.erb +0 -20
  163. data/app/views/spree/shared/_po_number.text.erb +0 -6
  164. data/app/views/spree/shared/_purchase_totals.html.erb +0 -62
  165. data/app/views/spree/shared/_purchase_totals.text.erb +0 -24
  166. data/app/views/spree/shared/_purchased_items_table.html.erb +0 -41
  167. data/app/views/spree/shared/_purchased_items_table.text.erb +0 -28
  168. data/app/views/spree/shared/purchased_items_table/_line_item.html.erb +0 -24
  169. data/app/views/spree/shared/purchased_items_table/_subtotal.html.erb +0 -3
  170. data/app/views/spree/shared/purchased_items_table/_summary_row.html.erb +0 -14
  171. data/app/views/spree/shared/purchased_items_table/_total.html.erb +0 -4
  172. data/config/i18n-tasks.yml +0 -22
@@ -1,8 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('company_mailer.invitation_email.title', company: @company.name) %></h1>
3
- <p class="greeting"><%= Spree.t('company_mailer.invitation_email.greeting') %></p>
4
- <p><%= Spree.t('company_mailer.invitation_email.instructions', company: @company.name, store: current_store.name) %></p>
5
- <%= render 'spree/shared/mailer_button', url: @accept_url, label: Spree.t('company_mailer.invitation_email.action') %>
6
- <p class="sub"><%= Spree.t('company_mailer.invitation_email.expiry_notice') %></p>
7
- <p class="sub"><%= Spree.t('company_mailer.invitation_email.ignore_notice') %></p>
8
- <% end %>
@@ -1,11 +0,0 @@
1
- <%= Spree.t('company_mailer.invitation_email.greeting') %>
2
-
3
- <%= Spree.t('company_mailer.invitation_email.instructions', company: @company.name, store: current_store.name) %>
4
-
5
- <%= Spree.t('company_mailer.invitation_email.action') %>: <%= @accept_url %>
6
-
7
- <%= Spree.t('company_mailer.invitation_email.expiry_notice') %>
8
-
9
- <%= Spree.t('company_mailer.invitation_email.ignore_notice') %>
10
-
11
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,12 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('customer_mailer.data_export_email.action') %></h1>
3
- <p class="greeting"><%= Spree.t('customer_mailer.data_export_email.greeting') %></p>
4
- <p><%= Spree.t('customer_mailer.data_export_email.instructions') %></p>
5
- <% if @download_url %>
6
- <%= render 'spree/shared/mailer_button', url: @download_url, label: Spree.t('customer_mailer.data_export_email.action') %>
7
- <% end %>
8
- <% if @expires_at %>
9
- <p class="sub"><%= Spree.t('customer_mailer.data_export_email.expiry_notice', date: I18n.l(@expires_at.to_date, format: :long)) %></p>
10
- <% end %>
11
- <p class="sub"><%= Spree.t('customer_mailer.data_export_email.ignore_notice') %></p>
12
- <% end %>
@@ -1,9 +0,0 @@
1
- <%= Spree.t('customer_mailer.data_export_email.greeting') %>
2
-
3
- <%= Spree.t('customer_mailer.data_export_email.instructions') %>
4
-
5
- <% if @download_url %><%= @download_url %><% end %>
6
-
7
- <% if @expires_at %><%= Spree.t('customer_mailer.data_export_email.expiry_notice', date: I18n.l(@expires_at.to_date, format: :long)) %><% end %>
8
-
9
- <%= Spree.t('customer_mailer.data_export_email.ignore_notice') %>
@@ -1,10 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('customer_mailer.password_reset_email.action') %></h1>
3
- <p class="greeting"><%= Spree.t('customer_mailer.password_reset_email.greeting', name: @user.first_name.presence || @user.email) %></p>
4
- <p><%= Spree.t('customer_mailer.password_reset_email.instructions') %></p>
5
- <% if @reset_url %>
6
- <%= render 'spree/shared/mailer_button', url: @reset_url, label: Spree.t('customer_mailer.password_reset_email.action') %>
7
- <% end %>
8
- <p class="sub"><%= Spree.t('customer_mailer.password_reset_email.expiry_notice') %></p>
9
- <p class="sub"><%= Spree.t('customer_mailer.password_reset_email.ignore_notice') %></p>
10
- <% end %>
@@ -1,13 +0,0 @@
1
- <%= Spree.t('customer_mailer.password_reset_email.greeting', name: @user.first_name.presence || @user.email) %>
2
-
3
- <%= Spree.t('customer_mailer.password_reset_email.instructions') %>
4
-
5
- <% if @reset_url %>
6
- <%= Spree.t('customer_mailer.password_reset_email.action') %>: <%= @reset_url %>
7
- <% end %>
8
-
9
- <%= Spree.t('customer_mailer.password_reset_email.expiry_notice') %>
10
-
11
- <%= Spree.t('customer_mailer.password_reset_email.ignore_notice') %>
12
-
13
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,20 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('digital_asset_mailer.files_ready_email.subject') %></h1>
3
- <p class="greeting"><%= Spree.t('digital_asset_mailer.files_ready_email.dear_customer', name: name_for(@order)) %></p>
4
- <p><%= Spree.t('digital_asset_mailer.files_ready_email.instructions', number: @order.number) %></p>
5
- <% end %>
6
-
7
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
8
- <% @digital_links.each do |digital_link| %>
9
- <tr>
10
- <td style="padding: 8px 0;">
11
- <a href="<%= digital_link_download_url(digital_link, @download_host) %>"><%= digital_link.filename %></a>
12
- <% if digital_link.expires_at %>
13
- <div style="font-size: 12px; color: #666;">
14
- <%= Spree.t('digital_asset_mailer.files_ready_email.available_until', date: l(digital_link.expires_at.to_date, format: :long)) %>
15
- </div>
16
- <% end %>
17
- </td>
18
- </tr>
19
- <% end %>
20
- </table>
@@ -1,10 +0,0 @@
1
- <%= Spree.t('digital_asset_mailer.files_ready_email.dear_customer', name: name_for(@order)) %>
2
-
3
- <%= Spree.t('digital_asset_mailer.files_ready_email.instructions', number: @order.number) %>
4
-
5
- <% @digital_links.each do |digital_link| %>
6
- <%= digital_link.filename %>
7
- <%= digital_link_download_url(digital_link, @download_host) %>
8
- <% if digital_link.expires_at %><%= Spree.t('digital_asset_mailer.files_ready_email.available_until', date: l(digital_link.expires_at.to_date, format: :long)) %>
9
- <% end %>
10
- <% end %>
@@ -1,22 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <%= render layout: 'spree/shared/mailer_hero' do %>
4
- <h1><%= Spree.t('fulfillment_mailer.fulfilled_email.subject') %></h1>
5
- <p class="greeting"><%= Spree.t('fulfillment_mailer.fulfilled_email.dear_customer', name: name_for(@fulfillment.order)) %></p>
6
- <p><%= Spree.t('fulfillment_mailer.fulfilled_email.instructions', number: @fulfillment.order.number) %></p>
7
- <% if @fulfillment.delivery_method %>
8
- <p><%= Spree.t('fulfillment_mailer.fulfilled_email.delivery_method', delivery_method: @fulfillment.delivery_method.name) %></p>
9
- <% end %>
10
- <% if @fulfillment.tracking %>
11
- <p><%= Spree.t('fulfillment_mailer.fulfilled_email.track_information', tracking: @fulfillment.tracking) %></p>
12
- <% end %>
13
- <% if @fulfillment.tracking_url %>
14
- <p><%= Spree.t('fulfillment_mailer.fulfilled_email.track_link', url: fulfillment_tracking_link_to(fulfillment: @fulfillment)).html_safe %></p>
15
- <% end %>
16
- <% end %>
17
-
18
- <%= render 'spree/shared/order_summary_section',
19
- heading: Spree.t('fulfillment_mailer.fulfilled_email.fulfillment_summary'),
20
- line_items: @fulfillment.manifest.map(&:line_item),
21
- order: @fulfillment.order,
22
- totals: false %>
@@ -1,18 +0,0 @@
1
- <%= Spree.t('fulfillment_mailer.fulfilled_email.dear_customer', name: name_for(@fulfillment.order)) %>
2
-
3
- <%= Spree.t('fulfillment_mailer.fulfilled_email.instructions', number: @fulfillment.order.number) %>
4
-
5
- ============================================================
6
- <%= Spree.t('fulfillment_mailer.fulfilled_email.fulfillment_summary') %>
7
- ============================================================
8
- <%= render 'spree/shared/po_number', order: @fulfillment.order %>
9
- <% @fulfillment.manifest.each do |item| %>
10
- <%= item.variant.sku %> <%= item.variant.product.name %> <%= item.variant.options_text %>
11
- <% end %>
12
- ============================================================
13
-
14
- <%= Spree.t('fulfillment_mailer.fulfilled_email.track_information', tracking: @fulfillment.tracking) if @fulfillment.tracking %>
15
- <%= Spree.t('fulfillment_mailer.fulfilled_email.track_link', url: @fulfillment.tracking_url) if @fulfillment.tracking_url %>
16
-
17
- <%= Spree.t('fulfillment_mailer.fulfilled_email.thanks') %>
18
- <%= Spree.t('fulfillment_mailer.fulfilled_email.store_team', store_name: current_store.name) %>
@@ -1,12 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('newsletter_mailer.email_confirmation.subject') %></h1>
3
- <p class="greeting"><%= Spree.t('newsletter_mailer.email_confirmation.dear_customer') %></p>
4
- <p><%= Spree.t('newsletter_mailer.email_confirmation.instructions') %></p>
5
- <%= render 'spree/shared/mailer_button', url: @confirm_email_url, label: Spree.t('newsletter_mailer.email_confirmation.verify_email_address_link') %>
6
- <p class="sub">
7
- <%= Spree.t('newsletter_mailer.email_confirmation.message_copy_link') %>
8
- <br>
9
- <%= link_to @confirm_email_url, @confirm_email_url %>
10
- </p>
11
- <p class="sub"><%= Spree.t('newsletter_mailer.email_confirmation.ignore_disclaimer') %></p>
12
- <% end %>
@@ -1,9 +0,0 @@
1
- <%= Spree.t('newsletter_mailer.email_confirmation.dear_customer') %>
2
- <%= Spree.t('newsletter_mailer.email_confirmation.instructions') %>
3
-
4
- <%= @confirm_email_url %>
5
-
6
- <%= Spree.t('newsletter_mailer.email_confirmation.ignore_disclaimer') %>
7
- ============================================================
8
- <%= Spree.t('newsletter_mailer.email_confirmation.thanks') %>
9
- <%= Spree.t('newsletter_mailer.email_confirmation.store_team', store_name: current_store.name) %>
@@ -1,38 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <% fulfillment_groups = @order_group.fulfillment_groups %>
4
- <% unfulfilled_line_items = @order_group.unfulfilled_line_items(fulfillment_groups) %>
5
-
6
- <%= render layout: 'spree/shared/mailer_hero' do %>
7
- <h1><%= Spree.t('order_group_mailer.confirm_email.subject') %></h1>
8
- <p class="greeting"><%= Spree.t('order_group_mailer.confirm_email.dear_customer', name: name_for(@order_group)) %></p>
9
- <p><%= Spree.t('order_group_mailer.confirm_email.instructions', number: @order_group.number) %></p>
10
- <%# What the customer most needs and least expects: this arrives in more
11
- than one delivery. Counted from the parcels, never from the orders the
12
- checkout divided into — several sellers shipping out of one warehouse
13
- send one box. %>
14
- <% if fulfillment_groups.many? %>
15
- <p><%= Spree.t('order_group_mailer.confirm_email.arriving_separately', count: fulfillment_groups.size) %></p>
16
- <% end %>
17
- <% end %>
18
-
19
- <% if @order_group.po_number.present? %>
20
- <p class="f-fallback"><%= Spree.t('order_mailer.po_number', number: @order_group.po_number) %></p>
21
- <% end %>
22
-
23
- <% fulfillment_groups.each_with_index do |fulfillment_group, index| %>
24
- <%= render 'spree/shared/fulfillment_group_section',
25
- fulfillment_group: fulfillment_group,
26
- position: index + 1,
27
- count: fulfillment_groups.size %>
28
- <% end %>
29
-
30
- <% if unfulfilled_line_items.any? %>
31
- <%= render 'spree/shared/order_summary_section',
32
- heading: Spree.t('order_group_mailer.nothing_to_ship'),
33
- line_items: unfulfilled_line_items,
34
- order: @order_group,
35
- totals: false %>
36
- <% end %>
37
-
38
- <%= render 'spree/shared/purchase_totals', order_group: @order_group %>
@@ -1,26 +0,0 @@
1
- <% fulfillment_groups = @order_group.fulfillment_groups %>
2
- <% unfulfilled_line_items = @order_group.unfulfilled_line_items(fulfillment_groups) %>
3
- <%= Spree.t('order_group_mailer.confirm_email.dear_customer', name: name_for(@order_group)) %>
4
-
5
- <%= Spree.t('order_group_mailer.confirm_email.instructions', number: @order_group.number) %>
6
- <% if fulfillment_groups.many? %>
7
- <%= Spree.t('order_group_mailer.confirm_email.arriving_separately', count: fulfillment_groups.size) %>
8
- <% end %>
9
- <%= render 'spree/shared/po_number', order: @order_group %>
10
- <% fulfillment_groups.each_with_index do |fulfillment_group, index| %>
11
- ============================================================
12
- <%= render 'spree/shared/fulfillment_group_section',
13
- fulfillment_group: fulfillment_group,
14
- position: index + 1,
15
- count: fulfillment_groups.size %>
16
- <% end %>
17
- <% if unfulfilled_line_items.any? %>
18
- ============================================================
19
- <%= Spree.t('order_group_mailer.nothing_to_ship') %>
20
- <% unfulfilled_line_items.each do |item| %>
21
- <%= item.variant.sku %> <%= item.variant.product.name %> <%= item.variant.options_text -%> (<%= item.quantity %>) <%= Spree.t('at_symbol') %> <%= item.single_money %> = <%= item.display_amount %>
22
- <% end %>
23
- <% end %>
24
- <%= render 'spree/shared/purchase_totals', order_group: @order_group %>
25
- <%= Spree.t('order_group_mailer.confirm_email.thanks') %>
26
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,14 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <%= render layout: 'spree/shared/mailer_hero' do %>
4
- <h1><%= Spree.t('order_group_mailer.store_owner_notification_email.heading') %></h1>
5
- <p><%= Spree.t('order_group_mailer.store_owner_notification_email.instructions', count: @order_group.orders.size) %></p>
6
- <% end %>
7
-
8
- <%= render 'spree/shared/order_summary_section',
9
- heading: Spree.t('order_group_mailer.store_owner_notification_email.purchase_summary', number: @order_group.number),
10
- line_items: @order_group.line_items,
11
- order: @order_group,
12
- totals: false %>
13
-
14
- <%= render 'spree/shared/purchase_totals', order_group: @order_group %>
@@ -1,11 +0,0 @@
1
- <%= Spree.t('order_group_mailer.store_owner_notification_email.instructions', count: @order_group.orders.size) %>
2
-
3
- ============================================================
4
- <%= Spree.t('order_group_mailer.store_owner_notification_email.purchase_summary', number: @order_group.number) %>
5
- ============================================================
6
- <%= render 'spree/shared/po_number', order: @order_group %>
7
- <% @order_group.line_items.each do |item| %>
8
- <%= item.variant.sku %> <%= item.variant.product.name %> <%= item.variant.options_text -%> (<%= item.quantity %>) <%= Spree.t('at_symbol') %> <%= item.single_money %> = <%= item.display_amount %>
9
- <% end %>
10
- <%= render 'spree/shared/purchase_totals', order_group: @order_group %>
11
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,12 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <%= render layout: 'spree/shared/mailer_hero' do %>
4
- <h1><%= Spree.t('order_mailer.cancel_email.subject') %></h1>
5
- <p class="greeting"><%= Spree.t('order_mailer.cancel_email.dear_customer', name: name_for(@order)) %></p>
6
- <p><%= Spree.t('order_mailer.cancel_email.instructions') %></p>
7
- <% end %>
8
-
9
- <%= render 'spree/shared/order_summary_section',
10
- heading: Spree.t('order_mailer.cancel_email.order_summary_canceled', number: @order.number),
11
- line_items: @order.line_items,
12
- order: @order %>
@@ -1,13 +0,0 @@
1
- <%= Spree.t('order_mailer.cancel_email.dear_customer', name: name_for(@order)) %>
2
-
3
- <%= Spree.t('order_mailer.cancel_email.instructions') %>
4
-
5
- ============================================================
6
- <%= Spree.t('order_mailer.cancel_email.order_summary_canceled', number: @order.number) %>
7
- ============================================================
8
- <%= render 'spree/shared/po_number', order: @order %>
9
- <%= render 'spree/shared/purchased_items_table', line_items: @order.line_items, order: @order %>
10
- ============================================================
11
- <%= Spree.t('order_mailer.total') %> <%= @order.display_total %>
12
- <%= Spree.t('order_mailer.cancel_email.thanks') %>
13
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,12 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <%= render layout: 'spree/shared/mailer_hero' do %>
4
- <h1><%= Spree.t('order_mailer.confirm_email.subject') %></h1>
5
- <p class="greeting"><%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %></p>
6
- <p><%= Spree.t('order_mailer.confirm_email.instructions') %></p>
7
- <% end %>
8
-
9
- <%= render 'spree/shared/order_summary_section',
10
- heading: Spree.t('order_mailer.confirm_email.order_summary', number: @order.number),
11
- line_items: @order.line_items,
12
- order: @order %>
@@ -1,13 +0,0 @@
1
- <%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %>
2
-
3
- <%= Spree.t('order_mailer.confirm_email.instructions') %>
4
-
5
- ============================================================
6
- <%= Spree.t('order_mailer.confirm_email.order_summary', number: @order.number) %>
7
- ============================================================
8
- <%= render 'spree/shared/po_number', order: @order %>
9
- <%= render 'spree/shared/purchased_items_table', line_items: @order.line_items, order: @order %>
10
- ============================================================
11
- <%= Spree.t('order_mailer.total') %> <%= @order.display_total %>
12
- <%= Spree.t('order_mailer.confirm_email.thanks') %>
13
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,11 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('order_mailer.payment_link_email.subject', number: @order.number) %></h1>
3
- <p class="greeting"><%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %></p>
4
- <p><%= Spree.t('order_mailer.payment_link_email.message', store_name: @current_store.name) %></p>
5
- <%= render 'spree/shared/mailer_button', url: @checkout_payment_url, label: Spree.t('order_mailer.payment_link_email.pay_for_order') %>
6
- <p class="sub">
7
- <%= Spree.t('order_mailer.payment_link_email.message_copy_link') %>
8
- <br>
9
- <%= link_to @checkout_payment_url, @checkout_payment_url %>
10
- </p>
11
- <% end %>
@@ -1,11 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <%= render layout: 'spree/shared/mailer_hero' do %>
4
- <h1><%= Spree.t('order_mailer.store_owner_notification_email.heading') %></h1>
5
- <p><%= Spree.t('order_mailer.store_owner_notification_email.instructions') %></p>
6
- <% end %>
7
-
8
- <%= render 'spree/shared/order_summary_section',
9
- heading: Spree.t('order_mailer.store_owner_notification_email.order_summary', number: @order.number),
10
- line_items: @order.line_items,
11
- order: @order %>
@@ -1,13 +0,0 @@
1
- <%= Spree.t('order_mailer.store_owner_notification_email.heading') %>
2
-
3
- <%= Spree.t('order_mailer.store_owner_notification_email.instructions') %>
4
-
5
- ============================================================
6
- <%= Spree.t('order_mailer.store_owner_notification_email.order_summary', number: @order.number) %>
7
- ============================================================
8
- <%= render 'spree/shared/po_number', order: @order %>
9
- <%= render 'spree/shared/purchased_items_table', line_items: @order.line_items, order: @order %>
10
- ============================================================
11
- <%= Spree.t('order_mailer.total') %> <%= @order.display_total %>
12
- <%= Spree.t('order_mailer.store_owner_notification_email.thanks') %>
13
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,22 +0,0 @@
1
- <%= render 'spree/shared/purchased_items_styles' %>
2
-
3
- <%= render layout: 'spree/shared/mailer_hero' do %>
4
- <h1><%= Spree.t('return_mailer.refunded_email.subject') %></h1>
5
- <p class="greeting"><%= Spree.t('return_mailer.refunded_email.dear_customer', name: name_for(@order)) %></p>
6
- <p><%= Spree.t('return_mailer.refunded_email.instructions', number: @order.number) %></p>
7
- <% end %>
8
-
9
- <table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation">
10
- <tr>
11
- <td>
12
- <h3 class="f-fallback"><%= Spree.t('return_mailer.refunded_email.refund_summary') %></h3>
13
- <p class="strong f-fallback"><%= Spree.t('return_mailer.refunded_email.total_refunded', total: @return.display_refunded_total) %></p>
14
- </td>
15
- </tr>
16
- </table>
17
-
18
- <%= render 'spree/shared/order_summary_section',
19
- heading: Spree.t('return_mailer.refunded_email.returned_items'),
20
- line_items: @return.return_line_items.map(&:line_item),
21
- order: @order,
22
- totals: false %>
@@ -1,20 +0,0 @@
1
- <%= Spree.t('return_mailer.refunded_email.dear_customer', name: name_for(@order)) %>
2
-
3
- <%= Spree.t('return_mailer.refunded_email.instructions', number: @order.number) %>
4
-
5
- ============================================================
6
- <%= Spree.t('return_mailer.refunded_email.refund_summary') %>
7
- ============================================================
8
- <%= render 'spree/shared/po_number', order: @order %>
9
- <%= Spree.t('return_mailer.refunded_email.total_refunded', total: @return.display_refunded_total) %>
10
-
11
- ============================================================
12
- <%= Spree.t('return_mailer.refunded_email.returned_items') %>
13
- ============================================================
14
- <% @return.return_line_items.each do |line| %>
15
- <%= line.variant.sku %> <%= line.variant.product.name %> <%= line.variant.options_text %>
16
- <% end %>
17
- ============================================================
18
-
19
- <%= Spree.t('return_mailer.refunded_email.thanks') %>
20
- <%= Spree.t('return_mailer.refunded_email.store_team', store_name: current_store.name) %>
@@ -1,8 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('seller_mailer.approved_email.heading') %></h1>
3
- <p class="greeting"><%= Spree.t('seller_mailer.greeting', seller_name: @seller.name) %></p>
4
- <p><%= Spree.t('seller_mailer.approved_email.message', store_name: current_store.name) %></p>
5
- <% if @dashboard_url %>
6
- <%= render 'spree/shared/mailer_button', url: @dashboard_url, label: Spree.t('seller_mailer.approved_email.action') %>
7
- <% end %>
8
- <% end %>
@@ -1,8 +0,0 @@
1
- <%= Spree.t('seller_mailer.greeting', seller_name: @seller.name) %>
2
-
3
- <%= Spree.t('seller_mailer.approved_email.message', store_name: current_store.name) %>
4
- <% if @dashboard_url %>
5
- <%= Spree.t('seller_mailer.approved_email.action') %>: <%= @dashboard_url %>
6
- <% end %>
7
-
8
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,6 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('seller_mailer.rejected_email.heading') %></h1>
3
- <p class="greeting"><%= Spree.t('seller_mailer.greeting', seller_name: @seller.name) %></p>
4
- <p><%= Spree.t('seller_mailer.rejected_email.message', store_name: current_store.name) %></p>
5
- <p class="sub"><%= Spree.t('seller_mailer.get_in_touch', store_email: current_store.mail_from_address) %></p>
6
- <% end %>
@@ -1,7 +0,0 @@
1
- <%= Spree.t('seller_mailer.greeting', seller_name: @seller.name) %>
2
-
3
- <%= Spree.t('seller_mailer.rejected_email.message', store_name: current_store.name) %>
4
-
5
- <%= Spree.t('seller_mailer.get_in_touch', store_email: current_store.mail_from_address) %>
6
-
7
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,6 +0,0 @@
1
- <%= render layout: 'spree/shared/mailer_hero' do %>
2
- <h1><%= Spree.t('seller_mailer.suspended_email.heading') %></h1>
3
- <p class="greeting"><%= Spree.t('seller_mailer.greeting', seller_name: @seller.name) %></p>
4
- <p><%= Spree.t('seller_mailer.suspended_email.message', store_name: current_store.name) %></p>
5
- <p class="sub"><%= Spree.t('seller_mailer.get_in_touch', store_email: current_store.mail_from_address) %></p>
6
- <% end %>
@@ -1,7 +0,0 @@
1
- <%= Spree.t('seller_mailer.greeting', seller_name: @seller.name) %>
2
-
3
- <%= Spree.t('seller_mailer.suspended_email.message', store_name: current_store.name) %>
4
-
5
- <%= Spree.t('seller_mailer.get_in_touch', store_email: current_store.mail_from_address) %>
6
-
7
- <%= Spree.t('order_mailer.store_team', store_name: current_store.name) %>
@@ -1,37 +0,0 @@
1
- <%# One real parcel of a purchase, with the goods it carries and what it cost
2
- to deliver. Locals: fulfillment_group, position, count.
3
-
4
- A purchase arriving in one parcel is not numbered — "Delivery 1 of 1"
5
- tells the customer nothing they did not already assume.
6
-
7
- Rendered from the parcel's manifest rather than its line items: a line
8
- packed from two warehouses travels in two parcels, and its own quantity
9
- describes the whole order rather than this box. %>
10
- <table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation">
11
- <tr>
12
- <td>
13
- <h3 class="f-fallback">
14
- <% if count > 1 %>
15
- <%= Spree.t('order_group_mailer.delivery_numbered', position: position, count: count) %>
16
- <% else %>
17
- <%= Spree.t('order_group_mailer.delivery') %>
18
- <% end %>
19
- </h3>
20
- <% if fulfillment_group.sellers.any? %>
21
- <p class="f-fallback sub"><%= Spree.t('order_group_mailer.sold_by', sellers: fulfillment_group.sellers.map(&:name).to_sentence) %></p>
22
- <% end %>
23
- <% fulfillment_group.manifest.each do |item| %>
24
- <%= render 'spree/shared/purchased_items_table/line_item',
25
- line_item: item.line_item,
26
- quantity: item.quantity,
27
- amount: Spree::Money.new(item.line_item.price * item.quantity, currency: item.line_item.currency) %>
28
- <% end %>
29
- <table class="summary purchase_content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
30
- <%= render 'spree/shared/purchased_items_table/summary_row',
31
- label: Spree.t(:shipping),
32
- sub: fulfillment_group.name,
33
- value: fulfillment_group.display_cost %>
34
- </table>
35
- </td>
36
- </tr>
37
- </table>
@@ -1,12 +0,0 @@
1
- <% if count > 1 %>
2
- <%= Spree.t('order_group_mailer.delivery_numbered', position: position, count: count) %>
3
- <% else %>
4
- <%= Spree.t('order_group_mailer.delivery') %>
5
- <% end %>
6
- <% if fulfillment_group.sellers.any? %>
7
- <%= Spree.t('order_group_mailer.sold_by', sellers: fulfillment_group.sellers.map(&:name).to_sentence) %>
8
- <% end %>
9
- <% fulfillment_group.manifest.each do |item| %>
10
- <%= item.variant.sku %> <%= item.variant.product.name %> <%= item.variant.options_text -%> (<%= item.quantity %>) <%= Spree.t('at_symbol') %> <%= item.line_item.single_money %> = <%= Spree::Money.new(item.line_item.price * item.quantity, currency: item.line_item.currency) %>
11
- <% end %>
12
- <%= Spree.t(:shipping) %>: <%= fulfillment_group.name %> <%= fulfillment_group.display_cost %>
@@ -1,18 +0,0 @@
1
- <%# Rounded 80px product thumbnail linking to the product page, with a
2
- no-image fallback. Locals: image, product_url, alt. %>
3
- <% if image.present? && image.attached? %>
4
- <%= link_to spree_image_tag(image, variant: :small, alt: alt, width: 80, class: 'item_thumb'), product_url %>
5
- <% else %>
6
- <%# Table + inline styles, not a styled div: Outlook collapses empty block
7
- elements and ignores class-based height, and a div inside <a> is invalid
8
- under the XHTML doctype the mailer layout declares. %>
9
- <table class="item_thumb_placeholder" width="80" height="80" cellpadding="0" cellspacing="0" role="presentation"
10
- style="width: 80px; height: 80px; background-color: #E4E4E4; border-radius: 12px;">
11
- <tr>
12
- <td width="80" height="80" style="width: 80px; height: 80px; line-height: 80px; font-size: 0;">
13
- <%= link_to '&#160;'.html_safe, product_url, 'aria-label': alt,
14
- style: 'display: block; width: 80px; height: 80px; line-height: 80px; text-decoration: none;' %>
15
- </td>
16
- </tr>
17
- </table>
18
- <% end %>
@@ -1,20 +0,0 @@
1
- <%# Labelled line-items + totals section shared by the order-related emails.
2
- Locals: heading, line_items, order, optional totals (default true — pass
3
- false when line_items is a subset of the order, e.g. one shipment's items,
4
- so whole-order amounts aren't shown next to a partial item list). %>
5
- <table class="section" width="100%" cellpadding="0" cellspacing="0" role="presentation">
6
- <tr>
7
- <td>
8
- <h3 class="f-fallback"><%= heading %></h3>
9
- <%# The buyer's own purchase-order reference, when they gave one — it is
10
- how their accounting reconciles this order. %>
11
- <% if order.po_number.present? %>
12
- <p class="f-fallback"><%= Spree.t('order_mailer.po_number', number: order.po_number) %></p>
13
- <% end %>
14
- <%= render 'spree/shared/purchased_items_table',
15
- line_items: line_items,
16
- order: order,
17
- totals: local_assigns.fetch(:totals, true) %>
18
- </td>
19
- </tr>
20
- </table>
@@ -1,6 +0,0 @@
1
- <%# The buyer's own purchase-order reference, when they gave one. Rendered by
2
- every order-facing document so their accounting can reconcile against it.
3
- Locals: order. %>
4
- <% if order.po_number.present? %>
5
- <%= Spree.t('order_mailer.po_number', number: order.po_number) %>
6
- <% end %>