spree_emails 4.10.1 → 5.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/mailers/spree/order_mailer.rb +9 -0
- data/app/models/spree/order/emails.rb +7 -3
- data/app/models/spree/reimbursement/emails.rb +1 -1
- data/app/models/spree/shipment/emails.rb +1 -1
- data/app/views/spree/order_mailer/payment_link_email.html.erb +16 -0
- data/lib/spree/emails.rb +0 -4
- metadata +7 -33
- data/Gemfile +0 -5
- data/app/helpers/spree/mail_helper.rb +0 -24
- data/app/mailers/spree/base_mailer.rb +0 -50
- data/app/mailers/spree/test_mailer.rb +0 -8
- data/app/views/layouts/spree/base_mailer.html.erb +0 -46
- data/app/views/spree/shared/_base_mailer_footer.html.erb +0 -12
- data/app/views/spree/shared/_base_mailer_header.html.erb +0 -12
- data/app/views/spree/shared/_base_mailer_stylesheets.html.erb +0 -456
- data/app/views/spree/shared/_mailer_line_item.html.erb +0 -12
- data/app/views/spree/test_mailer/test_email.html.erb +0 -40
- data/app/views/spree/test_mailer/test_email.text.erb +0 -4
- data/script/rails +0 -9
- data/spree_emails.gemspec +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a48927d831bb08ea4a692c004caa8dd756bbd718636765ccd406f7d18b8b2b75
|
4
|
+
data.tar.gz: 5f0c1cd2564366950bab3e41e37759d0aa52e6aa4b509a0f10abd1304a68a2c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ded7d61b66fc4d9e3c7e370600dcada759e3e400d9880a39ba6031f934fd0b66afd930b389298c87b864be0b51ecb70b8277fe7d03e7b9f660a2666651b8c432
|
7
|
+
data.tar.gz: '079155e40e2e218788666e0fdc4e93200870da6ee93ea6a901b5c95cc67da2e79eaa16443a37b0cc63c24849ba5ea0ea8532a8f7d37bad292fe8a0c18ebc550f'
|
@@ -22,5 +22,14 @@ module Spree
|
|
22
22
|
subject += "#{current_store.name} #{Spree.t('order_mailer.cancel_email.subject')} ##{@order.number}"
|
23
23
|
mail(to: @order.email, from: from_address, subject: subject, store_url: current_store.url, reply_to: reply_to_address)
|
24
24
|
end
|
25
|
+
|
26
|
+
def payment_link_email(order_id)
|
27
|
+
@order = Spree::Order.incomplete.not_canceled.find(order_id)
|
28
|
+
@current_store = @order.store
|
29
|
+
@checkout_payment_url = spree.checkout_state_url(@order.token, :payment, host: @current_store.url_or_custom_domain)
|
30
|
+
|
31
|
+
mail(to: @order.email, from: from_address, subject: Spree.t('order_mailer.payment_link_email.subject', number: @order.number),
|
32
|
+
store_url: @current_store.url_or_custom_domain, reply_to: reply_to_address)
|
33
|
+
end
|
25
34
|
end
|
26
35
|
end
|
@@ -1,9 +1,13 @@
|
|
1
1
|
module Spree
|
2
|
-
class Order < Spree
|
2
|
+
class Order < Spree.base_class
|
3
3
|
module Emails
|
4
4
|
def deliver_order_confirmation_email
|
5
|
-
|
6
|
-
|
5
|
+
if completed?
|
6
|
+
OrderMailer.confirm_email(id).deliver_later
|
7
|
+
update_column(:confirmation_delivered, true)
|
8
|
+
else
|
9
|
+
errors.add(:base, Spree.t(:order_email_resent_error))
|
10
|
+
end
|
7
11
|
end
|
8
12
|
|
9
13
|
# Returns true if:
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h1>
|
2
|
+
<%= Spree.t('order_mailer.confirm_email.dear_customer', name: name_for(@order)) %>
|
3
|
+
</h1>
|
4
|
+
<p>
|
5
|
+
<%= Spree.t('order_mailer.payment_link_email.message', store_name: @current_store.name) %>
|
6
|
+
</p>
|
7
|
+
<p>
|
8
|
+
<%= link_to Spree.t('order_mailer.payment_link_email.pay_for_order'), @checkout_payment_url, class: 'button' %>
|
9
|
+
<p>
|
10
|
+
<%= Spree.t('order_mailer.payment_link_email.message_copy_link') %>
|
11
|
+
<br>
|
12
|
+
<span style="word-break: break-all;">
|
13
|
+
<%= link_to @checkout_payment_url, @checkout_payment_url %>
|
14
|
+
</span>
|
15
|
+
</p>
|
16
|
+
</p>
|
data/lib/spree/emails.rb
CHANGED
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
|
+
version: 5.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: spree_core
|
@@ -18,28 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 5.0.0.rc1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: actionmailer
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ">="
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '0'
|
36
|
-
type: :runtime
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0'
|
28
|
+
version: 5.0.0.rc1
|
43
29
|
- !ruby/object:Gem::Dependency
|
44
30
|
name: sprockets
|
45
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +61,6 @@ executables: []
|
|
75
61
|
extensions: []
|
76
62
|
extra_rdoc_files: []
|
77
63
|
files:
|
78
|
-
- Gemfile
|
79
64
|
- LICENSE.md
|
80
65
|
- Rakefile
|
81
66
|
- app/assets/config/spree_emails_manifest.js
|
@@ -86,28 +71,21 @@ files:
|
|
86
71
|
- app/assets/images/noimage/noimage/product.png
|
87
72
|
- app/assets/images/noimage/noimage/small.png
|
88
73
|
- app/assets/images/noimage/small.png
|
89
|
-
- app/helpers/spree/mail_helper.rb
|
90
|
-
- app/mailers/spree/base_mailer.rb
|
91
74
|
- app/mailers/spree/order_mailer.rb
|
92
75
|
- app/mailers/spree/reimbursement_mailer.rb
|
93
76
|
- app/mailers/spree/shipment_mailer.rb
|
94
|
-
- app/mailers/spree/test_mailer.rb
|
95
77
|
- app/models/spree/order/emails.rb
|
96
78
|
- app/models/spree/reimbursement/emails.rb
|
97
79
|
- app/models/spree/shipment/emails.rb
|
98
|
-
- app/views/layouts/spree/base_mailer.html.erb
|
99
80
|
- app/views/spree/order_mailer/cancel_email.html.erb
|
100
81
|
- app/views/spree/order_mailer/cancel_email.text.erb
|
101
82
|
- app/views/spree/order_mailer/confirm_email.html.erb
|
102
83
|
- app/views/spree/order_mailer/confirm_email.text.erb
|
84
|
+
- app/views/spree/order_mailer/payment_link_email.html.erb
|
103
85
|
- app/views/spree/order_mailer/store_owner_notification_email.html.erb
|
104
86
|
- app/views/spree/order_mailer/store_owner_notification_email.text.erb
|
105
87
|
- app/views/spree/reimbursement_mailer/reimbursement_email.html.erb
|
106
88
|
- app/views/spree/reimbursement_mailer/reimbursement_email.text.erb
|
107
|
-
- app/views/spree/shared/_base_mailer_footer.html.erb
|
108
|
-
- app/views/spree/shared/_base_mailer_header.html.erb
|
109
|
-
- app/views/spree/shared/_base_mailer_stylesheets.html.erb
|
110
|
-
- app/views/spree/shared/_mailer_line_item.html.erb
|
111
89
|
- app/views/spree/shared/_purchased_items_table.html.erb
|
112
90
|
- app/views/spree/shared/_purchased_items_table.text.erb
|
113
91
|
- app/views/spree/shared/purchased_items_table/_adjustment.html.erb
|
@@ -116,8 +94,6 @@ files:
|
|
116
94
|
- app/views/spree/shared/purchased_items_table/_total.html.erb
|
117
95
|
- app/views/spree/shipment_mailer/shipped_email.html.erb
|
118
96
|
- app/views/spree/shipment_mailer/shipped_email.text.erb
|
119
|
-
- app/views/spree/test_mailer/test_email.html.erb
|
120
|
-
- app/views/spree/test_mailer/test_email.text.erb
|
121
97
|
- config/initializers/assets.rb
|
122
98
|
- lib/generators/spree/emails/install/install_generator.rb
|
123
99
|
- lib/generators/spree/emails/install/templates/mailers/previews/order_preview.rb
|
@@ -128,17 +104,15 @@ files:
|
|
128
104
|
- lib/spree/emails/engine.rb
|
129
105
|
- lib/spree_emails.rb
|
130
106
|
- lib/tasks/email.rake
|
131
|
-
- script/rails
|
132
|
-
- spree_emails.gemspec
|
133
107
|
homepage: https://spreecommerce.org
|
134
108
|
licenses:
|
135
109
|
- AGPL-3.0-or-later
|
136
110
|
- BSD-3-Clause
|
137
111
|
metadata:
|
138
112
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
139
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/
|
113
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.0.rc1
|
140
114
|
documentation_uri: https://docs.spreecommerce.org/
|
141
|
-
source_code_uri: https://github.com/spree/spree/tree/
|
115
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.0.0.rc1
|
142
116
|
post_install_message:
|
143
117
|
rdoc_options: []
|
144
118
|
require_paths:
|
data/Gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
module Spree
|
2
|
-
module MailHelper
|
3
|
-
include BaseHelper
|
4
|
-
|
5
|
-
def variant_image_url(variant)
|
6
|
-
image = default_image_for_product_or_variant(variant)
|
7
|
-
image ? main_app.cdn_image_url(image.url(:small)) : image_url('noimage/small.png')
|
8
|
-
end
|
9
|
-
|
10
|
-
def name_for(order)
|
11
|
-
order.name || Spree.t('customer')
|
12
|
-
end
|
13
|
-
|
14
|
-
def store_logo
|
15
|
-
@store_logo ||= current_store&.mailer_logo&.attachment || current_store&.logo&.attachment
|
16
|
-
end
|
17
|
-
|
18
|
-
def logo_path
|
19
|
-
return main_app.cdn_image_url(store_logo.variant(resize_to_limit: [244, 104])) if store_logo&.variable?
|
20
|
-
|
21
|
-
return main_app.cdn_image_url(store_logo) if store_logo&.image?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
module Spree
|
2
|
-
class BaseMailer < ActionMailer::Base
|
3
|
-
helper Spree::MailHelper
|
4
|
-
|
5
|
-
def current_store
|
6
|
-
@current_store ||= @order&.store.presence || Spree::Dependencies.current_store_finder.constantize.new.execute
|
7
|
-
end
|
8
|
-
helper_method :current_store
|
9
|
-
|
10
|
-
def from_address
|
11
|
-
current_store.mail_from_address
|
12
|
-
end
|
13
|
-
|
14
|
-
def reply_to_address
|
15
|
-
current_store.mail_from_address
|
16
|
-
end
|
17
|
-
|
18
|
-
def money(amount, currency = nil)
|
19
|
-
currency ||= current_store.default_currency
|
20
|
-
Spree::Money.new(amount, currency: currency).to_s
|
21
|
-
end
|
22
|
-
helper_method :money
|
23
|
-
|
24
|
-
def frontend_available?
|
25
|
-
Spree::Core::Engine.frontend_available?
|
26
|
-
end
|
27
|
-
helper_method :frontend_available?
|
28
|
-
|
29
|
-
def mail(headers = {}, &block)
|
30
|
-
ensure_default_action_mailer_url_host(headers[:store_url])
|
31
|
-
set_email_locale
|
32
|
-
super if Spree::Config[:send_core_emails]
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
# this ensures that ActionMailer::Base.default_url_options[:host] is always set
|
38
|
-
# this is only a fail-safe solution if developer didn't set this in environment files
|
39
|
-
# http://guides.rubyonrails.org/action_mailer_basics.html#generating-urls-in-action-mailer-views
|
40
|
-
def ensure_default_action_mailer_url_host(store_url = nil)
|
41
|
-
ActionMailer::Base.default_url_options ||= {}
|
42
|
-
ActionMailer::Base.default_url_options[:host] ||= store_url || current_store.url
|
43
|
-
end
|
44
|
-
|
45
|
-
def set_email_locale
|
46
|
-
locale = @order&.store&.default_locale || current_store&.default_locale
|
47
|
-
I18n.locale = locale if locale.present?
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
5
|
-
<meta name="x-apple-disable-message-reformatting"/>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
7
|
-
|
8
|
-
<%= render partial: 'spree/shared/base_mailer_stylesheets' %>
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
<table class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">
|
12
|
-
<tr>
|
13
|
-
<td align="center">
|
14
|
-
<table class="email-content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
|
15
|
-
<%= render partial: 'spree/shared/base_mailer_header' %>
|
16
|
-
<!-- Email Body -->
|
17
|
-
<tr>
|
18
|
-
<td class="email-body" width="570" cellpadding="0" cellspacing="0">
|
19
|
-
<table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
|
20
|
-
<!-- Body content -->
|
21
|
-
<tbody>
|
22
|
-
<tr>
|
23
|
-
<td class="content-cell">
|
24
|
-
<div class="f-fallback">
|
25
|
-
<%= yield %>
|
26
|
-
</div>
|
27
|
-
</td>
|
28
|
-
</tr>
|
29
|
-
</tbody>
|
30
|
-
</table>
|
31
|
-
</td>
|
32
|
-
</tr>
|
33
|
-
<tr>
|
34
|
-
<td>
|
35
|
-
<%= render partial: 'spree/shared/base_mailer_footer' %>
|
36
|
-
</td>
|
37
|
-
</tr>
|
38
|
-
</table>
|
39
|
-
</td>
|
40
|
-
</tr>
|
41
|
-
<tr>
|
42
|
-
<td height="60px"> </td>
|
43
|
-
</tr>
|
44
|
-
</table>
|
45
|
-
</body>
|
46
|
-
</html>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<!-- You can override this template to design your own footer.
|
2
|
-
<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
|
3
|
-
<tr>
|
4
|
-
<td class="content-cell" align="center">
|
5
|
-
<p class="f-fallback sub align-center">
|
6
|
-
<a href="#">Terms</a> | <a href="#">Privacy</a> |
|
7
|
-
<a href="#">Unsubscribe</a>
|
8
|
-
</p>
|
9
|
-
</td>
|
10
|
-
</tr>
|
11
|
-
</table>
|
12
|
-
-->
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<!-- You can override this template to design your own header. -->
|
2
|
-
<tr>
|
3
|
-
<td class="email-masthead">
|
4
|
-
<%= link_to current_store.url, class: 'template-label' do %>
|
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 %>
|
10
|
-
<% end %>
|
11
|
-
</td>
|
12
|
-
</tr>
|
@@ -1,456 +0,0 @@
|
|
1
|
-
<style type="text/css" rel="stylesheet" media="all">
|
2
|
-
/* Base ------------------------------ */
|
3
|
-
|
4
|
-
@import url("https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap");
|
5
|
-
|
6
|
-
body {
|
7
|
-
width: 100% !important;
|
8
|
-
height: 100%;
|
9
|
-
margin: 0;
|
10
|
-
-webkit-text-size-adjust: none;
|
11
|
-
}
|
12
|
-
|
13
|
-
a {
|
14
|
-
color: #3869D4;
|
15
|
-
}
|
16
|
-
|
17
|
-
a img {
|
18
|
-
border: none;
|
19
|
-
}
|
20
|
-
|
21
|
-
td {
|
22
|
-
word-break: break-word;
|
23
|
-
}
|
24
|
-
|
25
|
-
.preheader {
|
26
|
-
display: none !important;
|
27
|
-
visibility: hidden;
|
28
|
-
mso-hide: all;
|
29
|
-
font-size: 1px;
|
30
|
-
line-height: 1px;
|
31
|
-
max-height: 0;
|
32
|
-
max-width: 0;
|
33
|
-
opacity: 0;
|
34
|
-
overflow: hidden;
|
35
|
-
}
|
36
|
-
|
37
|
-
/* Type ------------------------------ */
|
38
|
-
|
39
|
-
body,
|
40
|
-
td,
|
41
|
-
th {
|
42
|
-
font-family: "Nunito Sans", Helvetica, Arial, sans-serif;
|
43
|
-
}
|
44
|
-
|
45
|
-
h1 {
|
46
|
-
margin-top: 0;
|
47
|
-
color: #333333;
|
48
|
-
font-size: 22px;
|
49
|
-
font-weight: bold;
|
50
|
-
text-align: left;
|
51
|
-
}
|
52
|
-
|
53
|
-
h2 {
|
54
|
-
margin-top: 0;
|
55
|
-
color: #333333;
|
56
|
-
font-size: 16px;
|
57
|
-
font-weight: bold;
|
58
|
-
text-align: left;
|
59
|
-
}
|
60
|
-
|
61
|
-
h3 {
|
62
|
-
margin-top: 0;
|
63
|
-
color: #333333;
|
64
|
-
font-size: 14px;
|
65
|
-
font-weight: bold;
|
66
|
-
text-align: left;
|
67
|
-
}
|
68
|
-
|
69
|
-
td,
|
70
|
-
th {
|
71
|
-
font-size: 16px;
|
72
|
-
}
|
73
|
-
|
74
|
-
p,
|
75
|
-
ul,
|
76
|
-
ol,
|
77
|
-
blockquote {
|
78
|
-
margin: .4em 0 1.1875em;
|
79
|
-
font-size: 16px;
|
80
|
-
line-height: 1.625;
|
81
|
-
}
|
82
|
-
|
83
|
-
p.sub {
|
84
|
-
font-size: 13px;
|
85
|
-
}
|
86
|
-
|
87
|
-
/* Utilities ------------------------------ */
|
88
|
-
|
89
|
-
.align-right {
|
90
|
-
text-align: right;
|
91
|
-
}
|
92
|
-
|
93
|
-
.align-left {
|
94
|
-
text-align: left;
|
95
|
-
}
|
96
|
-
|
97
|
-
.align-center {
|
98
|
-
text-align: center;
|
99
|
-
}
|
100
|
-
|
101
|
-
/* Buttons ------------------------------ */
|
102
|
-
|
103
|
-
.button {
|
104
|
-
background-color: #3869D4;
|
105
|
-
border-top: 10px solid #3869D4;
|
106
|
-
border-right: 18px solid #3869D4;
|
107
|
-
border-bottom: 10px solid #3869D4;
|
108
|
-
border-left: 18px solid #3869D4;
|
109
|
-
display: inline-block;
|
110
|
-
color: #FFF !important;
|
111
|
-
text-decoration: none;
|
112
|
-
border-radius: 3px;
|
113
|
-
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
|
114
|
-
-webkit-text-size-adjust: none;
|
115
|
-
box-sizing: border-box;
|
116
|
-
}
|
117
|
-
|
118
|
-
.button--green {
|
119
|
-
background-color: #22BC66;
|
120
|
-
border-top: 10px solid #22BC66;
|
121
|
-
border-right: 18px solid #22BC66;
|
122
|
-
border-bottom: 10px solid #22BC66;
|
123
|
-
border-left: 18px solid #22BC66;
|
124
|
-
}
|
125
|
-
|
126
|
-
.button--red {
|
127
|
-
background-color: #FF6136;
|
128
|
-
border-top: 10px solid #FF6136;
|
129
|
-
border-right: 18px solid #FF6136;
|
130
|
-
border-bottom: 10px solid #FF6136;
|
131
|
-
border-left: 18px solid #FF6136;
|
132
|
-
}
|
133
|
-
|
134
|
-
@media only screen and (max-width: 500px) {
|
135
|
-
.button {
|
136
|
-
width: 100% !important;
|
137
|
-
text-align: center !important;
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
/* Attribute list ------------------------------ */
|
142
|
-
|
143
|
-
.attributes {
|
144
|
-
margin: 0 0 21px;
|
145
|
-
}
|
146
|
-
|
147
|
-
.attributes_content {
|
148
|
-
background-color: #F4F4F7;
|
149
|
-
padding: 16px;
|
150
|
-
}
|
151
|
-
|
152
|
-
.attributes_item {
|
153
|
-
padding: 0;
|
154
|
-
}
|
155
|
-
|
156
|
-
/* Related Items ------------------------------ */
|
157
|
-
|
158
|
-
.related {
|
159
|
-
width: 100%;
|
160
|
-
margin: 0;
|
161
|
-
padding: 25px 0 0 0;
|
162
|
-
-premailer-width: 100%;
|
163
|
-
-premailer-cellpadding: 0;
|
164
|
-
-premailer-cellspacing: 0;
|
165
|
-
}
|
166
|
-
|
167
|
-
.related_item {
|
168
|
-
padding: 10px 0;
|
169
|
-
color: #CBCCCF;
|
170
|
-
font-size: 15px;
|
171
|
-
line-height: 18px;
|
172
|
-
}
|
173
|
-
|
174
|
-
.related_item-title {
|
175
|
-
display: block;
|
176
|
-
margin: .5em 0 0;
|
177
|
-
}
|
178
|
-
|
179
|
-
.related_item-thumb {
|
180
|
-
display: block;
|
181
|
-
padding-bottom: 10px;
|
182
|
-
}
|
183
|
-
|
184
|
-
.related_heading {
|
185
|
-
border-top: 1px solid #CBCCCF;
|
186
|
-
text-align: center;
|
187
|
-
padding: 25px 0 10px;
|
188
|
-
}
|
189
|
-
|
190
|
-
/* Discount Code ------------------------------ */
|
191
|
-
|
192
|
-
.discount {
|
193
|
-
width: 100%;
|
194
|
-
margin: 0;
|
195
|
-
padding: 24px;
|
196
|
-
-premailer-width: 100%;
|
197
|
-
-premailer-cellpadding: 0;
|
198
|
-
-premailer-cellspacing: 0;
|
199
|
-
background-color: #F4F4F7;
|
200
|
-
border: 2px dashed #CBCCCF;
|
201
|
-
}
|
202
|
-
|
203
|
-
.discount_heading {
|
204
|
-
text-align: center;
|
205
|
-
}
|
206
|
-
|
207
|
-
.discount_body {
|
208
|
-
text-align: center;
|
209
|
-
font-size: 15px;
|
210
|
-
}
|
211
|
-
|
212
|
-
/* Social Icons ------------------------------ */
|
213
|
-
|
214
|
-
.social {
|
215
|
-
width: auto;
|
216
|
-
}
|
217
|
-
|
218
|
-
.social td {
|
219
|
-
padding: 0;
|
220
|
-
width: auto;
|
221
|
-
}
|
222
|
-
|
223
|
-
.social_icon {
|
224
|
-
height: 20px;
|
225
|
-
margin: 0 8px 10px 8px;
|
226
|
-
padding: 0;
|
227
|
-
}
|
228
|
-
|
229
|
-
/* Data table ------------------------------ */
|
230
|
-
|
231
|
-
.purchase {
|
232
|
-
width: 100%;
|
233
|
-
margin: 0;
|
234
|
-
-premailer-width: 100%;
|
235
|
-
-premailer-cellpadding: 0;
|
236
|
-
-premailer-cellspacing: 0;
|
237
|
-
}
|
238
|
-
|
239
|
-
.purchase_content {
|
240
|
-
width: 100%;
|
241
|
-
margin: 0;
|
242
|
-
-premailer-width: 100%;
|
243
|
-
-premailer-cellpadding: 0;
|
244
|
-
-premailer-cellspacing: 0;
|
245
|
-
}
|
246
|
-
|
247
|
-
.purchase_item {
|
248
|
-
padding: 10px 4px;
|
249
|
-
color: #51545E;
|
250
|
-
font-size: 15px;
|
251
|
-
line-height: 18px;
|
252
|
-
}
|
253
|
-
|
254
|
-
.purchase_image {
|
255
|
-
padding: 5px;
|
256
|
-
}
|
257
|
-
|
258
|
-
.purchase_item p {
|
259
|
-
margin: 0;
|
260
|
-
padding: 0.1em 0;
|
261
|
-
}
|
262
|
-
|
263
|
-
.purchase_item--additional {
|
264
|
-
font-size: 12px;
|
265
|
-
}
|
266
|
-
|
267
|
-
.purchase_heading {
|
268
|
-
padding-bottom: 8px;
|
269
|
-
border-bottom: 1px solid #EAEAEC;
|
270
|
-
}
|
271
|
-
|
272
|
-
.purchase_heading p {
|
273
|
-
margin: 0;
|
274
|
-
color: #85878E;
|
275
|
-
font-size: 12px;
|
276
|
-
}
|
277
|
-
|
278
|
-
.purchase_footer {
|
279
|
-
padding-top: 15px;
|
280
|
-
border-top: 1px solid #EAEAEC;
|
281
|
-
}
|
282
|
-
|
283
|
-
.purchase_total {
|
284
|
-
margin: 0;
|
285
|
-
text-align: right;
|
286
|
-
font-weight: bold;
|
287
|
-
color: #333333;
|
288
|
-
}
|
289
|
-
|
290
|
-
.purchase_total--name {
|
291
|
-
margin: 0;
|
292
|
-
text-align: right;
|
293
|
-
color: #333333;
|
294
|
-
}
|
295
|
-
|
296
|
-
.purchase_total--label {
|
297
|
-
padding: 0 15px 0 0;
|
298
|
-
}
|
299
|
-
|
300
|
-
.purchase_total-col {
|
301
|
-
vertical-align: bottom;
|
302
|
-
}
|
303
|
-
|
304
|
-
body {
|
305
|
-
background-color: #F2F4F6;
|
306
|
-
color: #51545E;
|
307
|
-
}
|
308
|
-
|
309
|
-
p {
|
310
|
-
color: #51545E;
|
311
|
-
}
|
312
|
-
|
313
|
-
.email-wrapper {
|
314
|
-
width: 100%;
|
315
|
-
margin: 0;
|
316
|
-
padding: 0;
|
317
|
-
-premailer-width: 100%;
|
318
|
-
-premailer-cellpadding: 0;
|
319
|
-
-premailer-cellspacing: 0;
|
320
|
-
background-color: #F2F4F6;
|
321
|
-
}
|
322
|
-
|
323
|
-
.email-content {
|
324
|
-
width: 100%;
|
325
|
-
margin: 0;
|
326
|
-
padding: 0;
|
327
|
-
-premailer-width: 100%;
|
328
|
-
-premailer-cellpadding: 0;
|
329
|
-
-premailer-cellspacing: 0;
|
330
|
-
}
|
331
|
-
|
332
|
-
/* Masthead ----------------------- */
|
333
|
-
|
334
|
-
.email-masthead {
|
335
|
-
padding: 25px 0;
|
336
|
-
text-align: center;
|
337
|
-
}
|
338
|
-
|
339
|
-
.email-masthead_logo {
|
340
|
-
width: 94px;
|
341
|
-
}
|
342
|
-
|
343
|
-
.email-masthead_name {
|
344
|
-
font-size: 16px;
|
345
|
-
font-weight: bold;
|
346
|
-
color: #A8AAAF;
|
347
|
-
text-decoration: none;
|
348
|
-
text-shadow: 0 1px 0 white;
|
349
|
-
}
|
350
|
-
|
351
|
-
/* Body ------------------------------ */
|
352
|
-
|
353
|
-
.email-body {
|
354
|
-
width: 100%;
|
355
|
-
margin: 0;
|
356
|
-
padding: 0;
|
357
|
-
-premailer-width: 100%;
|
358
|
-
-premailer-cellpadding: 0;
|
359
|
-
-premailer-cellspacing: 0;
|
360
|
-
}
|
361
|
-
|
362
|
-
.email-body_inner {
|
363
|
-
width: 570px;
|
364
|
-
margin: 0 auto;
|
365
|
-
padding: 0;
|
366
|
-
-premailer-width: 570px;
|
367
|
-
-premailer-cellpadding: 0;
|
368
|
-
-premailer-cellspacing: 0;
|
369
|
-
background-color: #FFFFFF;
|
370
|
-
}
|
371
|
-
|
372
|
-
.email-footer {
|
373
|
-
width: 570px;
|
374
|
-
margin: 0 auto;
|
375
|
-
padding: 0;
|
376
|
-
-premailer-width: 570px;
|
377
|
-
-premailer-cellpadding: 0;
|
378
|
-
-premailer-cellspacing: 0;
|
379
|
-
text-align: center;
|
380
|
-
}
|
381
|
-
|
382
|
-
.email-footer p {
|
383
|
-
color: #A8AAAF;
|
384
|
-
}
|
385
|
-
|
386
|
-
.body-action {
|
387
|
-
width: 100%;
|
388
|
-
margin: 30px auto;
|
389
|
-
padding: 0;
|
390
|
-
-premailer-width: 100%;
|
391
|
-
-premailer-cellpadding: 0;
|
392
|
-
-premailer-cellspacing: 0;
|
393
|
-
text-align: center;
|
394
|
-
}
|
395
|
-
|
396
|
-
.body-sub {
|
397
|
-
margin-top: 25px;
|
398
|
-
padding-top: 25px;
|
399
|
-
border-top: 1px solid #EAEAEC;
|
400
|
-
}
|
401
|
-
|
402
|
-
.content-cell {
|
403
|
-
padding: 40px;
|
404
|
-
}
|
405
|
-
|
406
|
-
/*Media Queries ------------------------------ */
|
407
|
-
|
408
|
-
@media only screen and (max-width: 600px) {
|
409
|
-
.email-body_inner,
|
410
|
-
.email-footer {
|
411
|
-
width: 100% !important;
|
412
|
-
}
|
413
|
-
.content-cell {
|
414
|
-
padding: 40px 15px !important;
|
415
|
-
}
|
416
|
-
}
|
417
|
-
|
418
|
-
@media (prefers-color-scheme: dark) {
|
419
|
-
body,
|
420
|
-
.email-body,
|
421
|
-
.email-body_inner,
|
422
|
-
.email-content,
|
423
|
-
.email-wrapper,
|
424
|
-
.email-masthead,
|
425
|
-
.email-footer {
|
426
|
-
background-color: #333333 !important;
|
427
|
-
color: #FFF !important;
|
428
|
-
}
|
429
|
-
|
430
|
-
p,
|
431
|
-
ul,
|
432
|
-
ol,
|
433
|
-
blockquote,
|
434
|
-
h1,
|
435
|
-
h2,
|
436
|
-
h3 {
|
437
|
-
color: #FFF !important;
|
438
|
-
}
|
439
|
-
|
440
|
-
.attributes_content,
|
441
|
-
.discount {
|
442
|
-
background-color: #222 !important;
|
443
|
-
}
|
444
|
-
|
445
|
-
.email-masthead_name {
|
446
|
-
text-shadow: none !important;
|
447
|
-
}
|
448
|
-
}
|
449
|
-
</style>
|
450
|
-
<!--[if mso]>
|
451
|
-
<style type="text/css">
|
452
|
-
.f-fallback {
|
453
|
-
font-family: Arial, sans-serif;
|
454
|
-
}
|
455
|
-
</style>
|
456
|
-
<![endif]-->
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<td class="six sub-columns">
|
3
|
-
<strong>
|
4
|
-
<%= link_to raw(line_item.variant.product.name), spree_storefront_resource_url(line_item.variant.product) %>
|
5
|
-
</strong>
|
6
|
-
<%= raw(line_item.variant.options_text) -%>
|
7
|
-
(<%= line_item.variant.sku %>)
|
8
|
-
</td>
|
9
|
-
<td class="six sub-columns last right">
|
10
|
-
<%= line_item.quantity %> x <%= line_item.single_money %> = <%= line_item.display_amount %>
|
11
|
-
</td>
|
12
|
-
</tr>
|
@@ -1,40 +0,0 @@
|
|
1
|
-
<table>
|
2
|
-
<tr>
|
3
|
-
<td>
|
4
|
-
|
5
|
-
<center>
|
6
|
-
<h1 class="center">
|
7
|
-
<%= Spree.t('test_mailer.test_email.greeting') %>
|
8
|
-
</h1>
|
9
|
-
</center>
|
10
|
-
|
11
|
-
</td>
|
12
|
-
<td class="expander"></td>
|
13
|
-
</tr>
|
14
|
-
</table>
|
15
|
-
|
16
|
-
<table>
|
17
|
-
<tr>
|
18
|
-
<td>
|
19
|
-
|
20
|
-
<p class="lede">
|
21
|
-
<%= Spree.t('test_mailer.test_email.message') %>
|
22
|
-
</p>
|
23
|
-
|
24
|
-
<p>
|
25
|
-
Please remember to configure all of the emails that Spree has provided to your needs.
|
26
|
-
Spree comes shipped with <a href="http://zurb.com/ink/" target="_blank"> Ink </a>
|
27
|
-
prepackaged, but you can use your own version. Ink is not placed in the asset pipeline.
|
28
|
-
</p>
|
29
|
-
|
30
|
-
<p>
|
31
|
-
Also take note that Gmail does not support <code><style></code> tags.
|
32
|
-
Therefore, you will need a gem that will be able to remove your <code><style></code>
|
33
|
-
tags and place them inline. Gmail only supports inline styles. We use
|
34
|
-
<a href="https://github.com/fphilipe/premailer-rails" target="_blank">Premailer for Rails</a> by default.
|
35
|
-
</p>
|
36
|
-
|
37
|
-
</td>
|
38
|
-
<td class="expander"></td>
|
39
|
-
</tr>
|
40
|
-
</table>
|
data/script/rails
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
-
ENGINE_PATH = File.expand_path('../../lib/spree/emails/engine', __FILE__)
|
6
|
-
|
7
|
-
require 'rails/all'
|
8
|
-
require 'rails/engine/commands'
|
9
|
-
|
data/spree_emails.gemspec
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
require_relative '../core/lib/spree/core/version.rb'
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.platform = Gem::Platform::RUBY
|
7
|
-
s.name = 'spree_emails'
|
8
|
-
s.version = Spree.version
|
9
|
-
s.authors = ['Sean Schofield', 'Spark Solutions Sp. z o.o.', 'Vendo Connect Inc.']
|
10
|
-
s.email = 'hello@spreecommerce.org'
|
11
|
-
s.summary = 'Transactional emails for Spree eCommerce platform'
|
12
|
-
s.description = 'Optional transactional emails for Spree such as Order placed or Shipment notification emails'
|
13
|
-
s.homepage = 'https://spreecommerce.org'
|
14
|
-
s.licenses = ['AGPL-3.0-or-later', 'BSD-3-Clause']
|
15
|
-
|
16
|
-
s.metadata = {
|
17
|
-
"bug_tracker_uri" => "https://github.com/spree/spree/issues",
|
18
|
-
"changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
|
19
|
-
"documentation_uri" => "https://docs.spreecommerce.org/",
|
20
|
-
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
|
21
|
-
}
|
22
|
-
|
23
|
-
s.required_ruby_version = '>= 3.0'
|
24
|
-
s.required_rubygems_version = '>= 1.8.23'
|
25
|
-
|
26
|
-
s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
27
|
-
s.require_path = 'lib'
|
28
|
-
|
29
|
-
s.add_dependency 'spree_core', ">= #{s.version}"
|
30
|
-
s.add_dependency 'actionmailer'
|
31
|
-
s.add_dependency 'sprockets', '>= 4.0'
|
32
|
-
|
33
|
-
s.add_development_dependency 'email_spec', '~> 2.2'
|
34
|
-
end
|