mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge branch 'email-changes'
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -39,6 +39,7 @@ end
|
||||
gem 'jquery-rails'
|
||||
|
||||
|
||||
|
||||
group :test, :development do
|
||||
# Pretty printed test output
|
||||
gem 'turn', '~> 0.8.3', :require => false
|
||||
@@ -51,5 +52,6 @@ group :test, :development do
|
||||
gem 'spork', '~> 1.0rc'
|
||||
gem 'pry-debugger'
|
||||
gem 'awesome_print'
|
||||
gem "letter_opener"
|
||||
end
|
||||
|
||||
|
||||
@@ -214,6 +214,10 @@ GEM
|
||||
activesupport (>= 3.0.0)
|
||||
railties (>= 3.0.0)
|
||||
kgio (2.7.4)
|
||||
launchy (2.1.2)
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.0.0)
|
||||
launchy (>= 2.0.4)
|
||||
libv8 (3.3.10.4)
|
||||
libwebsocket (0.1.5)
|
||||
addressable
|
||||
@@ -365,6 +369,7 @@ DEPENDENCIES
|
||||
faker
|
||||
haml
|
||||
jquery-rails
|
||||
letter_opener
|
||||
pg
|
||||
pry-debugger
|
||||
rails (= 3.2.11)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
Dear Customer,
|
||||
Dear <%= @order.bill_address.firstname %>,
|
||||
|
||||
Please review and retain the following order information for your records.
|
||||
|
||||
============================================================
|
||||
Order Summary
|
||||
============================================================
|
||||
Order for: <%= @order.bill_address.full_name %>
|
||||
<% @order.line_items.each do |item| %>
|
||||
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
||||
<% end %>
|
||||
@@ -15,15 +16,22 @@ Subtotal: <%= number_to_currency @order.item_total %>
|
||||
<% end %>
|
||||
Order Total: <%= number_to_currency(@order.total) %>
|
||||
|
||||
<% if @order.payment_method.name.include? "EFT" %>
|
||||
============================================================
|
||||
Delivery Details
|
||||
Payment Details
|
||||
============================================================
|
||||
<%= @order.payment_method.description.html_safe %>
|
||||
|
||||
<% end %>
|
||||
============================================================
|
||||
Collection / Delivery Details
|
||||
============================================================
|
||||
Address:
|
||||
<%= @order.distributor.name %>
|
||||
<% address = @order.distributor.address %>
|
||||
<%= address.address1 %> <%= ",\n #{address.address2}" unless address.address2.blank? %>
|
||||
<%= [address.city, address.state_text, address.zipcode, address.country.name].compact.join ', ' %>
|
||||
Colection time:
|
||||
Collection time:
|
||||
<%= @order.distributor.next_collection_at %>
|
||||
Contact:
|
||||
<%= @order.distributor.contact %>
|
||||
|
||||
@@ -27,6 +27,9 @@ Openfoodweb::Application.configure do
|
||||
|
||||
# Expands the lines which load the assets
|
||||
config.assets.debug = true
|
||||
|
||||
# Show emails using Letter Opener
|
||||
config.action_mailer.delivery_method = :letter_opener
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user