Sha256: 21b45b17d36cb285c340bf82c2c1677b16d37fef85c6115f64e907d17b482602
Contents?: true
Size: 1.04 KB
Versions: 6
Compression:
Stored size: 1.04 KB
Contents
module Spree class OrderMailer < BaseMailer def confirm_email(order, resend = false) @order = order @store = @order.store subject = build_subject(t('.subject'), resend) mail(to: @order.email, from: from_address(@store), subject: subject) end def cancel_email(order, resend = false) @order = order @store = @order.store subject = build_subject(t('.subject'), resend) mail(to: @order.email, from: from_address(@store), subject: subject) end def inventory_cancellation_email(order, inventory_units, resend = false) @order, @inventory_units = order, inventory_units @store = @order.store subject = build_subject(t('spree.order_mailer.inventory_cancellation.subject'), resend) mail(to: @order.email, from: from_address(@store), subject: subject) end private def build_subject(subject_text, resend) resend_text = (resend ? "[#{t('spree.resend').upcase}] " : '') "#{resend_text}#{@order.store.name} #{subject_text} ##{@order.number}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems