mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
#275: small tweaks.
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
require 'devise/mailers/helpers'
|
||||
class ProducerMailer < ActionMailer::Base Spree::BaseMailer
|
||||
include Devise::Mailers::Helpers
|
||||
|
||||
class ProducerMailer < Spree::BaseMailer
|
||||
|
||||
def order_cycle_report(producer, order_cycle)
|
||||
@producer = producer
|
||||
@coordinator = order_cycle.coordinator
|
||||
@order_cycle = order_cycle
|
||||
subject = "[Open Food Network] Order cycle report for "
|
||||
|
||||
# TODO: consider what happens if there is more than one distributor
|
||||
first_producer = @order_cycle.distributors[0]
|
||||
@distribution_date = @order_cycle.pickup_time_for first_producer
|
||||
# puts @distribution_date
|
||||
|
||||
subject = "[Open Food Network] Order cycle report for #{@distribution_date}"
|
||||
mail(to: @producer.email, from: from_address, subject: subject)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Dear #{@producer.name},
|
||||
|
||||
We now have all the consumer orders for the food drop on #{}.
|
||||
Please deliver to #{coordinator.address} between 9:30am and 10:30am. If this is not convenient then please call #{@coordinator.phone}.
|
||||
We now have all the consumer orders for the food drop on #{@distribution_date}.
|
||||
Please deliver to #{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode} during the regular delivery time. If this is not convenient then please call #{@coordinator.phone}.
|
||||
|
||||
NB If you have to arrange a different delivery day and time, the school has requested that you do not come on site during drop off/pick up times (8:45-9:15 and 15:00-15:30)
|
||||
|
||||
@@ -10,7 +10,7 @@ Orders summary
|
||||
|
||||
Here is a summary of the orders for your products:
|
||||
|
||||
- @order_cycle.exchange_for_distributor.each do |exchange|
|
||||
/ - @order_cycle.exchange_for_distributor.each do |exchange|
|
||||
|
||||
|
||||
Detailed orders breakdown
|
||||
|
||||
Reference in New Issue
Block a user