spree_frontend 4.2.0.rc5 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/frontend.js +10 -0
- data/app/assets/javascripts/spree/frontend/account.js +1 -1
- 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/coupon_manager.js +2 -2
- data/app/assets/javascripts/spree/frontend/currency.js +11 -0
- data/app/assets/javascripts/spree/frontend/locale.js +11 -0
- data/app/assets/stylesheets/spree/frontend/application.scss +0 -3
- data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
- data/app/controllers/concerns/spree/locale_urls.rb +23 -0
- data/app/controllers/spree/checkout_controller.rb +8 -8
- data/app/controllers/spree/currency_controller.rb +6 -10
- data/app/controllers/spree/locale_controller.rb +23 -6
- data/app/controllers/spree/orders_controller.rb +2 -2
- data/app/controllers/spree/store_controller.rb +8 -2
- data/app/helpers/spree/addresses_helper.rb +9 -2
- data/app/helpers/spree/frontend_helper.rb +6 -20
- data/app/helpers/spree/navigation_helper.rb +6 -1
- data/app/helpers/spree/store_helper.rb +39 -0
- data/app/helpers/spree/taxons_helper.rb +1 -1
- data/app/views/spree/checkout/_address.html.erb +2 -4
- data/app/views/spree/locale/index.html.erb +1 -0
- data/app/views/spree/orders/_line_item.html.erb +1 -1
- data/app/views/spree/products/_color_option_type.html.erb +1 -1
- data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_footer.html.erb +1 -1
- data/app/views/spree/shared/_head.html.erb +4 -0
- data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
- data/app/views/spree/shared/_line_item.html.erb +2 -2
- data/app/views/spree/shared/_link_to_account.html.erb +5 -5
- data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_login.html.erb +1 -1
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
- data/app/views/spree/shared/_mobile_navigation.html.erb +2 -5
- data/app/views/spree/shared/_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +2 -2
- data/app/views/spree/users/show.html.erb +1 -1
- data/config/routes.rb +26 -29
- data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
- data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
- data/lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb +1 -0
- data/lib/generators/spree/frontend/install/templates/config/spree_storefront.yml +99 -0
- metadata +22 -12
- data/app/views/spree/shared/_change_store.html.erb +0 -25
- data/app/views/spree/shared/_mobile_change_store.html.erb +0 -30
@@ -0,0 +1 @@
|
|
1
|
+
SpreeStorefrontConfig = YAML.load_file(Rails.root.join('config', 'spree_storefront.yml')).with_indifferent_access
|
@@ -0,0 +1,99 @@
|
|
1
|
+
default:
|
2
|
+
navigation:
|
3
|
+
- title: Women
|
4
|
+
subtitle: Categories
|
5
|
+
url: /t/women
|
6
|
+
items:
|
7
|
+
- :title: Skirts
|
8
|
+
:url: /t/women/skirts
|
9
|
+
- :title: Dresses
|
10
|
+
:url: /t/women/dresses
|
11
|
+
- :title: Shirts and Blouses
|
12
|
+
:url: /t/women/shirts-and-blouses
|
13
|
+
- :title: Sweaters
|
14
|
+
:url: /t/women/sweaters
|
15
|
+
- :title: Tops and T-shirts
|
16
|
+
:url: /t/women/tops-and-t-shirts
|
17
|
+
- :title: Jackets and Coats
|
18
|
+
:url: /t/women/jackets-and-coats
|
19
|
+
promo_banners:
|
20
|
+
- subtitle: New collection
|
21
|
+
title: Summer 2021
|
22
|
+
url: /t/new-collection/summer-2021
|
23
|
+
image: 'meganav/promo_banner_left-first-category.jpg'
|
24
|
+
- subtitle: Special Offers
|
25
|
+
title: Get up to 30% off
|
26
|
+
url: /t/special-offers/30-percent-off
|
27
|
+
image: 'meganav/promo_banner_right-first-category.jpg'
|
28
|
+
- title: Men
|
29
|
+
subtitle: Categories
|
30
|
+
url: /t/men
|
31
|
+
items:
|
32
|
+
- :title: Shirts
|
33
|
+
:url: /t/men/shirts
|
34
|
+
- :title: T-shirts
|
35
|
+
:url: /t/men/t-shirts
|
36
|
+
- :title: Sweaters
|
37
|
+
:url: /t/men/sweaters
|
38
|
+
- :title: Jackets and Coats
|
39
|
+
:url: /t/men/jackets-and-coats
|
40
|
+
promo_banners:
|
41
|
+
- subtitle: New collection
|
42
|
+
title: Summer 2021
|
43
|
+
url: /t/new-collection/summer-2021
|
44
|
+
image: 'meganav/promo_banner_left-second-category.jpg'
|
45
|
+
- subtitle: Special Offers
|
46
|
+
title: Get up to 30% off
|
47
|
+
url: /t/special-offers/30-percent-off
|
48
|
+
image: 'meganav/promo_banner_right-second-category.jpg'
|
49
|
+
- title: Sportswear
|
50
|
+
subtitle: Categories
|
51
|
+
url: /t/sportswear
|
52
|
+
items:
|
53
|
+
- :title: Tops
|
54
|
+
:url: /t/sportswear/tops
|
55
|
+
- :title: Sweatshirts
|
56
|
+
:url: /t/sportswear/sweatshirts
|
57
|
+
- :title: Pants
|
58
|
+
:url: /t/sportswear/pants
|
59
|
+
promo_banners:
|
60
|
+
- subtitle: New collection
|
61
|
+
title: Summer 2021
|
62
|
+
url: /t/new-collection/summer-2021
|
63
|
+
image: 'meganav/promo_banner_left-third-category.jpg'
|
64
|
+
- subtitle: Special Offers
|
65
|
+
title: Get up to 30% off
|
66
|
+
url: /t/special-offers/30-percent-off
|
67
|
+
image: 'meganav/promo_banner_right-third-category.jpg'
|
68
|
+
fr:
|
69
|
+
navigation:
|
70
|
+
- title: Femmes
|
71
|
+
url: /fr/t/women
|
72
|
+
promo_banners:
|
73
|
+
- subtitle: Nouvelle collection
|
74
|
+
title: Été 2021
|
75
|
+
url: /fr/t/new-collection/summer-2021
|
76
|
+
image: 'meganav/promo_banner_left-first-category.jpg'
|
77
|
+
- subtitle: Offres spéciales
|
78
|
+
url: /fr/t/special-offers/30-percent-off
|
79
|
+
image: 'meganav/promo_banner_right-first-category.jpg'
|
80
|
+
- title: Hommes
|
81
|
+
url: /fr/t/men
|
82
|
+
promo_banners:
|
83
|
+
- subtitle: Nouvelle collection
|
84
|
+
title: Été 2021
|
85
|
+
url: /fr/t/new-collection/summer-2021
|
86
|
+
image: 'meganav/promo_banner_left-second-category.jpg'
|
87
|
+
- subtitle: Offres spéciales
|
88
|
+
url: /fr/t/special-offers/30-percent-off
|
89
|
+
image: 'meganav/promo_banner_right-second-category.jpg'
|
90
|
+
- title: Vêtements de sport
|
91
|
+
url: /fr/t/sportswear
|
92
|
+
promo_banners:
|
93
|
+
- subtitle: Nouvelle collection
|
94
|
+
title: Été 2021
|
95
|
+
url: /fr/t/new-collection/summer-2021
|
96
|
+
image: 'meganav/promo_banner_left-third-category.jpg'
|
97
|
+
- subtitle: Offres spéciales
|
98
|
+
url: /fr/t/special-offers/30-percent-off
|
99
|
+
image: 'meganav/promo_banner_right-third-category.jpg'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.0
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-02-
|
12
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_api
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.2.0
|
20
|
+
version: 4.2.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 4.2.0
|
27
|
+
version: 4.2.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: spree_core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 4.2.0
|
34
|
+
version: 4.2.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 4.2.0
|
41
|
+
version: 4.2.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bootstrap
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -547,6 +547,8 @@ files:
|
|
547
547
|
- app/assets/javascripts/spree/frontend/components-bootstrap/.gitkeep
|
548
548
|
- app/assets/javascripts/spree/frontend/components-custom/.gitkeep
|
549
549
|
- app/assets/javascripts/spree/frontend/coupon_manager.js
|
550
|
+
- app/assets/javascripts/spree/frontend/currency.js
|
551
|
+
- app/assets/javascripts/spree/frontend/locale.js
|
550
552
|
- app/assets/javascripts/spree/frontend/login.js
|
551
553
|
- app/assets/javascripts/spree/frontend/main_nav_bar.js
|
552
554
|
- app/assets/javascripts/spree/frontend/multi_currency.js
|
@@ -637,6 +639,7 @@ files:
|
|
637
639
|
- app/assets/stylesheets/spree/frontend/views/spree/user_sessions/new.scss
|
638
640
|
- app/assets/stylesheets/spree/frontend/views/spree/users/show.scss
|
639
641
|
- app/controllers/concerns/spree/checkout/address_book.rb
|
642
|
+
- app/controllers/concerns/spree/locale_urls.rb
|
640
643
|
- app/controllers/spree/addresses_controller.rb
|
641
644
|
- app/controllers/spree/checkout_controller.rb
|
642
645
|
- app/controllers/spree/content_controller.rb
|
@@ -652,6 +655,7 @@ files:
|
|
652
655
|
- app/helpers/spree/frontend_helper.rb
|
653
656
|
- app/helpers/spree/navigation_helper.rb
|
654
657
|
- app/helpers/spree/orders_helper.rb
|
658
|
+
- app/helpers/spree/store_helper.rb
|
655
659
|
- app/helpers/spree/structured_data_helper.rb
|
656
660
|
- app/helpers/spree/taxons_helper.rb
|
657
661
|
- app/models/spree/frontend_configuration.rb
|
@@ -686,6 +690,7 @@ files:
|
|
686
690
|
- app/views/spree/home/index.html.erb
|
687
691
|
- app/views/spree/layouts/checkout.html.erb
|
688
692
|
- app/views/spree/layouts/spree_application.html.erb
|
693
|
+
- app/views/spree/locale/index.html.erb
|
689
694
|
- app/views/spree/orders/_adjustment_row.html.erb
|
690
695
|
- app/views/spree/orders/_adjustments.html.erb
|
691
696
|
- app/views/spree/orders/_coupon_code.html.erb
|
@@ -720,22 +725,24 @@ files:
|
|
720
725
|
- app/views/spree/shared/_breadcrumbs.html.erb
|
721
726
|
- app/views/spree/shared/_carousel_4_products.html.erb
|
722
727
|
- app/views/spree/shared/_cart.html.erb
|
723
|
-
- app/views/spree/shared/_change_store.html.erb
|
724
728
|
- app/views/spree/shared/_checkout_header.html.erb
|
725
729
|
- app/views/spree/shared/_color_select.html.erb
|
726
730
|
- app/views/spree/shared/_copyright.html.erb
|
731
|
+
- app/views/spree/shared/_currency_dropdown.html.erb
|
727
732
|
- app/views/spree/shared/_delete_address_popup.html.erb
|
728
733
|
- app/views/spree/shared/_error_messages.html.erb
|
729
734
|
- app/views/spree/shared/_flashes.html.erb
|
730
735
|
- app/views/spree/shared/_footer.html.erb
|
731
736
|
- app/views/spree/shared/_head.html.erb
|
732
737
|
- app/views/spree/shared/_header.html.erb
|
738
|
+
- app/views/spree/shared/_internationalization_options.html.erb
|
733
739
|
- app/views/spree/shared/_line_item.html.erb
|
734
740
|
- app/views/spree/shared/_link_to_account.html.erb
|
735
741
|
- app/views/spree/shared/_link_to_cart.html.erb
|
742
|
+
- app/views/spree/shared/_locale_dropdown.html.erb
|
736
743
|
- app/views/spree/shared/_login.html.erb
|
737
744
|
- app/views/spree/shared/_main_nav_bar.html.erb
|
738
|
-
- app/views/spree/shared/
|
745
|
+
- app/views/spree/shared/_mobile_internationalization_options.html.erb
|
739
746
|
- app/views/spree/shared/_mobile_navigation.html.erb
|
740
747
|
- app/views/spree/shared/_nav_bar.html.erb
|
741
748
|
- app/views/spree/shared/_no_product_available.html.erb
|
@@ -768,6 +775,9 @@ files:
|
|
768
775
|
- config/initializers/canonical_rails.rb
|
769
776
|
- config/routes.rb
|
770
777
|
- lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb
|
778
|
+
- lib/generators/spree/frontend/install/install_generator.rb
|
779
|
+
- lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb
|
780
|
+
- lib/generators/spree/frontend/install/templates/config/spree_storefront.yml
|
771
781
|
- lib/spree/frontend.rb
|
772
782
|
- lib/spree/frontend/engine.rb
|
773
783
|
- lib/spree/frontend/middleware/seo_assist.rb
|
@@ -782,9 +792,9 @@ licenses:
|
|
782
792
|
- BSD-3-Clause
|
783
793
|
metadata:
|
784
794
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
785
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0
|
795
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0
|
786
796
|
documentation_uri: https://guides.spreecommerce.org/
|
787
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.2.0
|
797
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.2.0
|
788
798
|
post_install_message:
|
789
799
|
rdoc_options: []
|
790
800
|
require_paths:
|
@@ -796,9 +806,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
796
806
|
version: 2.5.0
|
797
807
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
798
808
|
requirements:
|
799
|
-
- - "
|
809
|
+
- - ">="
|
800
810
|
- !ruby/object:Gem::Version
|
801
|
-
version:
|
811
|
+
version: '0'
|
802
812
|
requirements:
|
803
813
|
- none
|
804
814
|
rubygems_version: 3.1.4
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<% if Spree::Config.show_store_selector && stores.size > 1 %>
|
2
|
-
<li class="d-none d-xl-block change-store">
|
3
|
-
<div class="dropdown navbar-right-dropdown">
|
4
|
-
<button id="stores-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t('nav_bar.change_country') %>">
|
5
|
-
<%= icon(name: 'global',
|
6
|
-
classes: 'd-none d-xl-inline-block',
|
7
|
-
width: 41,
|
8
|
-
height: 36) %>
|
9
|
-
<%= icon(name: 'arrow-down',
|
10
|
-
classes: 'd-inline-block d-xl-none',
|
11
|
-
width: 15,
|
12
|
-
height: 15) %>
|
13
|
-
</button>
|
14
|
-
|
15
|
-
<div id="stores_list" class="dropdown-menu dropdown-menu-right text-right">
|
16
|
-
<% stores.each do |store| %>
|
17
|
-
<div class="pl-3 d-flex justify-content-between align-items-center <%= 'active' if store.id == current_store.id %>">
|
18
|
-
<span class="flag-icon flag-icon-<%= store_country_iso(store) %>"></span>
|
19
|
-
<%= link_to "#{store.name} (#{store_currency_symbol(store)})", store.formatted_url, class: 'dropdown-item text-uppercase' %>
|
20
|
-
</div>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
</li>
|
25
|
-
<% end %>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<% if stores.size > 1 %>
|
2
|
-
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
3
|
-
<span class="w-75"><%= Spree.t('nav_bar.change_country') %></span>
|
4
|
-
<a class="w-25 text-right mobile-navigation-category-link" data-category="countries" href="#" aria-label="<%= Spree.t('nav_bar.change_country') %>">
|
5
|
-
<%= icon(name: 'arrow-right',
|
6
|
-
classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-right',
|
7
|
-
width: 16,
|
8
|
-
height: 16) %>
|
9
|
-
<%= icon(name: 'arrow-right',
|
10
|
-
classes: 'd-none d-sm-inline spree-icon-arrow spree-icon-arrow-right',
|
11
|
-
width: 14,
|
12
|
-
height: 27) %>
|
13
|
-
</a>
|
14
|
-
|
15
|
-
<ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="countries">
|
16
|
-
<li class="text-center font-weight-bold mobile-navigation-sublist-header">
|
17
|
-
<%= Spree.t('nav_bar.change_country') %>
|
18
|
-
</li>
|
19
|
-
<% stores.each do |store| %>
|
20
|
-
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
21
|
-
<span class="flag-icon flag-icon-<%= store_country_iso(store) %>"></span>
|
22
|
-
<%= link_to "//#{store.url}", class: 'dropdown-item text-uppercase d-flex' do %>
|
23
|
-
<span><%= store.default_country&.name %></span>
|
24
|
-
<span class="text-right w-100"><%= store_currency_symbol(store) %></span>
|
25
|
-
<% end %>
|
26
|
-
</li>
|
27
|
-
<% end %>
|
28
|
-
</ul>
|
29
|
-
</li>
|
30
|
-
<% end %>
|