Module: Spree::Order::Emails

Extended by:
ActiveSupport::Concern
Included in:
Spree::Order
Defined in:
app/models/spree/order/emails.rb

Instance Method Summary collapse

Instance Method Details

#deliver_order_confirmation_emailObject



6
7
8
9
10
11
# File 'app/models/spree/order/emails.rb', line 6

def deliver_order_confirmation_email
  # you can overwrite this method in your application / extension to send out the confirmation email
  # or use `spree_emails` gem
  # YourEmailVendor.deliver_order_confirmation_email(id) # `id` = ID of the Order being sent, you can also pass the entire Order object using `self`
  # update_column(:confirmation_delivered, true) # if you would like to mark that the email was sent
end

#deliver_store_owner_order_notification_emailObject



18
19
20
21
22
23
# File 'app/models/spree/order/emails.rb', line 18

def deliver_store_owner_order_notification_email
  # you can overwrite this method in your application / extension to send out the confirmation email
  # or use `spree_emails` gem
  # YourEmailVendor.deliver_store_owner_notification_email(id) # `id` = ID of the Order being sent, you can also pass the entire Order object using `self`
  # update_column(:store_owner_notification_delivered, true) # if you would like to mark that the email was sent
end

#deliver_store_owner_order_notification_email?Boolean

If you would like to also send confirmation email to store owner(s)

Returns:

  • (Boolean)


14
15
16
# File 'app/models/spree/order/emails.rb', line 14

def deliver_store_owner_order_notification_email?
  false
end

#send_cancel_emailObject



25
26
27
28
29
# File 'app/models/spree/order/emails.rb', line 25

def send_cancel_email
  # you can overwrite this method in your application / extension to send out the confirmation email
  # or use `spree_emails` gem
  # YourEmailVendor.deliver_cancel_email(id) # `id` = ID of the Order being sent, you can also pass the entire Order object using `self`
end