spree_emails 4.4.1 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 765e1eeabd1e558bb00f50a9735b29adef9c0b94fb45846422f7a2a11c174e34
4
- data.tar.gz: 9b2b5fb8e227fa065cc4e0d13820a9b41a72809662b2c749f1415a511231c91c
3
+ metadata.gz: 687d36f5a175c7c2f16de6b9cff4e8491360844e7d96dcd11f4b347f04c958fc
4
+ data.tar.gz: 39fbca5e6f9e2dd6e5394227ff67f17bbc6663f5c945f9323bb7442b607a42c3
5
5
  SHA512:
6
- metadata.gz: a538a987c3a0661f2fb9668c44eb8c27d68a813c64bcfff58bf0dbee8b7b9ab1f6ebc8d7d4dfde80f9df7efceaf6b2290a4527f51f07bbd27767a0d1ba86cb6f
7
- data.tar.gz: d32b60398b87efd76bfe520e440e33ec3aa15b36d1c02c947cc259914a5ff1b282e91a851d170f84435fd50a2d9903dcb4f372868029c867d20b10a10e1eca17
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.url_for(image.url(:small)) : image_url('noimage/small.png')
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 default_logo unless store_logo.attached?
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.url_for(store_logo) if store_logo.image?
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: current_store.mail_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
@@ -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
- <%= image_tag logo_path, class: 'logo', alt: current_store.name, title: current_store.name %>
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>
@@ -107,7 +107,7 @@
107
107
  border-bottom: 10px solid #3869D4;
108
108
  border-left: 18px solid #3869D4;
109
109
  display: inline-block;
110
- color: #FFF;
110
+ color: #FFF !important;
111
111
  text-decoration: none;
112
112
  border-radius: 3px;
113
113
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
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.1
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: 2024-04-21 00:00:00.000000000 Z
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.4.1
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.4.1
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.4.1
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.4.1
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:
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: 1.8.23
154
154
  requirements: []
155
- rubygems_version: 3.5.3
155
+ rubygems_version: 3.2.32
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Transactional emails for Spree eCommerce platform