spree_frontend 4.2.0.beta → 4.2.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/info.svg +7 -0
- data/app/assets/javascripts/spree/frontend.js +1 -1
- data/app/assets/javascripts/spree/frontend/cart.js +23 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +60 -43
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +19 -17
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
- data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +2 -2
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +1 -1
- data/app/assets/stylesheets/spree/frontend.css +0 -1
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +1 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +6 -4
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -6
- data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
- data/app/controllers/spree/addresses_controller.rb +1 -0
- data/app/controllers/spree/currency_controller.rb +2 -2
- data/app/controllers/spree/home_controller.rb +5 -1
- data/app/controllers/spree/products_controller.rb +32 -15
- data/app/controllers/spree/store_controller.rb +0 -12
- data/app/controllers/spree/taxons_controller.rb +4 -3
- data/app/helpers/spree/addresses_helper.rb +10 -6
- data/app/helpers/spree/cache_helper.rb +7 -0
- data/app/helpers/spree/frontend_helper.rb +19 -7
- data/app/helpers/spree/navigation_helper.rb +1 -1
- data/app/models/spree/frontend_configuration.rb +2 -1
- data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +2 -2
- data/app/views/spree/address/_form.html.erb +15 -16
- data/app/views/spree/addresses/_form.html.erb +1 -1
- data/app/views/spree/addresses/edit.html.erb +13 -8
- data/app/views/spree/addresses/new.html.erb +7 -3
- data/app/views/spree/checkout/_address.html.erb +14 -13
- data/app/views/spree/checkout/_confirm.html.erb +1 -33
- data/app/views/spree/checkout/_credit_card.html.erb +2 -2
- data/app/views/spree/checkout/_delivery_informations.html.erb +43 -36
- data/app/views/spree/checkout/_payment.html.erb +1 -20
- data/app/views/spree/checkout/_payment_sources.html.erb +17 -0
- data/app/views/spree/checkout/_summary.html.erb +3 -5
- data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
- data/app/views/spree/home/index.html.erb +21 -22
- data/app/views/spree/orders/_coupon_code.html.erb +2 -3
- data/app/views/spree/orders/_line_item.html.erb +1 -1
- data/app/views/spree/orders/_line_item_data.html.erb +2 -2
- data/app/views/spree/orders/edit.html.erb +2 -3
- data/app/views/spree/orders/show.html.erb +1 -71
- data/app/views/spree/products/_cart_form.html.erb +4 -7
- data/app/views/spree/products/_color_option_type.html.erb +1 -2
- data/app/views/spree/products/_filters_desktop.html.erb +1 -2
- data/app/views/spree/products/_gallery.html.erb +4 -6
- data/app/views/spree/products/_gallery_modal.html.erb +3 -5
- data/app/views/spree/products/_option_type.html.erb +1 -2
- data/app/views/spree/products/_sort_mobile.html.erb +4 -4
- data/app/views/spree/products/related.html.erb +11 -5
- data/app/views/spree/products/show.html.erb +1 -5
- data/app/views/spree/shared/_carousel_4_products.html.erb +6 -12
- data/app/views/spree/shared/_change_store.html.erb +7 -7
- data/app/views/spree/shared/_checkout_header.html.erb +1 -1
- data/app/views/spree/shared/_color_select.html.erb +3 -3
- data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
- data/app/views/spree/shared/_error_messages.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +3 -3
- data/app/views/spree/shared/_head.html.erb +3 -2
- data/app/views/spree/shared/_header.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_mobile_change_store.html.erb +3 -3
- data/app/views/spree/shared/_mobile_navigation.html.erb +1 -1
- data/app/views/spree/shared/_nav_bar.html.erb +4 -4
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +117 -174
- data/app/views/spree/shared/_payment.html.erb +2 -2
- data/app/views/spree/shared/_payment_sources.html.erb +2 -2
- data/app/views/spree/shared/_product_added_modal.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +1 -2
- data/app/views/spree/shared/_translations.html.erb +6 -6
- data/app/views/spree/shared/carousel/_single.html.erb +6 -11
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +5 -11
- data/app/views/spree/users/_address.html.erb +15 -19
- data/app/views/spree/users/_address_controls.html.erb +10 -0
- data/app/views/spree/users/show.html.erb +15 -13
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +0 -1
- data/spree_frontend.gemspec +2 -2
- metadata +20 -20
- data/app/assets/stylesheets/spree/frontend/address_book.scss +0 -8
- data/app/views/spree/products/_vendor_info.html.erb +0 -13
- data/app/views/spree/shared/forbidden.html.erb +0 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
@@ -20,8 +20,7 @@
|
|
20
20
|
data-non-shipment-tax='<%= adjustments.reject{ |adj| adj.adjustable_type== 'Spree::Shipment'}.sum(&:amount) %>'
|
21
21
|
thousands-separator='<%= tax_total.thousands_separator %>'
|
22
22
|
decimal-mark='<%= tax_total.decimal_mark %>'
|
23
|
-
precision='<%= Money::Currency.find(order.currency).exponent %>'
|
24
|
-
>
|
23
|
+
precision='<%= Money::Currency.find(order.currency).exponent %>'>
|
25
24
|
<%= tax_total.to_html %>
|
26
25
|
</div>
|
27
26
|
<% end %>
|
@@ -29,7 +28,7 @@
|
|
29
28
|
<% if order.passed_checkout_step?("address") && order.shipments.any? %>
|
30
29
|
<% if order.has_free_shipping? %>
|
31
30
|
<div class="d-table-cell"><%= Spree.t(:shipping) %>:</div>
|
32
|
-
<div class="d-table-cell text-right"><%= Spree.t(:free) %></div>
|
31
|
+
<div class="d-table-cell text-right" data-hook="is-free-shipping"><%= Spree.t(:free) %></div>
|
33
32
|
<% else %>
|
34
33
|
<div class="d-table-cell"><%= Spree.t(:shipping) %>:</div>
|
35
34
|
<% shipping_total = Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency) %>
|
@@ -38,8 +37,7 @@
|
|
38
37
|
data-currency='<%= Money::Currency.find(order.currency).symbol %>'
|
39
38
|
thousands-separator='<%= shipping_total.thousands_separator %>'
|
40
39
|
decimal-mark='<%= shipping_total.decimal_mark %>'
|
41
|
-
precision='<%= Money::Currency.find(order.currency).exponent %>'
|
42
|
-
>
|
40
|
+
precision='<%= Money::Currency.find(order.currency).exponent %>'>
|
43
41
|
<%= shipping_total.to_html %>
|
44
42
|
</div>
|
45
43
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% options_hash = Rails.env.production? ? {autocomplete: 'off'} : {} %>
|
12
12
|
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(id: 'card_number', class: 'spree-flat-input cardNumber', size: 19, maxlength: 19, autocomplete: "off", placeholder: Spree.t(:card_number)) %>
|
13
13
|
<span id="card_type" style="display:none;">
|
14
|
-
( <span id="looks_like"
|
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>
|
16
16
|
)
|
17
17
|
</span>
|
@@ -4,14 +4,14 @@
|
|
4
4
|
<img class="lazyload hero-image position-absolute"
|
5
5
|
data-src="<%= asset_path('homepage/main_banner.jpg') %>"
|
6
6
|
data-srcset="<%= image_source_set('homepage/main_banner') %>"
|
7
|
-
alt="
|
7
|
+
alt="Summer Collection">
|
8
8
|
|
9
9
|
<div class="hero-content">
|
10
10
|
<div class="homepage-hero-image-text mb-2 mx-auto pb-3 pb-md-4">
|
11
|
-
|
11
|
+
Summer Collection
|
12
12
|
</div>
|
13
13
|
<div>
|
14
|
-
<%= link_to
|
14
|
+
<%= link_to 'SHOP NOW', spree.products_path, class: 'btn btn-primary spree-btn px-5' %>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
17
|
</div>
|
@@ -24,10 +24,10 @@
|
|
24
24
|
<img class="w-100 lazyload"
|
25
25
|
data-src="<%= asset_path('homepage/category_banner_upper.jpg') %>"
|
26
26
|
data-srcset="<%= image_source_set('homepage/category_banner_upper') %>"
|
27
|
-
alt="
|
27
|
+
alt="Men">
|
28
28
|
|
29
29
|
<div class="homepage-taxon-box-text">
|
30
|
-
<h3
|
30
|
+
<h3>Men</h3>
|
31
31
|
</div>
|
32
32
|
<% end %>
|
33
33
|
|
@@ -35,10 +35,10 @@
|
|
35
35
|
<img class="w-100 lazyload"
|
36
36
|
data-src="<%= asset_path('homepage/category_banner_lower.jpg') %>"
|
37
37
|
data-srcset="<%= image_source_set('homepage/category_banner_lower') %>"
|
38
|
-
alt="
|
38
|
+
alt="Sportswear">
|
39
39
|
|
40
|
-
<div class="homepage-taxon-box-text" role="img" aria-label="
|
41
|
-
<h3
|
40
|
+
<div class="homepage-taxon-box-text" role="img" aria-label="Sportswear">
|
41
|
+
<h3>Sportswear</h3>
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
|
@@ -50,10 +50,10 @@
|
|
50
50
|
<img class="w-100 lazyload"
|
51
51
|
data-src="<%= asset_path('homepage/big_category_banner.jpg') %>"
|
52
52
|
data-srcset="<%= image_source_set('homepage/big_category_banner') %>"
|
53
|
-
alt="
|
53
|
+
alt="Women">
|
54
54
|
|
55
55
|
<div class="homepage-taxon-box-text">
|
56
|
-
<h3
|
56
|
+
<h3>Women</h3>
|
57
57
|
</div>
|
58
58
|
<% end %>
|
59
59
|
|
@@ -65,16 +65,15 @@
|
|
65
65
|
|
66
66
|
<div class="homepage-fashion-trends-box mb-3">
|
67
67
|
<div class="text-center">
|
68
|
-
<div class="homepage-fashion-trends-box-summer-text mb-1"
|
69
|
-
<div class="homepage-fashion-trends-box-fashion-trends-text mb-2"
|
68
|
+
<div class="homepage-fashion-trends-box-summer-text mb-1">Summer 2021</div>
|
69
|
+
<div class="homepage-fashion-trends-box-fashion-trends-text mb-2">FASHION TRENDS</div>
|
70
70
|
<div class="homepage-fashion-trends-box-description-text text-center mb-3">
|
71
|
-
|
71
|
+
Want to rock this season’s hottest trend in style? These are the top fashion from Summer 2020 Fashion Weeks that are coming our way this season.
|
72
72
|
</div>
|
73
|
-
<%= link_to
|
73
|
+
<%= link_to 'READ MORE', spree.nested_taxons_path('trending'), class: 'btn px-5 spree-btn btn-outline-primary' %>
|
74
74
|
</div>
|
75
75
|
</div>
|
76
76
|
|
77
|
-
|
78
77
|
<div data-product-carousel data-product-carousel-taxon-id='trending' class="mb-3"></div>
|
79
78
|
|
80
79
|
<div class="container">
|
@@ -85,14 +84,14 @@
|
|
85
84
|
<img class="w-100 lazyload"
|
86
85
|
data-src="<%= asset_path('homepage/promo_banner_left.jpg') %>"
|
87
86
|
data-srcset="<%= image_source_set('homepage/promo_banner_left') %>"
|
88
|
-
alt="
|
87
|
+
alt="NEW COLLECTION">
|
89
88
|
|
90
|
-
<div class="homepage-bottom-box-inner" role="img" aria-label="
|
89
|
+
<div class="homepage-bottom-box-inner" role="img" aria-label="New Collection">
|
91
90
|
<div class="homepage-bottom-box-inner-small-text">
|
92
|
-
|
91
|
+
New Collection
|
93
92
|
</div>
|
94
93
|
<div class="homepage-bottom-box-inner-big-text">
|
95
|
-
|
94
|
+
Streetstyle
|
96
95
|
</div>
|
97
96
|
</div>
|
98
97
|
</div>
|
@@ -105,14 +104,14 @@
|
|
105
104
|
<img class="w-100 lazyload"
|
106
105
|
data-src="<%= asset_path('homepage/promo_banner_right.jpg') %>"
|
107
106
|
data-srcset="<%= image_source_set('homepage/promo_banner_right') %>"
|
108
|
-
alt="
|
107
|
+
alt="Summer Sale">
|
109
108
|
|
110
109
|
<div class="homepage-bottom-box-inner">
|
111
110
|
<div class="homepage-bottom-box-inner-small-text">
|
112
|
-
|
111
|
+
Summer Sale
|
113
112
|
</div>
|
114
113
|
<div class="homepage-bottom-box-inner-big-text">
|
115
|
-
|
114
|
+
Up To 60%
|
116
115
|
</div>
|
117
116
|
</div>
|
118
117
|
</div>
|
@@ -12,11 +12,10 @@
|
|
12
12
|
<div class="input-group">
|
13
13
|
<%= order_form.text_field :applied_coupon_code, name: '', size: '30', class: 'form-control border-right-0 disabled',
|
14
14
|
value: Spree.t(:promotion_label, name: promotion.name),
|
15
|
-
data: { code: promotion.code }
|
16
|
-
%>
|
15
|
+
data: { code: promotion.code } %>
|
17
16
|
<div class="input-group-append">
|
18
17
|
<%= button_tag name: '', id: 'shopping-cart-remove-coupon-code-button', class: 'btn border-left-0 remove' do %>
|
19
|
-
<%= icon(name: 'close', width: 15, height: 14)
|
18
|
+
<%= icon(name: 'close', width: 15, height: 14) %>
|
20
19
|
<% end %>
|
21
20
|
</div>
|
22
21
|
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<h2 class="item-title"><%= link_to line_item.name, spree.product_path(variant.product) %></h2>
|
10
10
|
<% if line_item.insufficient_stock? %>
|
11
11
|
<span class="out-of-stock">
|
12
|
-
<%= Spree.t(:out_of_stock) %> <br
|
12
|
+
<%= Spree.t(:out_of_stock) %> <br>
|
13
13
|
</span>
|
14
14
|
<% end %>
|
15
15
|
<ul class="item-details-list" data-hook="line_item_description">
|
@@ -22,10 +22,10 @@
|
|
22
22
|
<% end %>
|
23
23
|
|
24
24
|
<div class="shopping-cart-item-delete <%= additional_classes %>" data-hook="cart_item_delete">
|
25
|
-
<%= link_to '#', class: 'delete', id: "delete_#{dom_id(line_item)}", data: { turbolinks: false }, aria: { label: Spree.t('cart_page.remove_from_cart') } do %>
|
25
|
+
<%= link_to '#', class: 'delete', id: "delete_#{dom_id(line_item)}", data: { turbolinks: false, id: dom_id(line_item), variant_sku: line_item.sku, variant_name: line_item.name, variant_price: line_item.price, variant_options: line_item.options_text }, aria: { label: Spree.t('cart_page.remove_from_cart') } do %>
|
26
26
|
<%= icon(name: 'garbage',
|
27
27
|
classes: 'shopping-cart-item-delete-icon',
|
28
28
|
width: 18.9,
|
29
|
-
height: 17)
|
29
|
+
height: 17) %>
|
30
30
|
<% end %>
|
31
31
|
</div>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= icon(name: 'empty-cart',
|
13
13
|
classes: 'shopping-cart-empty-image',
|
14
14
|
width: 83,
|
15
|
-
height: 83)
|
15
|
+
height: 83) %>
|
16
16
|
|
17
17
|
<p class="text-center shopping-cart-empty-info"><%= Spree.t('cart_page.empty_info').html_safe %></p>
|
18
18
|
</div>
|
@@ -57,8 +57,7 @@
|
|
57
57
|
<%= render 'coupon_code',
|
58
58
|
promotion: @order.valid_coupon_promotions.first,
|
59
59
|
order_form: order_form,
|
60
|
-
classes: ''
|
61
|
-
%>
|
60
|
+
classes: '' %>
|
62
61
|
<% end %>
|
63
62
|
|
64
63
|
<div class="text-right shopping-cart-total d-lg-none">
|
@@ -15,75 +15,5 @@
|
|
15
15
|
<p class="order-show-number text-uppercase w-100 text-center">
|
16
16
|
<%= accurate_title %> / <%= pretty_date(@order.completed_at) %>
|
17
17
|
</p>
|
18
|
-
|
19
|
-
<div>
|
20
|
-
<dt class="text-uppercase text-center text-lg-left"><%= Spree.t(:shipping_address) %></dt>
|
21
|
-
<dd class="text-center text-lg-left">
|
22
|
-
<%= render 'spree/shared/address', address: @order.ship_address %>
|
23
|
-
</dd>
|
24
|
-
</div>
|
25
|
-
<div>
|
26
|
-
<dt class="text-uppercase text-center text-lg-left"><%= Spree.t(:billing_address) %></dt>
|
27
|
-
<dd class="text-center text-lg-left">
|
28
|
-
<%= render 'spree/shared/address', address: @order.bill_address %>
|
29
|
-
</dd>
|
30
|
-
</div>
|
31
|
-
<div>
|
32
|
-
<dt class="text-uppercase text-center text-lg-left"><%= Spree.t(:shipping) %></dt>
|
33
|
-
<% @order.shipments.valid.each do |shipment| %>
|
34
|
-
<dd class="text-center text-lg-left">
|
35
|
-
<%= shipment.shipping_method.name %>
|
36
|
-
<%= link_to_tracking(shipment) if shipment.shipped? %>
|
37
|
-
</dd>
|
38
|
-
<% end %>
|
39
|
-
</div>
|
40
|
-
<div>
|
41
|
-
<dt class="text-uppercase text-center text-lg-left"><%= Spree.t(:payment) %></dt>
|
42
|
-
<dd class="text-center text-lg-left">
|
43
|
-
<%= render collection: @order.payments.valid, partial: 'spree/shared/payment' %>
|
44
|
-
</dd>
|
45
|
-
</div>
|
46
|
-
</dl>
|
47
|
-
<hr class="w-100 mt-0 mb-4 d-sm-none" />
|
48
|
-
<div class="order-show-line-items d-flex flex-column align-items-center">
|
49
|
-
<% @order.line_items.each do |item| %>
|
50
|
-
<div class="order-show-line-items-line-item d-flex w-100">
|
51
|
-
<%= link_to product_image(item.variant), item.product %>
|
52
|
-
<div class="order-show-line-items-line-item-desc w-100">
|
53
|
-
<span class="order-show-line-items-line-item-desc-name">
|
54
|
-
<%= item.name %>
|
55
|
-
</span>
|
56
|
-
<span class="order-show-line-items-line-item-desc-subtitle text-break text-uppercase">
|
57
|
-
<ul class="list-unstyled mb-0">
|
58
|
-
<% item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
|
59
|
-
<li><%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %></li>
|
60
|
-
<% end %>
|
61
|
-
</ul>
|
62
|
-
</span>
|
63
|
-
<div class="order-show-line-items-line-item-desc-price">
|
64
|
-
<div class="order-show-line-items-line-item-desc-price-attr-name d-inline d-lg-block">
|
65
|
-
<span><%= Spree.t(:price) %></span>
|
66
|
-
</div>
|
67
|
-
<span class="font-weight-bold"><%= item.single_money.to_html %></span>
|
68
|
-
</div>
|
69
|
-
<div class="order-show-line-items-line-item-desc-quantity">
|
70
|
-
<div class="order-show-line-items-line-item-desc-quantity-attr-name d-inline d-lg-block">
|
71
|
-
<span><%= Spree.t(:quantity) %></span>
|
72
|
-
</div>
|
73
|
-
<span class="order-show-line-items-line-item-desc-quantity-val d-lg-block"><%= item.quantity %></span>
|
74
|
-
</div>
|
75
|
-
<div class="order-show-line-items-line-item-desc-total">
|
76
|
-
<div class="order-show-line-items-line-item-desc-total-attr-name d-inline d-lg-block">
|
77
|
-
<span><%= Spree.t(:total) %></span>
|
78
|
-
</div>
|
79
|
-
<span class="font-weight-bold d-lg-block"><%= item.display_total.to_s %></span>
|
80
|
-
</div>
|
81
|
-
</div>
|
82
|
-
</div>
|
83
|
-
<% end %>
|
84
|
-
</div>
|
85
|
-
<hr class="w-100 mt-4 mb-0 d-sm-none" />
|
86
|
-
<div id="checkout-summary" class="w-100" data-hook="checkout_summary_box">
|
87
|
-
<%= render partial: 'spree/checkout/summary', locals: { order: @order } %>
|
88
|
-
</div>
|
18
|
+
<%= render partial: 'spree/shared/order_details', locals: { order: @order } %>
|
89
19
|
</div>
|
@@ -16,7 +16,6 @@
|
|
16
16
|
|
17
17
|
<% is_product_available_in_currency = product_available_in_currency? %>
|
18
18
|
<% default_variant = default_variant(@variants, @product) %>
|
19
|
-
<% should_display_compare_at_price = default_variant.compare_at_price.present? && default_variant.compare_at_price > default_variant.price %>
|
20
19
|
|
21
20
|
<%= form_for :order, html: {
|
22
21
|
id: 'add-to-cart-form',
|
@@ -28,11 +27,9 @@
|
|
28
27
|
<div id="inside-product-cart-form" data-hook="inside_product_cart_form">
|
29
28
|
<% if is_product_available_in_currency %>
|
30
29
|
<div id="product-price" class="mb-2 text-center text-md-left add-to-cart-form-price" data-hook="product_price">
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<% end %>
|
35
|
-
</span>
|
30
|
+
<% if should_display_compare_at_price?(default_variant) %>
|
31
|
+
<span class="compare-at-price mr-3"><%= display_compare_at_price(default_variant) %></span>
|
32
|
+
<% end %>
|
36
33
|
<span class="price selling" content="<%= @product_price.to_d %>">
|
37
34
|
<%= display_price(default_variant) %>
|
38
35
|
</span>
|
@@ -58,7 +55,7 @@
|
|
58
55
|
<ul id="product-variants" class="product-variants">
|
59
56
|
<% used_variants_options(@variants, @product).each_with_index do |option_type, index| %>
|
60
57
|
<li>
|
61
|
-
<% if
|
58
|
+
<% if color_option_type_name.present? && color_option_type_name == option_type[:name] %>
|
62
59
|
<%= render "color_option_type", option_type: option_type, index: index %>
|
63
60
|
<% else %>
|
64
61
|
<%= render "option_type", option_type: option_type, index: index %>
|
@@ -2,16 +2,15 @@
|
|
2
2
|
<% if @product_images.size > 0 %>
|
3
3
|
<div
|
4
4
|
class="w-100 d-flex align-self-start justify-content-between product-details-images"
|
5
|
-
data-hook="product_left_part_wrap"
|
6
|
-
|
5
|
+
data-hook="product_left_part_wrap">
|
6
|
+
|
7
7
|
<div class="d-none d-md-block product-details-thumbnails" data-hook="product_thumbnails">
|
8
8
|
<%= render 'spree/shared/carousel/thumbnails',
|
9
9
|
images: @product_images,
|
10
10
|
group_id: 'main-product-carousel',
|
11
11
|
id: 'productThumbnailsCarousel',
|
12
12
|
trigger_id: 'productCarousel',
|
13
|
-
per_page: 5
|
14
|
-
%>
|
13
|
+
per_page: 5 %>
|
15
14
|
</div>
|
16
15
|
<div class="product-details-single" data-hook="product_images">
|
17
16
|
<%= render 'spree/shared/carousel/single',
|
@@ -19,8 +18,7 @@
|
|
19
18
|
group_id: 'main-product-carousel',
|
20
19
|
id: 'productCarousel',
|
21
20
|
trigger_id: 'productCarousel',
|
22
|
-
zoomed: false
|
23
|
-
%>
|
21
|
+
zoomed: false %>
|
24
22
|
</div>
|
25
23
|
</div>
|
26
24
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if @product_images.size > 0 %>
|
2
|
-
<div class="modal fade" id="picturesModal" tabindex="-1" role="dialog"
|
2
|
+
<div class="modal fade" id="picturesModal" tabindex="-1" role="dialog">
|
3
3
|
<div class="modal-dialog--zoom modal-dialog mw-100 vh-100 mt-0 mb-0" role="document">
|
4
4
|
<div class="modal-content h-100">
|
5
5
|
<div class="modal-body h-100">
|
@@ -23,8 +23,7 @@
|
|
23
23
|
group_id: 'main-product-modal-carousel',
|
24
24
|
id: 'productModalThumbnailsCarousel',
|
25
25
|
trigger_id: 'productCarousel',
|
26
|
-
per_page: 4
|
27
|
-
%>
|
26
|
+
per_page: 4 %>
|
28
27
|
</div>
|
29
28
|
<% end %>
|
30
29
|
<div class="product-details-single">
|
@@ -33,8 +32,7 @@
|
|
33
32
|
group_id: 'main-product-modal-carousel',
|
34
33
|
id: 'productModalCarousel',
|
35
34
|
trigger_id: 'productCarousel',
|
36
|
-
zoomed: true
|
37
|
-
%>
|
35
|
+
zoomed: true %>
|
38
36
|
</div>
|
39
37
|
</div>
|
40
38
|
</div>
|
@@ -15,8 +15,7 @@
|
|
15
15
|
"option-type-index" => index,
|
16
16
|
"presentation" => option_value[:presentation],
|
17
17
|
"variant-id" => option_value[:variant_id]
|
18
|
-
}
|
19
|
-
%>
|
18
|
+
} %>
|
20
19
|
|
21
20
|
<%= label_tag "variant_option_value_id_#{option_type[:id]}_#{option_value[:id]}",
|
22
21
|
class: "m-1 select-label",
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div class="plp-overlay-header-border"></div>
|
9
9
|
<ul class="pt-1 plp-overlay-ul">
|
10
10
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by].blank? %>">
|
11
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: nil)) %>"
|
11
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: nil)) %>">
|
12
12
|
<div class="plp-empty-dot">
|
13
13
|
<div class="filled-dot"></div>
|
14
14
|
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</a>
|
17
17
|
</li>
|
18
18
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'newest-first' %>">
|
19
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>"
|
19
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>">
|
20
20
|
<div class="plp-empty-dot">
|
21
21
|
<div class="filled-dot"></div>
|
22
22
|
</div>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
</a>
|
25
25
|
</li>
|
26
26
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-high-to-low' %>">
|
27
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>"
|
27
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>">
|
28
28
|
<div class="plp-empty-dot">
|
29
29
|
<div class="filled-dot"></div>
|
30
30
|
</div>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
</a>
|
33
33
|
</li>
|
34
34
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-low-to-high' %>">
|
35
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>"
|
35
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>">
|
36
36
|
<div class="plp-empty-dot">
|
37
37
|
<div class="filled-dot"></div>
|
38
38
|
</div>
|