spree_frontend 4.6.0 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +35 -124
- data/.codeclimate.yml +2 -2
- data/.gem_release.yml +1 -1
- data/.github/CONTRIBUTING.md +1 -1
- data/.github/dependabot.yml +9 -30
- data/.rubocop.yml +11 -184
- data/.ruby-version +1 -0
- data/Gemfile +12 -13
- data/LICENSE +1 -1
- data/README.md +31 -38
- data/SECURITY.md +1 -1
- data/app/assets/config/spree_frontend_manifest.js +2 -1
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/frontend/{account.js → account.es6} +2 -5
- data/app/assets/javascripts/spree/frontend/{api_tokens.js → api_tokens.es6} +2 -5
- data/app/assets/javascripts/spree/frontend/cart.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address_book.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
- data/app/assets/javascripts/spree/frontend/login.js +1 -1
- data/app/assets/javascripts/spree/frontend/main_nav_bar.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +9 -2
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/single.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/swipes.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/delete_address_popup.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/quantity_select.js +1 -1
- data/app/assets/javascripts/spree/lazysizes.config.js +1 -1
- data/app/assets/stylesheets/spree/frontend/components-custom/headers.scss +0 -2
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +4 -146
- data/app/assets/stylesheets/spree/frontend/fonts.scss +0 -136
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +21 -7
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +0 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/layouts/spree_application.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +0 -20
- data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +0 -20
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +0 -14
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss +0 -25
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss +0 -16
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +1 -8
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +1 -14
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/no_product_available.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/order_details.scss +0 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/taxons/show.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -28
- data/app/helpers/spree/addresses_helper.rb +6 -10
- data/app/helpers/spree/frontend_helper.rb +3 -3
- data/app/helpers/spree/navigation_helper.rb +3 -3
- data/app/helpers/spree/products_filters_helper.rb +3 -3
- data/app/helpers/spree/taxons_helper.rb +1 -1
- data/app/javascript/spree/frontend/application.js +2 -0
- data/app/services/spree/build_localized_redirect_url.rb +2 -2
- data/app/views/spree/addresses/_form.html.erb +4 -5
- data/app/views/spree/addresses/edit.html.erb +1 -1
- data/app/views/spree/addresses/new.html.erb +1 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +1 -1
- data/app/views/spree/checkout/edit.html.erb +1 -1
- data/app/views/spree/checkout/payment/_gateway.html.erb +4 -4
- data/app/views/spree/checkout/payment/_storecredit.html.erb +1 -1
- data/app/views/spree/checkout/registration.html.erb +1 -1
- data/app/views/spree/layouts/spree_application.html.erb +4 -1
- data/app/views/spree/orders/_line_item_data.html.erb +1 -1
- data/app/views/spree/orders/show.html.erb +1 -1
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_color_option_type.html.erb +1 -1
- data/app/views/spree/products/_description.html.erb +1 -1
- data/app/views/spree/products/_filters_desktop.html.erb +1 -1
- data/app/views/spree/products/_filters_mobile.html.erb +3 -3
- data/app/views/spree/products/_option_type.html.erb +1 -1
- data/app/views/spree/products/_promotions.html.erb +1 -1
- data/app/views/spree/products/_properties.html.erb +1 -1
- data/app/views/spree/products/_sort_desktop.html.erb +9 -24
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/products/related.html.erb +1 -1
- data/app/views/spree/shared/_checkout_header.html.erb +1 -1
- data/app/views/spree/shared/_currency_dropdown.html.erb +1 -1
- data/app/views/spree/shared/_delete_address_popup.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +3 -3
- data/app/views/spree/shared/_head.html.erb +2 -1
- data/app/views/spree/shared/_internationalization_options.html.erb +3 -3
- data/app/views/spree/shared/_line_item.html.erb +1 -1
- data/app/views/spree/shared/_locale_dropdown.html.erb +1 -1
- data/app/views/spree/shared/_login.html.erb +2 -2
- data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +1 -1
- data/app/views/spree/shared/_mobile_navigation.html.erb +1 -1
- data/app/views/spree/shared/_nav_bar.html.erb +5 -5
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +3 -3
- data/app/views/spree/shared/_product_added_modal.html.erb +2 -2
- data/app/views/spree/shared/_user_form.html.erb +3 -3
- data/app/views/spree/taxons/_header.html.erb +1 -1
- data/app/views/spree/taxons/_subcategories.html.erb +1 -1
- data/app/views/spree/taxons/product_carousel.html.erb +1 -1
- data/app/views/spree/users/edit.html.erb +1 -1
- data/app/views/spree/users/show.html.erb +1 -1
- data/config/importmap.rb +2 -0
- data/config/initializers/admin_actions.rb +18 -0
- data/config/locales/en.yml +37 -0
- data/lib/generators/spree/frontend/install/install_generator.rb +0 -2
- data/lib/spree/frontend/configuration.rb +1 -1
- data/lib/spree/frontend/engine.rb +9 -5
- data/lib/spree/frontend/version.rb +3 -3
- data/lib/spree/frontend.rb +3 -1
- data/spree_frontend.gemspec +13 -11
- metadata +67 -51
- data/.deepsource.toml +0 -19
- data/.eslintignore +0 -7
- data/.eslintrc +0 -36
- data/.solargraph.yml +0 -20
- data/.stylelintignore +0 -4
- data/.stylelintrc +0 -6
- data/app/assets/images/logo-spree.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo.svg +0 -10
- data/app/assets/images/logo@2x.png +0 -0
- data/app/assets/images/logo@3x.png +0 -0
- data/app/assets/images/noimage/plp.png +0 -0
- data/app/assets/images/noimage/plp.svg +0 -16
- data/app/views/spree/shared/_get_started.html.erb +0 -32
- data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +0 -2
- data/license.md +0 -13
@@ -91,19 +91,10 @@
|
|
91
91
|
padding-right: 16px;
|
92
92
|
}
|
93
93
|
}
|
94
|
-
&:last-child {
|
95
|
-
@include media-breakpoint-up(lg) {
|
96
|
-
padding: 40px 0 22px 16px;
|
97
|
-
}
|
98
|
-
}
|
99
94
|
border-top: none;
|
100
95
|
border-bottom: 1px solid $global-border-style;
|
101
96
|
padding: 22px 0;
|
102
97
|
vertical-align: top;
|
103
|
-
@include media-breakpoint-up(lg) {
|
104
|
-
padding: 22px 50px 0 0;
|
105
|
-
vertical-align: middle;
|
106
|
-
}
|
107
98
|
}
|
108
99
|
}
|
109
100
|
}
|
@@ -153,19 +144,8 @@
|
|
153
144
|
}
|
154
145
|
|
155
146
|
.item-details {
|
156
|
-
text-transform: uppercase;
|
157
|
-
font-size: font-px-to-rem(12px);
|
158
147
|
font-weight: 500;
|
159
148
|
line-height: 1.4;
|
160
|
-
@include media-breakpoint-up(sm) {
|
161
|
-
font-size: font-px-to-rem(14px);
|
162
|
-
margin-top: 3px;
|
163
|
-
margin-bottom: 3px;
|
164
|
-
}
|
165
|
-
@include media-breakpoint-up(lg) {
|
166
|
-
font-size: font-px-to-rem(12px);
|
167
|
-
margin: 0;
|
168
|
-
}
|
169
149
|
}
|
170
150
|
}
|
171
151
|
&-price {
|
@@ -131,7 +131,7 @@
|
|
131
131
|
font-size: font-px-to-rem(16px);
|
132
132
|
font-weight: 500;
|
133
133
|
&--selected {
|
134
|
-
border: solid
|
134
|
+
border: solid 1px $secondary-color;
|
135
135
|
}
|
136
136
|
}
|
137
137
|
}
|
@@ -308,7 +308,7 @@
|
|
308
308
|
color: $font-color;
|
309
309
|
font-size: font-px-to-rem(13px);
|
310
310
|
&--selected {
|
311
|
-
border: solid
|
311
|
+
border: solid 1px $secondary-color;
|
312
312
|
}
|
313
313
|
}
|
314
314
|
&:last-of-type {
|
@@ -142,15 +142,6 @@
|
|
142
142
|
}
|
143
143
|
|
144
144
|
.product-description {
|
145
|
-
font-size: font-px-to-rem(12px);
|
146
|
-
@include media-breakpoint-up(sm) {
|
147
|
-
font-size: font-px-to-rem(16px);
|
148
|
-
}
|
149
|
-
@include media-breakpoint-up(md) {
|
150
|
-
font-size: font-px-to-rem(14px);
|
151
|
-
line-height: font-px-to-rem(26px);
|
152
|
-
}
|
153
|
-
|
154
145
|
&-arrow {
|
155
146
|
width: 44px;
|
156
147
|
height: 44px;
|
@@ -161,17 +152,6 @@
|
|
161
152
|
}
|
162
153
|
}
|
163
154
|
|
164
|
-
.product-properies {
|
165
|
-
font-size: font-px-to-rem(12px);
|
166
|
-
@include media-breakpoint-up(sm) {
|
167
|
-
font-size: font-px-to-rem(16px);
|
168
|
-
}
|
169
|
-
@include media-breakpoint-up(md) {
|
170
|
-
font-size: font-px-to-rem(14px);
|
171
|
-
line-height: font-px-to-rem(26px);
|
172
|
-
}
|
173
|
-
}
|
174
|
-
|
175
155
|
#product-details {
|
176
156
|
.breadcrumb-item:last-of-type {
|
177
157
|
display: none;
|
@@ -6,10 +6,6 @@
|
|
6
6
|
svg {
|
7
7
|
width: 24px;
|
8
8
|
height: 24px;
|
9
|
-
@include media-breakpoint-up(xl) {
|
10
|
-
width: 36px;
|
11
|
-
height: 36px;
|
12
|
-
}
|
13
9
|
}
|
14
10
|
&,
|
15
11
|
&:hover {
|
@@ -33,16 +29,6 @@
|
|
33
29
|
padding: 0 2px;
|
34
30
|
font-size: font-px-to-rem(12px);
|
35
31
|
display: none;
|
36
|
-
@include media-breakpoint-up(xl) {
|
37
|
-
$size: 26px;
|
38
|
-
$border-width: 2px;
|
39
|
-
border-radius: $size / 2;
|
40
|
-
border-width: $border-width;
|
41
|
-
height: $size;
|
42
|
-
min-width: $size;
|
43
|
-
line-height: $size - $border-width * 2;
|
44
|
-
font-size: font-px-to-rem(15px);
|
45
|
-
}
|
46
32
|
}
|
47
33
|
&--visible-count {
|
48
34
|
#{$self}-count {
|
@@ -46,31 +46,6 @@ body {
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
}
|
49
|
-
@include media-breakpoint-up(sm) {
|
50
|
-
height: $spree-header-tablet-height;
|
51
|
-
&-fluid {
|
52
|
-
&-logo {
|
53
|
-
img {
|
54
|
-
max-height: 50px;
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
@include media-breakpoint-up(xl) {
|
60
|
-
height: $spree-header-desktop-height;
|
61
|
-
&-fluid {
|
62
|
-
&-logo {
|
63
|
-
flex-basis: 0;
|
64
|
-
margin: 0 0 1rem;
|
65
|
-
img {
|
66
|
-
max-height: 50px;
|
67
|
-
}
|
68
|
-
}
|
69
|
-
&-primary-navigation {
|
70
|
-
flex-basis: auto;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
49
|
}
|
75
50
|
|
76
51
|
#logo {
|
@@ -3,28 +3,12 @@
|
|
3
3
|
|
4
4
|
a {
|
5
5
|
transition: basic-transition(color);
|
6
|
-
text-transform: uppercase;
|
7
6
|
text-decoration: underline;
|
8
7
|
color: theme-color('info');
|
9
|
-
font-size: font-px-to-rem(12px);
|
10
8
|
|
11
9
|
&:hover,
|
12
10
|
&:active {
|
13
11
|
color: theme-color('primary');
|
14
12
|
}
|
15
13
|
}
|
16
|
-
|
17
|
-
@include media-breakpoint-up(sm) {
|
18
|
-
margin-top: font-px-to-rem(19.7px);
|
19
|
-
a {
|
20
|
-
font-size: font-px-to-rem(23px);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
@include media-breakpoint-up(lg) {
|
25
|
-
margin-top: font-px-to-rem(20px);
|
26
|
-
a {
|
27
|
-
font-size: font-px-to-rem(16px);
|
28
|
-
}
|
29
|
-
}
|
30
14
|
}
|
@@ -1,8 +1,5 @@
|
|
1
1
|
.main-nav-bar {
|
2
2
|
&-item {
|
3
|
-
text-transform: uppercase;
|
4
|
-
font-size: 20px;
|
5
|
-
font-weight: $font-weight-medium;
|
6
3
|
padding: 0 1.5rem;
|
7
4
|
height: 100%;
|
8
5
|
a {
|
@@ -67,7 +64,7 @@
|
|
67
64
|
padding: 0;
|
68
65
|
margin: 0;
|
69
66
|
border: 0;
|
70
|
-
border-bottom:
|
67
|
+
border-bottom: 2px solid transparent;
|
71
68
|
}
|
72
69
|
}
|
73
70
|
|
@@ -107,10 +104,6 @@
|
|
107
104
|
display: none;
|
108
105
|
}
|
109
106
|
}
|
110
|
-
|
111
|
-
@include media-breakpoint-up(xl) {
|
112
|
-
top: $spree-header-desktop-height - 1px;
|
113
|
-
}
|
114
107
|
}
|
115
108
|
}
|
116
109
|
|
@@ -21,22 +21,14 @@
|
|
21
21
|
}
|
22
22
|
.account-icon {
|
23
23
|
svg {
|
24
|
-
width:
|
24
|
+
width: 24px;
|
25
25
|
height: 24px;
|
26
|
-
@include media-breakpoint-up(xl) {
|
27
|
-
width: 41.4px;
|
28
|
-
height: 36px;
|
29
|
-
}
|
30
26
|
}
|
31
27
|
}
|
32
28
|
.search-icons {
|
33
29
|
svg {
|
34
30
|
width: 24px;
|
35
31
|
height: 24px;
|
36
|
-
@include media-breakpoint-up(xl) {
|
37
|
-
width: 36px;
|
38
|
-
height: 36px;
|
39
|
-
}
|
40
32
|
}
|
41
33
|
}
|
42
34
|
&-search-menu {
|
@@ -64,21 +56,16 @@
|
|
64
56
|
input#keywords {
|
65
57
|
background: transparent;
|
66
58
|
color: $meganav-font-color;
|
67
|
-
font-size: font-px-to-rem(14px);
|
68
59
|
width: calc(100% - 40px);
|
69
60
|
&:focus {
|
70
61
|
outline: none;
|
71
62
|
}
|
72
63
|
&::placeholder {
|
73
|
-
text-transform: uppercase;
|
74
64
|
color: theme-color("borders");
|
75
65
|
}
|
76
66
|
&::-webkit-search-cancel-button {
|
77
67
|
display: none;
|
78
68
|
}
|
79
|
-
@include media-breakpoint-up(md) {
|
80
|
-
font-size: font-px-to-rem(22px);
|
81
|
-
}
|
82
69
|
}
|
83
70
|
input[type="submit"] {
|
84
71
|
display: none;
|
@@ -226,45 +226,17 @@
|
|
226
226
|
|
227
227
|
&-order-status {
|
228
228
|
order: 2;
|
229
|
-
font-size: font-px-to-rem(14px);
|
230
|
-
text-transform: uppercase;
|
231
|
-
@include media-breakpoint-up(md) {
|
232
|
-
font-size: font-px-to-rem(26px);
|
233
|
-
}
|
234
|
-
@include media-breakpoint-up(lg) {
|
235
|
-
font-size: font-px-to-rem(18px);
|
236
|
-
text-transform: initial;
|
237
|
-
}
|
238
229
|
}
|
239
230
|
|
240
231
|
&-order-date {
|
241
232
|
order: 1;
|
242
233
|
font-size: 14px;
|
243
234
|
font-size: font-px-to-rem(14px);
|
244
|
-
@include media-breakpoint-up(md) {
|
245
|
-
font-size: font-px-to-rem(26px);
|
246
|
-
}
|
247
|
-
@include media-breakpoint-up(lg) {
|
248
|
-
font-size: font-px-to-rem(18px);
|
249
|
-
}
|
250
235
|
}
|
251
236
|
|
252
237
|
&-order-total {
|
253
238
|
order: 4;
|
254
239
|
font-size: font-px-to-rem(16px);
|
255
|
-
@include media-breakpoint-up(md) {
|
256
|
-
font-size: font-px-to-rem(29px);
|
257
|
-
}
|
258
|
-
@include media-breakpoint-up(lg) {
|
259
|
-
font-size: font-px-to-rem(18px);
|
260
|
-
}
|
261
|
-
}
|
262
|
-
|
263
|
-
&-order-payment-state,
|
264
|
-
&-order-shipment-state {
|
265
|
-
@include media-breakpoint-up(md) {
|
266
|
-
font-size: font-px-to-rem(18px);
|
267
|
-
}
|
268
240
|
}
|
269
241
|
|
270
242
|
@include media-breakpoint-between(xs, md) {
|
@@ -10,13 +10,12 @@ module Spree
|
|
10
10
|
method_name = I18n.t("activerecord.attributes.spree/address.#{method}")
|
11
11
|
required = Spree.t(:required)
|
12
12
|
form.text_field(method,
|
13
|
-
class: ['
|
13
|
+
class: ['form-control'].compact,
|
14
14
|
required: is_required,
|
15
15
|
placeholder: is_required ? "#{method_name} #{required}" : method_name,
|
16
16
|
aria: { label: method_name }) +
|
17
17
|
form.label(method_name,
|
18
|
-
is_required ? "#{method_name} #{required}" : method_name
|
19
|
-
class: 'text-uppercase')
|
18
|
+
is_required ? "#{method_name} #{required}" : method_name)
|
20
19
|
end
|
21
20
|
end
|
22
21
|
end
|
@@ -27,13 +26,12 @@ module Spree
|
|
27
26
|
method_name = Spree.t(:zipcode)
|
28
27
|
required = Spree.t(:required)
|
29
28
|
form.text_field(:zipcode,
|
30
|
-
class: ['
|
29
|
+
class: ['form-control'].compact,
|
31
30
|
required: is_required,
|
32
31
|
placeholder: is_required ? "#{method_name} #{required}" : method_name,
|
33
32
|
aria: { label: Spree.t(:zipcode) }) +
|
34
33
|
form.label(:zipcode,
|
35
34
|
is_required ? "#{method_name} #{required}" : method_name,
|
36
|
-
class: 'text-uppercase',
|
37
35
|
id: address_id + '_zipcode_label')
|
38
36
|
end
|
39
37
|
|
@@ -48,16 +46,14 @@ module Spree
|
|
48
46
|
aria: { label: Spree.t(:state) },
|
49
47
|
disabled: !have_states) +
|
50
48
|
form.text_field(:state_name,
|
51
|
-
class: ['
|
49
|
+
class: ['form-control'].compact,
|
52
50
|
aria: { label: Spree.t(:state) },
|
53
51
|
disabled: have_states,
|
54
52
|
placeholder: Spree.t(:state) + " #{Spree.t(:required)}") +
|
55
53
|
form.label(Spree.t(:state).downcase,
|
56
54
|
raw(Spree.t(:state) + content_tag(:abbr, " #{Spree.t(:required)}")),
|
57
|
-
class: [have_states ? 'state-select-label' : nil, '
|
58
|
-
id: address_id + '_state_label')
|
59
|
-
image_tag('arrow.svg',
|
60
|
-
class: [!have_states ? 'hidden' : nil, 'position-absolute spree-flat-select-arrow'].compact)
|
55
|
+
class: [have_states ? 'state-select-label' : nil, ' '].compact,
|
56
|
+
id: address_id + '_state_label')
|
61
57
|
].join.tr('"', "'").delete("\n")
|
62
58
|
|
63
59
|
content_tag :span, class: 'd-block position-relative' do
|
@@ -18,7 +18,7 @@ module Spree
|
|
18
18
|
image_path ||= if logo_attachment&.attached? && logo_attachment&.variable?
|
19
19
|
main_app.cdn_image_url(logo_attachment.variant(resize: '244x104>'))
|
20
20
|
elsif logo_attachment&.attached? && logo_attachment&.image?
|
21
|
-
main_app.cdn_image_url(
|
21
|
+
main_app.cdn_image_url(logo_attachment)
|
22
22
|
else
|
23
23
|
asset_path('logo/spree_50.png')
|
24
24
|
end
|
@@ -173,7 +173,7 @@ module Spree
|
|
173
173
|
image_url = if image.present?
|
174
174
|
main_app.cdn_image_url(image.url('plp'))
|
175
175
|
else
|
176
|
-
asset_path('noimage/
|
176
|
+
asset_path('noimage/large.png')
|
177
177
|
end
|
178
178
|
|
179
179
|
image_style = image&.style(:plp)
|
@@ -251,7 +251,7 @@ module Spree
|
|
251
251
|
end
|
252
252
|
|
253
253
|
def price_filter_values
|
254
|
-
|
254
|
+
Spree::Deprecation.warn(<<-DEPRECATION, caller)
|
255
255
|
`FrontendHelper#price_filter_values` is deprecated and will be removed in Spree 5.0.
|
256
256
|
Please use `ProductsFiltersHelper#price_filters` method
|
257
257
|
DEPRECATION
|
@@ -3,7 +3,7 @@ require 'digest'
|
|
3
3
|
module Spree
|
4
4
|
module NavigationHelper
|
5
5
|
def spree_navigation_data
|
6
|
-
|
6
|
+
Spree::Deprecation.warn(<<-DEPRECATION, caller)
|
7
7
|
NavigationHelper#spree_navigation_data is deprecated and will be removed in Spree 5.0.
|
8
8
|
Please migrate to the new navigation cms system.
|
9
9
|
DEPRECATION
|
@@ -20,7 +20,7 @@ module Spree
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def spree_nav_cache_key(section = 'header')
|
23
|
-
|
23
|
+
Spree::Deprecation.warn(<<-DEPRECATION, caller)
|
24
24
|
NavigationHelper#spree_nav_cache_key is deprecated and will be removed in Spree 5.0.
|
25
25
|
Please migrate to the new navigation cms system.
|
26
26
|
DEPRECATION
|
@@ -42,7 +42,7 @@ module Spree
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def main_nav_image(image_path, title = '')
|
45
|
-
image_url = asset_path(asset_exists?(image_path) ? image_path : 'noimage/
|
45
|
+
image_url = asset_path(asset_exists?(image_path) ? image_path : 'noimage/large.png')
|
46
46
|
|
47
47
|
lazy_image(
|
48
48
|
src: image_url,
|
@@ -2,10 +2,10 @@ module Spree
|
|
2
2
|
module ProductsFiltersHelper
|
3
3
|
PRICE_FILTER_NAME = 'price'.freeze
|
4
4
|
|
5
|
-
FILTER_LINK_CSS_CLASSES = 'd-inline-block
|
5
|
+
FILTER_LINK_CSS_CLASSES = 'd-inline-block py-1 px-2 m-1 plp-overlay-card-item'.freeze
|
6
6
|
ACTIVE_FILTER_LINK_CSS_CLASSES = 'plp-overlay-card-item--selected'.freeze
|
7
7
|
|
8
|
-
CLEAR_ALL_FILTERS_LINK_CSS_CLASSES = 'btn spree-btn btn-outline-primary w-100 mb-4'.freeze
|
8
|
+
CLEAR_ALL_FILTERS_LINK_CSS_CLASSES = 'btn spree-btn btn-sm btn-outline-primary w-100 mb-4'.freeze
|
9
9
|
|
10
10
|
def price_filters
|
11
11
|
@price_filters ||= [
|
@@ -38,7 +38,7 @@ module Spree
|
|
38
38
|
|
39
39
|
def price_filter_input(name:, value:, placeholder:, **html_options)
|
40
40
|
price_value = value&.zero? ? '' : value
|
41
|
-
style_class = "
|
41
|
+
style_class = "form-control form-control-sm #{html_options[:class]}"
|
42
42
|
|
43
43
|
number_field_tag(
|
44
44
|
name, price_value,
|
@@ -4,7 +4,7 @@ module Spree
|
|
4
4
|
# that we can use configurations as well as make it easier for end users to override this determination. One idea is
|
5
5
|
# to show the most popular products for a particular taxon (that is an exercise left to the developer.)
|
6
6
|
def taxon_preview(taxon, max = 4)
|
7
|
-
|
7
|
+
Spree::Deprecation.warn(<<-DEPRECATION, caller)
|
8
8
|
TaxonsHelper is deprecated and will be removed in Spree 5.0.
|
9
9
|
Please remove any `helper 'spree/taxons'` from your controllers.
|
10
10
|
DEPRECATION
|
@@ -118,14 +118,14 @@ module Spree
|
|
118
118
|
Mobility.with_locale(default_locale) { Spree::Product.friendly.find(product_path_match[1]) }
|
119
119
|
end
|
120
120
|
|
121
|
-
new_slug =
|
121
|
+
new_slug = product.slug(locale: locale) || product.slug(locale: default_locale)
|
122
122
|
new_path_slug = "/products/#{new_slug}"
|
123
123
|
default_locale_supplied ? new_path_slug : "/#{locale}/#{new_path_slug}"
|
124
124
|
end
|
125
125
|
|
126
126
|
def generate_taxon_path(taxon_path_match, previous_locale, locale, default_locale, default_locale_supplied)
|
127
127
|
taxon = Mobility.with_locale(previous_locale) { Spree::Taxon.friendly.find(taxon_path_match[1]) }
|
128
|
-
new_slug =
|
128
|
+
new_slug = taxon.permalink(locale: locale) || taxon.permalink(locale: default_locale)
|
129
129
|
new_path_slug = "/t/#{new_slug}"
|
130
130
|
default_locale_supplied ? new_path_slug : "/#{locale}/#{new_path_slug}"
|
131
131
|
end
|
@@ -5,11 +5,10 @@
|
|
5
5
|
<div class="form-group checkout-content-inner-field" id="<%= "#{address_id}country" %>">
|
6
6
|
<div id="<%= "#{address_id}country-selection" %>" class="d-block position-relative has-float-label">
|
7
7
|
<%= address_form.collection_select :country_id, available_countries, :id, :name,
|
8
|
-
{ prompt: Spree.t(:country)
|
9
|
-
{ class: '
|
8
|
+
{ prompt: Spree.t(:country) },
|
9
|
+
{ class: 'custom-select spree-flat-select',
|
10
10
|
aria: { label: Spree.t(:country) } } %>
|
11
|
-
<%=
|
12
|
-
<%= address_form.label(Spree.t(:country), Spree.t(:country).upcase, class:'text-uppercase') %>
|
11
|
+
<%= address_form.label(Spree.t(:country), Spree.t(:country)) %>
|
13
12
|
</div>
|
14
13
|
</div>
|
15
14
|
<% elsif field == "state" %>
|
@@ -29,4 +28,4 @@
|
|
29
28
|
<% end %>
|
30
29
|
<% end %>
|
31
30
|
|
32
|
-
<p class="text-right
|
31
|
+
<p class="text-right mb-5 checkout-content-inner-field"><span id="required_marker"><%= Spree.t(:required) %></span> <%= Spree.t(:required_fields) %></p>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h3 class="spree-header spree-mb-large spree-mt-large"><%= Spree.t(:edit_address, scope: :address_book) %></h3>
|
4
4
|
<%= form_for @address, html: { id: 'checkout_form_address' } do |f| %>
|
5
5
|
<div class="form-group checkout-content-inner-field mb-5 has-float-label">
|
6
|
-
<%= f.text_field :label, class: '
|
6
|
+
<%= f.text_field :label, class: 'form-control', placeholder: Spree.t(:address_name_placeholder, scope: :address_book) %>
|
7
7
|
<%= f.label :address_name, Spree.t(:label, scope: :address_book) %>
|
8
8
|
</div>
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h3 class="spree-header spree-mb-large spree-mt-large"><%= Spree.t(:new_address, scope: :address_book) %></h3>
|
4
4
|
<%= form_for @address, url: spree.addresses_path, html: { id: 'checkout_form_address' } do |f| %>
|
5
5
|
<div class="form-group checkout-content-inner-field mb-5 has-float-label">
|
6
|
-
<%= f.text_field :label, class: '
|
6
|
+
<%= f.text_field :label, class: 'form-control', placeholder: Spree.t(:address_name_placeholder, scope: :address_book) %>
|
7
7
|
<%= f.label :address_name, Spree.t(:label, scope: :address_book) %>
|
8
8
|
</div>
|
9
9
|
<%= render 'spree/addresses/form',
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="row">
|
3
3
|
<div class="col-12 mb-4">
|
4
4
|
<div class="form-group checkout-content-inner-field has-float-label">
|
5
|
-
<%= form.email_field :email, class: 'required
|
5
|
+
<%= form.email_field :email, class: 'required form-control', required: true, placeholder: Spree.t(:email) %>
|
6
6
|
<%= form.label :email, class: 'text-uppercase' %>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<h4 class="text-uppercase checkout-content-header checkout-content-shipping-methods-header mb-1">
|
7
7
|
<%= Spree.t('checkout_page.delivery_method') %>
|
8
8
|
</h4>
|
9
|
-
<div id="shipToLocation" class="mb-4
|
9
|
+
<div id="shipToLocation" class="mb-4">
|
10
10
|
<%= Spree.t(:ship_to) %>
|
11
11
|
<span class="text-muted"><%= @order.shipping_address.address1 %></span> -
|
12
12
|
<% if @order.shipping_address.zipcode.present? %> <span class="text-muted"><%= @order.shipping_address.zipcode %></span> - <% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="checkout-content-summary">
|
2
2
|
<h3 class="text-uppercase text-center checkout-content-summary-header"><%= Spree.t(:order_summary) %></h3>
|
3
|
-
<div class="w-100
|
3
|
+
<div class="w-100 checkout-content-summary-table" data-hook="order_summary">
|
4
4
|
<div class="d-table-cell"><%= Spree.t(:subtotal) %>:</div>
|
5
5
|
<div class="d-table-cell text-right"><%= order.display_item_total.to_html %></div>
|
6
6
|
|
@@ -45,7 +45,7 @@ end
|
|
45
45
|
<%= render partial: 'summary', locals: { order: @order } %>
|
46
46
|
<div data-hook="buttons">
|
47
47
|
<% submit_label_key = @order.confirm? ? :place_order : :save_and_continue %>
|
48
|
-
<%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary
|
48
|
+
<%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary font-weight-bold w-100 checkout-content-save-continue-button' %>
|
49
49
|
</div>
|
50
50
|
</div>
|
51
51
|
</div>
|
@@ -4,12 +4,12 @@
|
|
4
4
|
|
5
5
|
<div class="payment-gateway-fields">
|
6
6
|
<div class="mb-4 payment-gateway-field checkout-content-inner-field">
|
7
|
-
<%= text_field_tag "#{param_prefix}[name]", "#{@order.bill_address_firstname} #{@order.bill_address_lastname}", { id: "name_on_card", class: '
|
7
|
+
<%= text_field_tag "#{param_prefix}[name]", "#{@order.bill_address_firstname} #{@order.bill_address_lastname}", { id: "name_on_card", class: 'form-control', placeholder: Spree.t(:name_on_card)} %>
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<div class="mb-4 payment-gateway-field checkout-content-inner-field" data-hook="card_number">
|
11
11
|
<% options_hash = Rails.env.production? ? {autocomplete: 'off'} : {} %>
|
12
|
-
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(id: 'card_number', class: '
|
12
|
+
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(id: 'card_number', class: 'form-control cardNumber', size: 19, maxlength: 19, autocomplete: "off", placeholder: Spree.t(:card_number)) %>
|
13
13
|
<span id="card_type" style="display:none;">
|
14
14
|
( <span id="looks_like"><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
|
15
15
|
<span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
|
@@ -18,10 +18,10 @@
|
|
18
18
|
</div>
|
19
19
|
<div class="payment-gateway-half-fields d-flex justify-content-between">
|
20
20
|
<div class="payment-gateway-field checkout-content-inner-field" data-hook="card_expiration">
|
21
|
-
<%= text_field_tag "#{param_prefix}[expiry]", '', id: 'card_expiry', class: '
|
21
|
+
<%= text_field_tag "#{param_prefix}[expiry]", '', id: 'card_expiry', class: 'form-control cardExpiry', placeholder: "MM/YYYY" %>
|
22
22
|
</div>
|
23
23
|
<div class="payment-gateway-field checkout-content-inner-field" data-hook="card_code">
|
24
|
-
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(id: 'card_code', class: '
|
24
|
+
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(id: 'card_code', class: 'form-control cardCode', size: 5, placeholder: Spree.t(:cvv)) %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<p><%= Spree.t('store_credit.remaining_amount', amount: @order.display_store_credit_remaining_after_capture).html_safe %></p>
|
6
6
|
<% else %>
|
7
7
|
<p><%= Spree.t('store_credit.additional_payment_needed', amount: @order.display_order_total_after_store_credit).html_safe %></p>
|
8
|
-
<%= button_tag Spree.t('store_credit.remove'), name: 'remove_store_credit', class: 'store-credit-button continue btn btn-lg btn-primary font-weight-bold
|
8
|
+
<%= button_tag Spree.t('store_credit.remove'), name: 'remove_store_credit', class: 'store-credit-button continue btn btn-lg btn-primary font-weight-bold align-self-start' %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
11
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<%= form_for @order, url: path, method: :put, html: { id: 'checkout_form_registration', data: { turbo: false } } do |f| %>
|
19
19
|
<div class="form-group">
|
20
20
|
<p class="form-group checkout-content-inner-field">
|
21
|
-
<%= f.email_field :email, class: '
|
21
|
+
<%= f.email_field :email, class: 'form-control', placeholder: Spree.t(:email) %>
|
22
22
|
</p>
|
23
23
|
</div>
|
24
24
|
<%= f.submit Spree.t(:continue_as_guest), class: 'btn btn-block btn-outline-primary spree-btn' %>
|