Sha256: 7d57d775b9f349487348f49bf2ce2590da5dea701ce85c2d3f04e7157fd44974
Contents?: true
Size: 874 Bytes
Versions: 29
Compression:
Stored size: 874 Bytes
Contents
module Spree module Emails module OrderDecorator def deliver_order_confirmation_email OrderMailer.confirm_email(id).deliver_later update_column(:confirmation_delivered, true) end # Returns true if: # 1. an email address is set for new order notifications AND # 2. no notification for this order has been sent yet. def deliver_store_owner_order_notification_email? store.new_order_notifications_email.present? && !store_owner_notification_delivered? end def deliver_store_owner_order_notification_email OrderMailer.store_owner_notification_email(id).deliver_later update_column(:store_owner_notification_delivered, true) end def send_cancel_email OrderMailer.cancel_email(id).deliver_later end ::Spree::Order.prepend(self) end end end
Version data entries
29 entries across 29 versions & 1 rubygems