Class: Workarea::Storefront::OrderMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- ApplicationMailer
- Workarea::Storefront::OrderMailer
- Includes:
- TransactionalMailer
- Defined in:
- app/mailers/workarea/storefront/order_mailer.rb
Instance Method Summary collapse
Methods included from TransactionalMailer
Methods inherited from ApplicationMailer
Instance Method Details
#confirmation(order_id) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/mailers/workarea/storefront/order_mailer.rb', line 6 def confirmation(order_id) order = Order.find(order_id) @order = Storefront::OrderViewModel.new(order) @content = Content::Email.find_content('order_confirmation') @recommendations = Storefront::EmailRecommendationsViewModel.wrap(order) mail( to: @order.email, subject: t('workarea.storefront.email.order_confirmation.subject', order_id: @order.id) ) end |
#reminder(order_id) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/mailers/workarea/storefront/order_mailer.rb', line 18 def reminder(order_id) order = Order.find(order_id) @order = Storefront::OrderViewModel.new(order) @content = Content::Email.find_content('order_reminder') @recommendations = Storefront::EmailRecommendationsViewModel.wrap(order) mail( to: order.email, subject: t('workarea.storefront.email.order_reminder.subject') ) end |