spree_storefront 5.0.3 → 5.0.5
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/assets/stylesheets/storefront_page_builder.css +12 -7
- data/app/controllers/spree/account/wished_items_controller.rb +0 -2
- data/app/controllers/spree/line_items_controller.rb +14 -7
- data/app/controllers/spree/products_controller.rb +1 -1
- data/app/controllers/spree/search_controller.rb +1 -1
- data/app/controllers/spree/store_controller.rb +17 -15
- data/app/helpers/spree/cart_helper.rb +1 -1
- data/app/helpers/spree/filters_helper.rb +5 -1
- data/app/helpers/spree/fonts_helper.rb +3 -1
- data/app/helpers/spree/products_helper.rb +5 -1
- data/app/helpers/spree/storefront_helper.rb +1 -0
- data/app/javascript/spree/storefront/controllers/card_validation_controller.js +2 -0
- data/app/javascript/spree/storefront/controllers/cart_controller.js +5 -0
- data/app/javascript/spree/storefront/controllers/quantity_picker_controller.js +16 -9
- data/app/javascript/spree/storefront/controllers/wished_item_controller.js +4 -2
- data/app/views/devise/passwords/edit.html.erb +1 -1
- data/app/views/devise/registrations/new.html.erb +1 -1
- data/app/views/devise/shared/_links.html.erb +3 -3
- data/app/views/layouts/spree/checkout.html.erb +1 -1
- data/app/views/layouts/spree/storefront.html.erb +1 -1
- data/app/views/spree/addresses/edit.html.erb +2 -2
- data/app/views/spree/checkout/_address.html.erb +3 -4
- data/app/views/spree/checkout/_coupon_code.html.erb +1 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -2
- data/app/views/spree/checkout/_missing_all_line_items.html.erb +2 -2
- data/app/views/spree/checkout/_payment_methods.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +45 -44
- data/app/views/spree/checkout/payment/_gateway.html.erb +12 -12
- data/app/views/spree/line_items/destroy.turbo_stream.erb +14 -8
- data/app/views/spree/seo/sitemap.xml.erb +2 -2
- data/app/views/themes/default/spree/account/_order.html.erb +5 -5
- data/app/views/themes/default/spree/checkout/complete.html.erb +1 -1
- data/app/views/themes/default/spree/orders/_line_item.html.erb +3 -3
- data/app/views/themes/default/spree/orders/_line_item_quantity.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/_featured_posts.html.erb +56 -0
- data/app/views/themes/default/spree/page_sections/_featured_product.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb +2 -2
- data/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb +4 -5
- data/app/views/themes/default/spree/page_sections/_newsletter.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/_product_grid.html.erb +16 -9
- data/app/views/themes/default/spree/policies/show.html.erb +11 -7
- data/app/views/themes/default/spree/posts/_post.html.erb +20 -11
- data/app/views/themes/default/spree/products/_add_to_cart_button.html.erb +4 -4
- data/app/views/themes/default/spree/products/_add_to_wishlist.html.erb +2 -0
- data/app/views/themes/default/spree/products/_details.html.erb +1 -1
- data/app/views/themes/default/spree/products/_json_ld.html.erb +1 -1
- data/app/views/themes/default/spree/products/_json_ld_variant.html.erb +1 -1
- data/app/views/themes/default/spree/products/_media_gallery.html.erb +1 -2
- data/app/views/themes/default/spree/products/filters/_availability.html.erb +1 -1
- data/app/views/themes/default/spree/products/filters/_price.html.erb +4 -4
- data/app/views/themes/default/spree/shared/_cart_icon.html.erb +4 -2
- data/app/views/themes/default/spree/shared/_cart_pane.html.erb +5 -2
- data/app/views/themes/default/spree/shared/_meta_tags.html.erb +2 -2
- data/config/locales/en.yml +8 -0
- data/lib/generators/spree/storefront/theme/templates/model.rb.tt +91 -4
- metadata +7 -6
@@ -11,7 +11,7 @@
|
|
11
11
|
<div class="form-group mb-3 relative">
|
12
12
|
<% options_hash = Rails.env.production? ? {autocomplete: 'off'} : {} %>
|
13
13
|
<label for="card_number" class="block text-xs text-neutral-600 mb-1"><%= Spree.t(:card_number) %></label>
|
14
|
-
<%= text_field_tag "#{param_prefix}[number]", '',
|
14
|
+
<%= text_field_tag "#{param_prefix}[number]", '',
|
15
15
|
options_hash.merge(
|
16
16
|
id: 'card_number',
|
17
17
|
data: { card_validation_target: "number" },
|
@@ -23,7 +23,7 @@
|
|
23
23
|
required: true
|
24
24
|
)
|
25
25
|
%>
|
26
|
-
<div class="absolute right-2 top-7"
|
26
|
+
<div class="absolute right-2 top-7"
|
27
27
|
data-card-validation-target="typeContainer"
|
28
28
|
id="credit-card-type-container">
|
29
29
|
</div>
|
@@ -32,37 +32,37 @@
|
|
32
32
|
<div class="flex gap-3">
|
33
33
|
<div class="form-group">
|
34
34
|
<label for="card_expiry" class="block text-xs text-neutral-600 mb-1"><%= Spree.t(:expiration_date) %></label>
|
35
|
-
<%= text_field_tag "#{param_prefix}[expiry]", '',
|
36
|
-
id: 'card_expiry',
|
35
|
+
<%= text_field_tag "#{param_prefix}[expiry]", '',
|
36
|
+
id: 'card_expiry',
|
37
37
|
class: 'text-input',
|
38
38
|
data: {
|
39
39
|
card_validation_target: "expiry"
|
40
40
|
},
|
41
|
-
placeholder:
|
41
|
+
placeholder: Spree.t(:card_expiration_placeholder),
|
42
42
|
required: true
|
43
43
|
%>
|
44
44
|
</div>
|
45
45
|
<div class="form-group">
|
46
46
|
<label for="card_code" class="block text-xs text-neutral-600 mb-1"><%= Spree.t(:cvv) %></label>
|
47
|
-
<%= text_field_tag "#{param_prefix}[verification_value]", '',
|
47
|
+
<%= text_field_tag "#{param_prefix}[verification_value]", '',
|
48
48
|
options_hash.merge(
|
49
|
-
id: 'card_code',
|
50
|
-
class: 'text-input',
|
49
|
+
id: 'card_code',
|
50
|
+
class: 'text-input',
|
51
51
|
data: { card_validation_target: "cvv" },
|
52
52
|
size: 4,
|
53
53
|
maxlength: 4,
|
54
54
|
pattern: '[0-9]*',
|
55
55
|
inputmode: 'numeric',
|
56
|
-
placeholder: Spree.t(:cvv),
|
56
|
+
placeholder: Spree.t(:cvv),
|
57
57
|
required: true
|
58
|
-
)
|
58
|
+
)
|
59
59
|
%>
|
60
60
|
</div>
|
61
61
|
</div>
|
62
62
|
|
63
|
-
<%= hidden_field_tag "#{param_prefix}[cc_type]", '',
|
63
|
+
<%= hidden_field_tag "#{param_prefix}[cc_type]", '',
|
64
64
|
id: "cc_type",
|
65
|
-
data: { card_validation_target: "ccType" }
|
65
|
+
data: { card_validation_target: "ccType" }
|
66
66
|
%>
|
67
67
|
|
68
68
|
<% PaymentIcon.credit_cards.each do |card| %>
|
@@ -1,11 +1,17 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<% if flash[:error] %>
|
2
|
+
<%= spree_turbo_update_flashes %>
|
3
|
+
<% else %>
|
4
|
+
<%= turbo_stream.replace_all '.cart-contents' do %>
|
5
|
+
<%= turbo_frame_tag cart_id(@order), class: 'cart-contents' do %>
|
6
|
+
<% if @order.line_items.empty? %>
|
7
|
+
<%= render 'spree/orders/empty' %>
|
8
|
+
<% else %>
|
9
|
+
<%= render 'spree/orders/cart' %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render_storefront_partials(:remove_from_cart_partials) %>
|
7
13
|
<% end %>
|
8
14
|
<% end %>
|
9
|
-
<% end %>
|
10
15
|
|
11
|
-
<%= spree_turbo_update_cart(@order) %>
|
16
|
+
<%= spree_turbo_update_cart(@order) %>
|
17
|
+
<% end %>
|
@@ -12,8 +12,8 @@
|
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
14
14
|
|
15
|
-
<% cache [
|
16
|
-
<%
|
15
|
+
<% cache [storefront_products_scope, current_currency] do %>
|
16
|
+
<% storefront_products_scope.find_each do |product| %>
|
17
17
|
<url>
|
18
18
|
<loc><%= spree_storefront_resource_url(product) %></loc>
|
19
19
|
<lastmod><%= product.updated_at.strftime('%Y-%m-%d') %></lastmod>
|
@@ -8,16 +8,16 @@
|
|
8
8
|
<% if order.payment_state == 'void' %>
|
9
9
|
<% if order.order_refunded? %>
|
10
10
|
<span class="badge-refunded">
|
11
|
-
<%= Spree.t("payment_states.refunded")
|
11
|
+
<%= Spree.t("payment_states.refunded") %>
|
12
12
|
</span>
|
13
13
|
<% else %>
|
14
14
|
<span class="badge-void">
|
15
|
-
<%= Spree.t("payment_states.#{order.payment_state}")
|
15
|
+
<%= Spree.t("payment_states.#{order.payment_state}") %>
|
16
16
|
</span>
|
17
17
|
<% end %>
|
18
18
|
<% else %>
|
19
19
|
<span class="badge-success">
|
20
|
-
<%= Spree.t("payment_states.#{order.payment_state}")
|
20
|
+
<%= Spree.t("payment_states.#{order.payment_state}") %>
|
21
21
|
</span>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
@@ -26,11 +26,11 @@
|
|
26
26
|
<% if order.shipment_state %>
|
27
27
|
<% if order.shipment_state == 'shipped' %>
|
28
28
|
<span class="badge-success">
|
29
|
-
<%= Spree.t("shipment_states.#{order.shipment_state}")
|
29
|
+
<%= Spree.t("shipment_states.#{order.shipment_state}") %>
|
30
30
|
</span>
|
31
31
|
<% else %>
|
32
32
|
<span class="badge-<%= order.shipment_state %>">
|
33
|
-
<%= Spree.t("shipment_states.#{order.shipment_state}")
|
33
|
+
<%= Spree.t("shipment_states.#{order.shipment_state}") %>
|
34
34
|
</span>
|
35
35
|
<% end %>
|
36
36
|
<% end %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<div class="mt-3 border-t pt-3">
|
25
25
|
<span class="text-sm"><%= Spree.t(:status) %></span>
|
26
26
|
<% if @order.payment_state.present? %>
|
27
|
-
<span class="badge-<%= @order.payment_state %>"><%= Spree.t("payment_states.#{@order.payment_state}")
|
27
|
+
<span class="badge-<%= @order.payment_state %>"><%= Spree.t("payment_states.#{@order.payment_state}") %></span>
|
28
28
|
<% else %>
|
29
29
|
<span class="badge-pending"><%= Spree.t(:pending) %></span>
|
30
30
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%= turbo_frame_tag dom_id(line_item)
|
2
|
-
<li class="cart-line-item flex items-top py-6 px-4 w-full"
|
1
|
+
<%= turbo_frame_tag dom_id(line_item) do %>
|
2
|
+
<li class="cart-line-item flex items-top py-6 px-4 w-full">
|
3
3
|
<div class="line-item-overlay"></div>
|
4
4
|
<div class="cart-product-image flex-shrink-0" id="<%= dom_id(line_item) %>-image" data-turbo-permanent>
|
5
5
|
<% image = line_item.variant.default_image %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= link_to line_item.name, spree_storefront_resource_url(line_item.product), class: 'font-semibold text-text', data: { 'turbo-frame': '_top' } %>
|
15
15
|
|
16
16
|
<%= form_for line_item, url: spree.line_item_url(line_item, order_token: line_item.order.token), method: :delete, data: { controller: 'turbo-stream-form' } do |item_form| %>
|
17
|
-
<%= button_tag type: :submit, class: 'remove-line-item-button h-100', data: { action: "click->
|
17
|
+
<%= button_tag type: :submit, class: 'remove-line-item-button h-100', data: { action: "click->cart#disableCart turbo-stream-form:submit-end->cart#enableCart" } do %>
|
18
18
|
<%= render 'spree/shared/icons/cross', size: 16 %>
|
19
19
|
<% end %>
|
20
20
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="flex items-center">
|
2
2
|
<%= form_for line_item, url: spree.line_item_url(line_item, order_token: line_item.order.token), data: { controller: 'turbo-stream-form' } do |item_form| %>
|
3
|
-
<div class="quantity-picker" data-controller="quantity-picker">
|
3
|
+
<div class="quantity-picker" data-controller="quantity-picker" data-quantity-picker-disabled-class="opacity-50 cursor-not-allowed">
|
4
4
|
<!-- this is a dummy button to work with turbo frame forms when hitting ENTER -->
|
5
5
|
<%= button_tag render('spree/shared/icons/minus'), type: 'submit', class: 'hidden' %>
|
6
6
|
<%= quantity_modifier_button_tag render('spree/shared/icons/minus'), type: 'submit', action: 'decrease', class: 'quantity-decrease-button' %>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<div style='<%= section_styles(section) %>' class='animate-fadeIn'>
|
2
|
+
<div class='page-container'>
|
3
|
+
<% heading_size =
|
4
|
+
case section.preferred_heading_size
|
5
|
+
when "small"
|
6
|
+
"text-base font-medium"
|
7
|
+
when "medium"
|
8
|
+
"text-lg lg:text-xl font-medium"
|
9
|
+
when "large"
|
10
|
+
"text-xl lg:text-2xl font-medium"
|
11
|
+
end %>
|
12
|
+
<% if section.preferred_heading.present? %>
|
13
|
+
<div class='mb-8 flex flex-col'>
|
14
|
+
<h3
|
15
|
+
class='
|
16
|
+
<%= heading_size %> featured-taxon--title font-medium
|
17
|
+
text-<%= section.preferred_heading_alignment %>
|
18
|
+
'
|
19
|
+
data-title="<%= section.preferred_heading.downcase %>"
|
20
|
+
style='<%= section_heading_styles(section) %>'
|
21
|
+
>
|
22
|
+
<%= section.preferred_heading %>
|
23
|
+
</h3>
|
24
|
+
|
25
|
+
<% if section.description.present? %>
|
26
|
+
<div class='pt-4 text-<%= section.preferred_description_alignment %>'>
|
27
|
+
<%= section.description %>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
<div class='flex h-full relative'>
|
33
|
+
<div
|
34
|
+
class='
|
35
|
+
swiper-container overflow-hidden flex-1 pr-8 lg:pr-0 -mx-4 lg:mx-0 flex flex-col
|
36
|
+
lg:flex-col-reverse
|
37
|
+
'
|
38
|
+
data-controller='carousel'
|
39
|
+
data-carousel-options-value='{ "slidesPerView": 1, "centeredSlides": false, "spaceBetween": 16, "grabCursor": true, "breakpoints": { "768": { "slidesPerView": 3, "spaceBetween": 24 } }, "navigation": { "nextEl": ".swiper-custom-button-next-<%= section.id %>", "prevEl": ".swiper-custom-button-prev-<%= section.id %>" } }'
|
40
|
+
>
|
41
|
+
<div class='swiper-wrapper px-4 lg:px-0 h-auto'>
|
42
|
+
<%= render partial: "spree/posts/post",
|
43
|
+
collection: section.posts,
|
44
|
+
cached: spree_base_cache_scope,
|
45
|
+
as: :post %>
|
46
|
+
</div>
|
47
|
+
<%= button_tag class: "absolute p-2 bg-white rounded-full z-10 border border-accent left-0 disabled:hidden hover:border-primary ml-2 lg:ml-0 swiper-custom-button-prev-#{section.id} block top-[100px]", aria: { label: "Previous posts" }, style: "transform: translate(-50%, -50%);" do %>
|
48
|
+
<%= render "spree/shared/icons/chevron" %>
|
49
|
+
<% end %>
|
50
|
+
<%= button_tag class: "absolute p-2 bg-white rounded-full z-10 border border-accent right-0 disabled:hidden hover:border-primary mr-2 lg:mr-0 swiper-custom-button-next-#{section.id} block top-[100px]", aria: { label: "Next posts" }, style: "transform: translate(50%, -50%);" do %>
|
51
|
+
<%= render "spree/shared/icons/chevron_right" %>
|
52
|
+
<% end %>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
@@ -89,7 +89,7 @@
|
|
89
89
|
<% if presenter.product %>
|
90
90
|
<div class="absolute flex" data-controller="copy-input">
|
91
91
|
<div class="has-float-label flex flex-col max-w-[200px]">
|
92
|
-
<%= text_field_tag "product-#{presenter.product.id}-share-link", spree.product_url(presenter.product, host: current_store.
|
92
|
+
<%= text_field_tag "product-#{presenter.product.id}-share-link", spree.product_url(presenter.product, host: current_store.url_or_custom_domain), class: 'text-ellipsis text-input border-r-0 !rounded-r-none !rounded-l-md', readonly: true, type: 'text', onclick: 'this.select()', data: { copy_input_target: 'input' } %>
|
93
93
|
<%= label_tag "product-#{presenter.product.id}-share-link", Spree.t(:link) %>
|
94
94
|
</div>
|
95
95
|
<button
|
@@ -5,7 +5,7 @@
|
|
5
5
|
when 'medium' then 'text-lg lg:text-xl font-medium'
|
6
6
|
when 'large' then 'text-xl lg:text-2xl font-medium'
|
7
7
|
end %>
|
8
|
-
<% if section.taxon&.
|
8
|
+
<% if section.taxon&.page_builder_image&.attached? && section.preferred_show_taxon_image %>
|
9
9
|
<% desktop_slides_amount = 2.5 %>
|
10
10
|
<% section_with_image = true %>
|
11
11
|
<% arrows_on_top = false %>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<% if section_with_image %>
|
48
48
|
<div class='lg:col-span-5'>
|
49
49
|
<%= link_to spree.nested_taxons_path(section.taxon), data: { turbo_frame: "_top" } do %>
|
50
|
-
<%= spree_image_tag(section.taxon.
|
50
|
+
<%= spree_image_tag(section.taxon.page_builder_image, height: 500, width: 500, class: 'h-full w-full object-cover object-center', loading: :lazy) %>
|
51
51
|
<% end %>
|
52
52
|
</div>
|
53
53
|
<% end %>
|
@@ -12,9 +12,9 @@
|
|
12
12
|
<div class="gap-6 grid-cols-2 sm:grid-cols-4 lg:grid-cols-6 xl:gap-x-8 mb-7 hidden md:grid">
|
13
13
|
<% section.links.each do |link| %>
|
14
14
|
<%= page_builder_link_to link, title: link.label, class: 'group block overflow-hidden', target: link.open_in_new_tab.presence && '_blank' do %>
|
15
|
-
<% if link.linkable.
|
15
|
+
<% if link.linkable.page_builder_image&.attached? && link.linkable.page_builder_image&.variable? %>
|
16
16
|
<div class="flex space-y-2 flex-col">
|
17
|
-
<%= spree_image_tag(link.linkable.
|
17
|
+
<%= spree_image_tag(link.linkable.page_builder_image, height: 300, width: 300, class: 'h-full w-full object-cover object-center group-hover:opacity-75 rounded-md bg-gray-200', loading: :lazy, alt: link.label) %>
|
18
18
|
<span><%= link.label %></span>
|
19
19
|
</div>
|
20
20
|
<% else %>
|
@@ -47,10 +47,9 @@
|
|
47
47
|
<% section.links.each do |link| %>
|
48
48
|
<div class='swiper-slide w-[200px]'>
|
49
49
|
<%= page_builder_link_to link, title: link.label, class: 'group block overflow-hidden', target: link.open_in_new_tab.presence && '_blank' do %>
|
50
|
-
<% if link.linkable.
|
50
|
+
<% if link.linkable.page_builder_image.attached? %>
|
51
51
|
<div class="flex space-y-2 flex-col">
|
52
|
-
<%= spree_image_tag(link.linkable.
|
53
|
-
<span><%= link.label %></span>
|
52
|
+
<%= spree_image_tag(link.linkable.page_builder_image, height: 200, width: 200, class: 'h-full w-full object-cover object-center group-hover:opacity-75 rounded-md bg-gray-200', loading: :lazy, alt: link.label) %>
|
54
53
|
</div>
|
55
54
|
<% else %>
|
56
55
|
<div class="aspect-1 w-full group-hover:bg-gray-100 bg-gray-200 flex items-center justify-center relative">
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<div <%= block_attributes(block) %> class="flex justify-center w-full">
|
39
39
|
<% if block.image.attached? && block.image.variable? %>
|
40
40
|
<% image_style = "aspect-ratio: #{spree_asset_aspect_ratio(block.image)}; --desktop-height: #{block.preferred_height}px; --mobile-height: #{block.preferred_mobile_height}px;" %>
|
41
|
-
<%= image_tag spree_image_url(block.image, width: 1000, height: 1000), height: block.preferred_height,
|
41
|
+
<%= image_tag spree_image_url(block.image, width: 1000, height: 1000), height: block.preferred_height, class: "custom-desktop-height custom-mobile-height", style: image_style %>
|
42
42
|
<% end %>
|
43
43
|
</div>
|
44
44
|
<% end %>
|
@@ -37,16 +37,23 @@
|
|
37
37
|
</div>
|
38
38
|
</div>
|
39
39
|
|
40
|
-
|
41
|
-
<div
|
42
|
-
|
43
|
-
<div class=
|
40
|
+
<div style="<%= section_styles(section) %>">
|
41
|
+
<div class="page-container">
|
42
|
+
<% if products.any? %>
|
43
|
+
<div class="grid gap-y-8 gap-x-4 grid-cols-2 lg:grid-cols-4 lg:gap-x-6 lg:gap-y-10 mb-7" id="products">
|
44
44
|
<%= render 'spree/shared/products', products: products %>
|
45
45
|
</div>
|
46
|
-
</div>
|
47
|
-
<%= render 'spree/products/show_more_button' %>
|
48
|
-
</div>
|
49
46
|
|
50
|
-
|
51
|
-
|
47
|
+
<%= render 'spree/products/show_more_button' %>
|
48
|
+
<%= render('spree/products/json_ld_list', products: products) unless turbo_frame_request? %>
|
49
|
+
<% else %>
|
50
|
+
<div class="grid">
|
51
|
+
<div class="text-center py-10">
|
52
|
+
<h2 class="text-xl font-semibold mb-2"><%= Spree.t(:no_products_found) %></h2>
|
53
|
+
<p class="text-sm"><%= Spree.t(:try_removing_filters) %></p>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
<% end %>
|
57
|
+
</div>
|
58
|
+
</div>
|
52
59
|
<% end %>
|
@@ -1,11 +1,15 @@
|
|
1
1
|
<div class="page-container py-12">
|
2
2
|
<h1 class="text-2xl tracking-tight text-center lg:text-left mb-3 uppercase">
|
3
|
-
<%= params[:id]
|
3
|
+
<%= Spree.t(params[:id]) %>
|
4
4
|
</h1>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
|
6
|
+
<% if @policy.present? %>
|
7
|
+
<p class="mb-8 text-center lg:text-left">
|
8
|
+
<%= Spree.t("storefront.policies.last_update_at", date: l(@policy.updated_at.to_date)) %>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<div class="mb-5">
|
12
|
+
<%= @policy&.to_s %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
11
15
|
</div>
|
@@ -1,13 +1,22 @@
|
|
1
|
-
<div
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<div class="swiper-slide w-full">
|
2
|
+
<div id="<%= dom_id(post) %>">
|
3
|
+
<%= link_to spree.post_path(post), class: 'block hover:opacity-70 transition-opacity', data: { turbo_frame: '_top' } do %>
|
4
|
+
<div class="h-[200px] w-full bg-gray-100">
|
5
|
+
<% if post.image.attached? && post.image.variable? %>
|
6
|
+
<%= spree_image_tag(
|
7
|
+
post.image,
|
8
|
+
width: 400,
|
9
|
+
height: 200,
|
10
|
+
class: "h-full w-full object-cover object-center",
|
11
|
+
loading: :lazy,
|
12
|
+
alt: post.title,
|
13
|
+
) %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
8
16
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
17
|
+
<h1 class="uppercase text-lg font-medium mt-4"><%= post.title %></h1>
|
18
|
+
<div class="mt-2 text-sm"><%= local_time(post.published_at, "%B %e, %Y") %></div>
|
19
|
+
<div class="mt-4"><%= post.shortened_description %></div>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
13
22
|
</div>
|
@@ -21,9 +21,9 @@ variant_not_available = selected_variant.nil? ||
|
|
21
21
|
},
|
22
22
|
disabled: product.price_in(current_currency).zero? do %>
|
23
23
|
<% if not_selected_options.size == 1 %>
|
24
|
-
<span><%= Spree.t(
|
24
|
+
<span><%= Spree.t('storefront.variant_picker.please_choose', option_type: not_selected_options[0].presentation) %></span>
|
25
25
|
<% elsif not_all_options_selected %>
|
26
|
-
<span><%= Spree.t(
|
26
|
+
<span><%= Spree.t('storefront.variant_picker.please_choose_all_options') %></span>
|
27
27
|
<% elsif variant_not_available %>
|
28
28
|
<span><%= Spree.t(:notify_me_when_available) %></span>
|
29
29
|
<%= render 'spree/shared/icons/bell' %>
|
@@ -43,9 +43,9 @@ variant_not_available = selected_variant.nil? ||
|
|
43
43
|
},
|
44
44
|
disabled: product.price_in(current_currency).zero? do %>
|
45
45
|
<% if not_selected_options.size == 1 %>
|
46
|
-
<span><%= Spree.t(
|
46
|
+
<span><%= Spree.t('storefront.variant_picker.please_choose', option_type: not_selected_options[0].presentation) %></span>
|
47
47
|
<% elsif not_all_options_selected %>
|
48
|
-
<span><%= Spree.t(
|
48
|
+
<span><%= Spree.t('storefront.variant_picker.please_choose_all_options') %></span>
|
49
49
|
<% elsif variant_not_available %>
|
50
50
|
<span><%= Spree.t(:notify_me_when_available) %></span>
|
51
51
|
<%= render 'spree/shared/icons/bell' %>
|
@@ -6,6 +6,8 @@
|
|
6
6
|
<div class="wished-item-<%= variant.id %> h-full"
|
7
7
|
data-controller="wished-item"
|
8
8
|
data-wished-item-variant-id-value="<%= variant.id %>"
|
9
|
+
data-wished-item-create-wishlist-path-value="<%= spree.account_wishlist_wished_items_path %>"
|
10
|
+
data-wished-item-destroy-wishlist-path-value="<%= spree.account_wishlist_wished_item_path(variant.id) %>"
|
9
11
|
>
|
10
12
|
<%= button_tag type: 'submit',
|
11
13
|
class: "#{css_classes} disabled:animate-pulse",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
</div>
|
40
40
|
<% end %>
|
41
41
|
|
42
|
-
<%
|
42
|
+
<% product_properties(product).each do |product_property| %>
|
43
43
|
<div class="product-property py-4 border-b border-default">
|
44
44
|
|
45
45
|
<%= link_to "#property_#{product_property.id}", class: 'text-sm uppercase tracking-widest inline-flex w-full justify-between !border-b-transparent', data: { action: 'accordion#toggle' } do %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
"@context": "https://schema.org/",
|
5
5
|
"@type": "Product",
|
6
6
|
"name": <%= product.name.to_json.html_safe %>,
|
7
|
-
"url": <%= spree.product_url(product).to_json.html_safe %>,
|
7
|
+
"url": <%= spree.product_url(product, host: current_store.url_or_custom_domain).to_json.html_safe %>,
|
8
8
|
<% if product.featured_image %>
|
9
9
|
"image": [
|
10
10
|
<%= spree_image_url(product.featured_image, width: 630, height: 630).to_json.html_safe %>
|
@@ -6,5 +6,5 @@
|
|
6
6
|
"availability": "http://schema.org/<%= variant.available? ? 'InStock' : 'OutOfStock' %>",
|
7
7
|
"price": <%= variant.amount_in(current_currency).to_json.html_safe %>,
|
8
8
|
"priceCurrency": <%= current_currency.to_json.html_safe %>,
|
9
|
-
"url": <%= spree.product_url(product, variant_id: variant.id).to_json.html_safe %>
|
9
|
+
"url": <%= spree.product_url(product, variant_id: variant.id, host: current_store.url_or_custom_domain).to_json.html_safe %>
|
10
10
|
}
|
@@ -85,8 +85,7 @@
|
|
85
85
|
<div id='pinch-to-zoom' class='fixed top-0 left-0 p-4 bg-background z-50 flex justify-center items-center flex-col'>
|
86
86
|
<div class='w-14 h-14'><%= render 'spree/shared/icons/pinch' %></div>
|
87
87
|
<div class='text-sm uppercase pt-4 px-5 text-center !leading-tight'>
|
88
|
-
|
89
|
-
zoom
|
88
|
+
<%= Spree.t("storefront.products.pinch_to_zoom_html") %>
|
90
89
|
</div>
|
91
90
|
</div>
|
92
91
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
data-accordion-close-others-value="false">
|
5
5
|
<% availability_filter_opened = permitted_products_params.dig(:filter, :purchasable).present? || permitted_products_params.dig(:filter, :out_of_stock).present? %>
|
6
6
|
<%= link_to "#availability_filter", class: "cursor-pointer uppercase flex items-center justify-between h-10 px-4 lg:px-10 text-sm tracking-widest focus:outline-none transition duration-150 ease-in-out #{'st-accordion__icon--opened' if availability_filter_opened}", data: { action: 'accordion#toggle:prevent' } do %>
|
7
|
-
<%= Spree.t(:availability) %>
|
7
|
+
<%= Spree.t(:availability).capitalize %>
|
8
8
|
<%= render 'spree/shared/icons/chevron_down' %>
|
9
9
|
<% end %>
|
10
10
|
<div class='st-accordion__content' data-accordion-id='availability_filter'>
|
@@ -16,15 +16,15 @@
|
|
16
16
|
data-no-ui-slider-range-value="[<%= filter_price_range[:min].floor %>,<%= filter_price_range[:max].ceil %>]">
|
17
17
|
<div class="flex justify-between gap-6 px-4 lg:px-10 lg:text-sm">
|
18
18
|
<div class="relative w-1/2">
|
19
|
-
<%= f.number_field filter_price_range[:min].floor, class: "pl-16 without-arrows w-full peer focus:border-primary focus:ring-primary", inputmode: "numeric", name: "filter[min_price]", data: { no_ui_slider_target: "minInput" }, id: "price_from", value: params.dig(:filter, :min_price).present? ? min_price_value.to_i : nil, placeholder: filter_price_range[:min].floor %>
|
19
|
+
<%= f.number_field filter_price_range[:min].floor, class: "pl-16 text-right without-arrows w-full peer focus:border-primary focus:ring-primary", inputmode: "numeric", name: "filter[min_price]", data: { no_ui_slider_target: "minInput" }, id: "price_from", value: params.dig(:filter, :min_price).present? ? min_price_value.to_i : nil, placeholder: filter_price_range[:min].floor %>
|
20
20
|
<label class="absolute left-0 top-0 flex pl-3 items-center h-full text-input-text peer-placeholder-shown:opacity-50" for="price_from">
|
21
|
-
from <%= currency_symbol(current_currency) %>
|
21
|
+
<%= Spree.t(:from) %> <%= currency_symbol(current_currency) %>
|
22
22
|
</label>
|
23
23
|
</div>
|
24
24
|
<div class="relative w-1/2">
|
25
|
-
<%= f.number_field filter_price_range[:max].ceil, class: "pl-[2.75rem] without-arrows w-full peer focus:border-primary focus:ring-primary", placeholder: filter_price_range[:max].ceil, inputmode: "numeric", name: "filter[max_price]", data: { no_ui_slider_target: "maxInput" }, id: "price_to", value: params.dig(:filter, :max_price).present? ? max_price_value.to_i : nil %>
|
25
|
+
<%= f.number_field filter_price_range[:max].ceil, class: "pl-[2.75rem] text-right without-arrows w-full peer focus:border-primary focus:ring-primary", placeholder: filter_price_range[:max].ceil, inputmode: "numeric", name: "filter[max_price]", data: { no_ui_slider_target: "maxInput" }, id: "price_to", value: params.dig(:filter, :max_price).present? ? max_price_value.to_i : nil %>
|
26
26
|
<label class="absolute left-0 top-0 flex pl-3 items-center h-full text-input-text peer-placeholder-shown:opacity-50" for="price_to">
|
27
|
-
to <%= currency_symbol(current_currency) %>
|
27
|
+
<%= Spree.t(:to) %> <%= currency_symbol(current_currency) %>
|
28
28
|
</label>
|
29
29
|
</div>
|
30
30
|
</div>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
<% item_count ||= current_order&.item_count %>
|
2
|
+
|
3
|
+
<%= turbo_frame_tag "cart-icon-#{item_count}", target: '_top' do %>
|
2
4
|
<%= link_to spree.cart_path,
|
3
5
|
class: 'relative block w-6',
|
4
6
|
id: "cart-pane-link",
|
@@ -6,7 +8,7 @@
|
|
6
8
|
onclick: 'event.preventDefault()' do %>
|
7
9
|
<%= render 'spree/shared/icons/cart' %>
|
8
10
|
<span class='cart-counter w-full text-[8px] font-extrabold absolute top-[10px] text-center'>
|
9
|
-
<%=
|
11
|
+
<%= item_count if item_count&.positive? %>
|
10
12
|
</span>
|
11
13
|
<span class='sr-only'><%= Spree.t('storefront.cart.items_in_cart') %>, <%= Spree.t('storefront.cart.view_bag') %></span>
|
12
14
|
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% order ||= current_order %>
|
2
|
+
<% item_count ||= order&.item_count %>
|
3
|
+
|
1
4
|
<!-- begin sidebar/slideover -->
|
2
5
|
<div
|
3
6
|
id="cart-pane"
|
@@ -25,13 +28,13 @@
|
|
25
28
|
<span class='relative block w-6'>
|
26
29
|
<%= render 'spree/shared/icons/cart' %>
|
27
30
|
<span class='cart-counter w-full text-[8px] font-extrabold absolute top-[10px] text-center'>
|
28
|
-
<%=
|
31
|
+
<%= item_count if item_count&.positive? %>
|
29
32
|
</span>
|
30
33
|
<span class='sr-only'><%= Spree.t('storefront.cart.items_in_cart') %>, <%= Spree.t('storefront.cart.view_bag') %></span>
|
31
34
|
</span>
|
32
35
|
</div>
|
33
36
|
<div class='flex-1 h-0 overflow-y-auto'>
|
34
|
-
<%= turbo_frame_tag cart_id(
|
37
|
+
<%= turbo_frame_tag cart_id(order), class: 'cart-contents', src: spree.cart_path, data: { turbo_permanent: true } %>
|
35
38
|
</div>
|
36
39
|
</div>
|
37
40
|
</div>
|
@@ -32,9 +32,9 @@
|
|
32
32
|
<meta property="twitter:image" content="<%= image_url %>" />
|
33
33
|
<% end %>
|
34
34
|
|
35
|
-
<% if @product && @product.price_in(current_currency).present? %>
|
35
|
+
<% if @product.present? && @product.price_in(current_currency).present? %>
|
36
36
|
<meta property="og:price:amount" content="<%= @product.price_in(current_currency).amount.to_s %>">
|
37
|
-
<meta property="og:price:currency" content="<%=
|
37
|
+
<meta property="og:price:currency" content="<%= current_currency %>">
|
38
38
|
<% end %>
|
39
39
|
|
40
40
|
<% if current_store.twitter.present? %>
|
data/config/locales/en.yml
CHANGED
@@ -20,6 +20,7 @@ en:
|
|
20
20
|
checkout:
|
21
21
|
all_transactions_are_secure_and_encrypted: All transactions are secure and encrypted
|
22
22
|
already_have_an_account: Already have an account?
|
23
|
+
backorder_notice: 'Some products in your cart will be dispatched a bit later than the rest of your order:'
|
23
24
|
by_placing_this_order_you_agree_to: By placing this order you agree to
|
24
25
|
calculated_at_next_step: Calculated at next step
|
25
26
|
continue_to_cart: Continue to cart
|
@@ -30,11 +31,13 @@ en:
|
|
30
31
|
one: This item will be removed from your cart because there are no delivery methods available for your address.
|
31
32
|
other: These %{count} items will be removed from your cart because there are no delivery methods available for your address.
|
32
33
|
gift_card_amount_applied: Gift card %{code} applied %{amount} to your order.
|
34
|
+
it_seems_you_already_have_an_account_html: It seems you already have an account with us. Please %{link} to continue.
|
33
35
|
or_continue_below: or continue below
|
34
36
|
order_already_paid: You don't need to pay anything, just click Place now button to confirm the order.
|
35
37
|
order_success: Your order is confirmed!
|
36
38
|
order_success_message: When your order is ready, you will receive an email confirmation.
|
37
39
|
payment_processing_message: You will receive an email confirmation when your payment is processed.
|
40
|
+
return_to_cart: Return to cart
|
38
41
|
shipping_not_available: Shipping not available
|
39
42
|
signup_for_an_account: Create an account for faster future purchases, order tracking, and more.
|
40
43
|
store_credits_amount_applied: You applied a %{amount} store credit to your order.
|
@@ -50,6 +53,10 @@ en:
|
|
50
53
|
description: Take control of your settings and tailor your experience according to your preferences. Customize your notifications to suit your needs.
|
51
54
|
join: Email me about new products, sales, and more. You can unsubscribe at any time.
|
52
55
|
status: You are currently %{status} to the newsletters.
|
56
|
+
policies:
|
57
|
+
last_update_at: Last update %{date}
|
58
|
+
products:
|
59
|
+
pinch_to_zoom_html: Pinch to<br>zoom
|
53
60
|
refund_action_not_required_message:
|
54
61
|
order_canceled:
|
55
62
|
fully: This order has been canceled. No further action is required. You will receive a refund within couple business days.
|
@@ -66,6 +73,7 @@ en:
|
|
66
73
|
partially: This order has been partially refunded. The amount paid by the selected payment method will be refunded within couple business days. Please reach out to %{customer_support_email} to receive new voucher.
|
67
74
|
variant_picker:
|
68
75
|
please_choose: Please choose %{option_type}
|
76
|
+
please_choose_all_options: Please choose all options
|
69
77
|
wished_items:
|
70
78
|
add: Add to wishlist
|
71
79
|
no_wished_items:
|