spree_storefront 5.2.0.rc3 → 5.2.0
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/helpers/spree/products_helper.rb +0 -6
- data/app/helpers/spree/storefront_helper.rb +1 -1
- data/app/views/themes/default/spree/page_sections/_product_details.html.erb +2 -2
- data/app/views/themes/default/spree/products/_json_ld.html.erb +1 -1
- data/lib/generators/spree/storefront/install/templates/application.css +3 -0
- data/lib/generators/spree/storefront/theme/theme_generator.rb +1 -1
- data/lib/spree/storefront.rb +19 -0
- metadata +7 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a6270ae206485b1b4b740a138c1d8f5816271f4b3893ce8cb54780a3f31dbad
|
|
4
|
+
data.tar.gz: d31a885db917414c2f6125c3d10e82452ba01cd0011ab98c3b4d9a04b200a944
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 10643275f94b4126f6b3aa6e2a98b5a0c1038f047cbab50efdbcf7a06b3d9fe88f41d0ceffad83f3b0906bc57ef84041f296a4e19a162df41ceb6e6c478bb10e
|
|
7
|
+
data.tar.gz: 5e6ae3eb0b82032f0cd13fc8d5ceb3ed3272d2c013bee04c7436d94eb0695361ef31daf5f7a55ecab20827746b8c8ab0fd396feab791b9e5ef60eda9cd1ee834
|
|
@@ -26,12 +26,6 @@ module Spree
|
|
|
26
26
|
(Time.current - product.activated_at.in_time_zone(current_store.preferred_timezone)).seconds.in_weeks.to_i.abs
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def brand_name(product)
|
|
30
|
-
Spree::Deprecation.warn('brand_name is deprecated and will be removed in Spree 5.2. Please use `product.brand_name` instead.')
|
|
31
|
-
|
|
32
|
-
product.brand&.name || product.try(:vendor)&.display_name
|
|
33
|
-
end
|
|
34
|
-
|
|
35
29
|
def product_not_selected_options(product, selected_variant, options_param_name: :options)
|
|
36
30
|
product.option_types.map do |option_type|
|
|
37
31
|
if product_selected_option_for_option(
|
|
@@ -29,7 +29,7 @@ module Spree
|
|
|
29
29
|
# @param options [Hash] The options/variables to pass to the partials
|
|
30
30
|
# @return [String] The rendered partials
|
|
31
31
|
def render_storefront_partials(section, options = {})
|
|
32
|
-
|
|
32
|
+
Spree.storefront.partials.send(section.to_s.gsub('_partials', '').to_sym).map do |partial|
|
|
33
33
|
render partial, options
|
|
34
34
|
end.join.html_safe
|
|
35
35
|
end
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
<%= product.name %>
|
|
47
47
|
</h1>
|
|
48
48
|
<% when 'Spree::PageBlocks::Products::Brand' %>
|
|
49
|
-
<% if product.
|
|
50
|
-
<%= link_to spree.nested_taxons_path(product.
|
|
49
|
+
<% if product.brand_taxon %>
|
|
50
|
+
<%= link_to spree.nested_taxons_path(product.brand_taxon), title: product.brand_name do %>
|
|
51
51
|
<h3 class="text-sm lg:mt-0 inline-block mb-1">
|
|
52
52
|
<%= product.brand_name %>
|
|
53
53
|
</h3>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<% elsif selected_variant %>
|
|
19
19
|
<% if selected_variant.sku.present? %>"sku": <%= selected_variant.sku.to_json.html_safe %>,<% end %>
|
|
20
20
|
<% end %>
|
|
21
|
-
<% if product.
|
|
21
|
+
<% if product.brand_name %>
|
|
22
22
|
"brand": {
|
|
23
23
|
"@type": "Brand",
|
|
24
24
|
"name": <%= product.brand_name.to_json.html_safe %>
|
|
@@ -604,6 +604,7 @@ textarea.text-input {
|
|
|
604
604
|
.badge,
|
|
605
605
|
.badge-success,
|
|
606
606
|
.badge-paid,
|
|
607
|
+
.badge-balance_due,
|
|
607
608
|
.badge-warning,
|
|
608
609
|
.badge-canceled,
|
|
609
610
|
.badge-failed,
|
|
@@ -630,6 +631,7 @@ textarea.text-input {
|
|
|
630
631
|
.badge:last-child,
|
|
631
632
|
.badge-success:last-child,
|
|
632
633
|
.badge-paid:last-child,
|
|
634
|
+
.badge-balance_due:last-child,
|
|
633
635
|
.badge-warning:last-child,
|
|
634
636
|
.badge-canceled:last-child,
|
|
635
637
|
.badge-failed:last-child,
|
|
@@ -656,6 +658,7 @@ textarea.text-input {
|
|
|
656
658
|
}
|
|
657
659
|
|
|
658
660
|
.badge,
|
|
661
|
+
.badge-balance_due,
|
|
659
662
|
.badge-refunded,
|
|
660
663
|
.badge-pending,
|
|
661
664
|
.badge-void,
|
|
@@ -22,7 +22,7 @@ module Spree
|
|
|
22
22
|
directory "themes/default", "app/views/themes/#{file_name}"
|
|
23
23
|
|
|
24
24
|
append_to_file "config/initializers/spree.rb", after: "Rails.application.config.after_initialize do\n" do
|
|
25
|
-
"
|
|
25
|
+
" Spree.page_builder.themes << Spree::Themes::#{class_name}\n"
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
data/lib/spree/storefront.rb
CHANGED
|
@@ -12,3 +12,22 @@ require 'turbo-rails'
|
|
|
12
12
|
require 'inline_svg'
|
|
13
13
|
|
|
14
14
|
require 'spree/storefront/engine'
|
|
15
|
+
require 'spree/core/partials'
|
|
16
|
+
|
|
17
|
+
module Spree
|
|
18
|
+
def self.storefront
|
|
19
|
+
@storefront ||= StorefrontConfig.new
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class StorefrontConfig
|
|
23
|
+
def partials
|
|
24
|
+
@partials ||= Spree::Core::Partials.new(
|
|
25
|
+
Rails.application.config.spree_storefront,
|
|
26
|
+
Spree::Storefront::Engine::Environment
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
module Storefront
|
|
32
|
+
end
|
|
33
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_storefront
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.0
|
|
4
|
+
version: 5.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: spree_core
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 5.2.0
|
|
18
|
+
version: 5.2.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 5.2.0
|
|
25
|
+
version: 5.2.0
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: active_link_to
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -571,10 +570,9 @@ licenses:
|
|
|
571
570
|
- AGPL-3.0-or-later
|
|
572
571
|
metadata:
|
|
573
572
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
574
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.0
|
|
573
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.0
|
|
575
574
|
documentation_uri: https://docs.spreecommerce.org/
|
|
576
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.2.0
|
|
577
|
-
post_install_message:
|
|
575
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.2.0
|
|
578
576
|
rdoc_options: []
|
|
579
577
|
require_paths:
|
|
580
578
|
- lib
|
|
@@ -589,8 +587,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
589
587
|
- !ruby/object:Gem::Version
|
|
590
588
|
version: 1.8.23
|
|
591
589
|
requirements: []
|
|
592
|
-
rubygems_version: 3.
|
|
593
|
-
signing_key:
|
|
590
|
+
rubygems_version: 3.6.9
|
|
594
591
|
specification_version: 4
|
|
595
592
|
summary: Modern fully featured storefront and checkout for Spree Commerce
|
|
596
593
|
test_files: []
|