Merge pull request #8541 from jibees/8506-improve-shiped-email

Improve shipped email design
This commit is contained in:
Filipe
2022-01-11 11:36:32 +00:00
committed by GitHub
2 changed files with 18 additions and 11 deletions

View File

@@ -1,22 +1,18 @@
%p
%h3
= t('.dear_customer')
%p
%p.lead
= t('.instructions', distributor: @shipment.order.distributor.name)
%p
= "============================================================"
%br
= t('.shipment_summary')
%br
= "============================================================"
%strong
= t('.shipment_summary')
%p
%p{ style: "font-family: monospace, serif;" }
- @shipment.manifest.each do |item|
= item.variant.sku
= item.variant.product.name
= item.variant.options_text
%br
= "============================================================"
%br
- if @shipment.tracking
%p
@@ -26,5 +22,5 @@
%p
= t('.track_link', url: @shipment.tracking_url)
%p
%p.lead
= t('.thanks')

View File

@@ -0,0 +1,11 @@
# frozen_string_literal: true
require 'open_food_network/scope_variant_to_hub'
module Spree
class ShipmentPreview < ActionMailer::Preview
def shipped
ShipmentMailer.shipped_email(Shipment.last)
end
end
end