spree_emails 4.4.0 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/spree/mail_helper.rb +4 -14
- data/app/mailers/spree/base_mailer.rb +4 -0
- data/app/mailers/spree/order_mailer.rb +3 -3
- data/app/mailers/spree/reimbursement_mailer.rb +1 -1
- data/app/mailers/spree/shipment_mailer.rb +1 -1
- data/app/mailers/spree/test_mailer.rb +1 -1
- data/app/views/spree/shared/_base_mailer_header.html.erb +5 -1
- data/app/views/spree/shared/_base_mailer_stylesheets.html.erb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 687d36f5a175c7c2f16de6b9cff4e8491360844e7d96dcd11f4b347f04c958fc
|
4
|
+
data.tar.gz: 39fbca5e6f9e2dd6e5394227ff67f17bbc6663f5c945f9323bb7442b607a42c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96343178f45f7e9c7d5b9972de8accfab7bbc7e2ab801ee5e598ad84ce11d4d4a808b3d13870ae4c3de87f163815e3f889a00acc2e6360cc2dc3902a06d00c2f
|
7
|
+
data.tar.gz: cdd8d1311ac9a34558d0c1e03a61978d9a201f9aa640bd5cdb89009ce8d32f24529290fd08b5d2a5b54bd731e4c693f8364feb45c3e20f2555522eec1ea494a1
|
@@ -4,7 +4,7 @@ module Spree
|
|
4
4
|
|
5
5
|
def variant_image_url(variant)
|
6
6
|
image = default_image_for_product_or_variant(variant)
|
7
|
-
image ? main_app.
|
7
|
+
image ? main_app.cdn_image_url(image.url(:small)) : image_url('noimage/small.png')
|
8
8
|
end
|
9
9
|
|
10
10
|
def name_for(order)
|
@@ -12,23 +12,13 @@ module Spree
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def store_logo
|
15
|
-
@store_logo ||= current_store&.mailer_logo || current_store&.logo
|
16
|
-
end
|
17
|
-
|
18
|
-
def default_logo
|
19
|
-
ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
|
20
|
-
`MailHelper#default_logo` is deprecated and will be removed in Spree 5.0.
|
21
|
-
Please upload a Store logo instead
|
22
|
-
DEPRECATION
|
23
|
-
|
24
|
-
image_url('logo/spree_50.png')
|
15
|
+
@store_logo ||= current_store&.mailer_logo&.attachment || current_store&.logo&.attachment
|
25
16
|
end
|
26
17
|
|
27
18
|
def logo_path
|
28
|
-
return
|
29
|
-
return main_app.url_for(store_logo.variant(resize: '244x104>')) if store_logo.variable?
|
19
|
+
return main_app.cdn_image_url(store_logo.variant(resize_to_limit: [244, 104])) if store_logo&.variable?
|
30
20
|
|
31
|
-
return main_app.
|
21
|
+
return main_app.cdn_image_url(store_logo) if store_logo&.image?
|
32
22
|
end
|
33
23
|
end
|
34
24
|
end
|
@@ -11,6 +11,10 @@ module Spree
|
|
11
11
|
current_store.mail_from_address
|
12
12
|
end
|
13
13
|
|
14
|
+
def reply_to_address
|
15
|
+
current_store.mail_from_address
|
16
|
+
end
|
17
|
+
|
14
18
|
def money(amount, currency = nil)
|
15
19
|
currency ||= current_store.default_currency
|
16
20
|
Spree::Money.new(amount, currency: currency).to_s
|
@@ -5,14 +5,14 @@ module Spree
|
|
5
5
|
current_store = @order.store
|
6
6
|
subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
|
7
7
|
subject += "#{current_store.name} #{Spree.t('order_mailer.confirm_email.subject')} ##{@order.number}"
|
8
|
-
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url)
|
8
|
+
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url, reply_to: reply_to_address)
|
9
9
|
end
|
10
10
|
|
11
11
|
def store_owner_notification_email(order)
|
12
12
|
@order = order.respond_to?(:id) ? order : Spree::Order.find(order)
|
13
13
|
current_store = @order.store
|
14
14
|
subject = Spree.t('order_mailer.store_owner_notification_email.subject', store_name: current_store.name)
|
15
|
-
mail(to: current_store.new_order_notifications_email, from: from_address, subject: subject, store_url: current_store.url)
|
15
|
+
mail(to: current_store.new_order_notifications_email, from: from_address, subject: subject, store_url: current_store.url, reply_to: reply_to_address)
|
16
16
|
end
|
17
17
|
|
18
18
|
def cancel_email(order, resend = false)
|
@@ -20,7 +20,7 @@ module Spree
|
|
20
20
|
current_store = @order.store
|
21
21
|
subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
|
22
22
|
subject += "#{current_store.name} #{Spree.t('order_mailer.cancel_email.subject')} ##{@order.number}"
|
23
|
-
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url)
|
23
|
+
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url, reply_to: reply_to_address)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -6,7 +6,7 @@ module Spree
|
|
6
6
|
current_store = @reimbursement.store || Spree::Store.default
|
7
7
|
subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
|
8
8
|
subject += "#{current_store.name} #{Spree.t('reimbursement_mailer.reimbursement_email.subject')} ##{@order.number}"
|
9
|
-
mail(to: @order.email, from:
|
9
|
+
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url, reply_to: reply_to_address)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -6,7 +6,7 @@ module Spree
|
|
6
6
|
current_store = @shipment.store
|
7
7
|
subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
|
8
8
|
subject += "#{current_store.name} #{Spree.t('shipment_mailer.shipped_email.subject')} ##{@order.number}"
|
9
|
-
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url)
|
9
|
+
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url, reply_to: reply_to_address)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -2,7 +2,7 @@ module Spree
|
|
2
2
|
class TestMailer < BaseMailer
|
3
3
|
def test_email(email)
|
4
4
|
subject = "#{Spree::Store.default.name} #{Spree.t('test_mailer.test_email.subject')}"
|
5
|
-
mail(to: email, from: from_address, subject: subject)
|
5
|
+
mail(to: email, from: from_address, reply_to: reply_to_address, subject: subject)
|
6
6
|
end
|
7
7
|
end
|
8
8
|
end
|
@@ -2,7 +2,11 @@
|
|
2
2
|
<tr>
|
3
3
|
<td class="email-masthead">
|
4
4
|
<%= link_to current_store.url, class: 'template-label' do %>
|
5
|
-
|
5
|
+
<% if logo_path.present? %>
|
6
|
+
<%= image_tag logo_path, class: 'logo', alt: current_store.name, title: current_store.name %>
|
7
|
+
<% else %>
|
8
|
+
<%= current_store.name %>
|
9
|
+
<% end %>
|
6
10
|
<% end %>
|
7
11
|
</td>
|
8
12
|
</tr>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_emails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-01
|
12
|
+
date: 2022-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_core
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.
|
20
|
+
version: 4.5.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 4.
|
27
|
+
version: 4.5.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: actionmailer
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,9 +134,9 @@ licenses:
|
|
134
134
|
- BSD-3-Clause
|
135
135
|
metadata:
|
136
136
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
137
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.
|
137
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.5.0
|
138
138
|
documentation_uri: https://dev-docs.spreecommerce.org/
|
139
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.
|
139
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.5.0
|
140
140
|
post_install_message:
|
141
141
|
rdoc_options: []
|
142
142
|
require_paths:
|