mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-12 23:27:48 +00:00
Use shop contact email and contact name for subscription emails
This commit is contained in:
@@ -29,7 +29,7 @@ class SubscriptionMailer < Spree::BaseMailer
|
||||
def placement_summary_email(summary)
|
||||
@shop = Enterprise.find(summary.shop_id)
|
||||
@summary = summary
|
||||
mail(to: @shop.email,
|
||||
mail(to: @shop.contact.email,
|
||||
from: from_address,
|
||||
subject: "#{Spree::Config[:site_name]} #{t('subscription_mailer.placement_summary_email.subject')}")
|
||||
end
|
||||
@@ -37,7 +37,7 @@ class SubscriptionMailer < Spree::BaseMailer
|
||||
def confirmation_summary_email(summary)
|
||||
@shop = Enterprise.find(summary.shop_id)
|
||||
@summary = summary
|
||||
mail(to: @shop.email,
|
||||
mail(to: @shop.contact.email,
|
||||
from: from_address,
|
||||
subject: "#{Spree::Config[:site_name]} #{t('subscription_mailer.confirmation_summary_email.subject')}")
|
||||
end
|
||||
@@ -49,6 +49,6 @@ class SubscriptionMailer < Spree::BaseMailer
|
||||
mail(to: order.email,
|
||||
from: from_address,
|
||||
subject: subject,
|
||||
reply_to: order.distributor.email)
|
||||
reply_to: order.distributor.contact.email)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
= t("email_so_edit_false_html",
|
||||
orders_close_at: l(@order.order_cycle.orders_close_at, format: "%a %b %d @ %l:%M%p"),
|
||||
order_url: spree.order_url(@order))
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.email)
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
|
||||
%p
|
||||
%h4
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%tr
|
||||
%td
|
||||
%h3
|
||||
= t(".greeting", name: @shop.contact)
|
||||
= t(".greeting", name: @shop.contact_name)
|
||||
%h4
|
||||
= t(".intro", shop: @shop.name)
|
||||
%table.column{:align => "left"}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
%p.callout
|
||||
= t("email_so_empty_explainer_html")
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.email)
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
|
||||
%p
|
||||
%h4
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
= t("email_so_edit_false_html",
|
||||
orders_close_at: l(@order.order_cycle.orders_close_at, format: "%a %b %d @ %l:%M%p"),
|
||||
order_url: spree.order_url(@order))
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.email)
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
|
||||
- if @order.errors.any?
|
||||
%p
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
= t("email_so_edit_#{allow_changes}_html",
|
||||
orders_close_at: l(@order.order_cycle.orders_close_at, format: "%a %b %d @ %l:%M%p"),
|
||||
order_url: spree.order_url(@order))
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.email)
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
|
||||
%p
|
||||
%h4
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%tr
|
||||
%td
|
||||
%h3
|
||||
= t(".greeting", name: @shop.contact)
|
||||
= t(".greeting", name: @shop.contact_name)
|
||||
%h4
|
||||
= t(".intro", shop: @shop.name)
|
||||
%table.column{:align => "left"}
|
||||
|
||||
Reference in New Issue
Block a user