Sha256: 53638f7670408a48bd1bc4fa99fb2075b02e90bac1d8a65b9804c32041927009
Contents?: true
Size: 634 Bytes
Versions: 9
Compression:
Stored size: 634 Bytes
Contents
module Spree class VendorMailer < ::Spree::BaseMailer def vendor_notification_email(order_id, vendor_id) @vendor = Spree::Vendor.find(vendor_id) return unless @vendor.notification_email.present? @order = Spree::Order.find(order_id) @line_items = @order.line_items.for_vendor(@vendor) @subtotal = @order.vendor_subtotal(@vendor) @total = @order.vendor_total(@vendor) subject = "#{Spree::Store.current.name} #{Spree.t('order_mailer.vendor_notification_email.subject')} ##{@order.number}" mail(to: @vendor.notification_email, from: from_address, subject: subject) end end end
Version data entries
9 entries across 9 versions & 2 rubygems