spree_frontend 4.2.0.rc3 → 4.2.2
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 +38 -5
- 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/checkout/shipment.js +15 -2
- data/app/assets/javascripts/spree/frontend/coupon_manager.js +1 -1
- data/app/assets/javascripts/spree/frontend/currency.js +43 -0
- data/app/assets/javascripts/spree/frontend/locale.js +13 -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/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -22
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
- data/app/controllers/concerns/spree/locale_urls.rb +21 -0
- data/app/controllers/spree/checkout_controller.rb +8 -8
- data/app/controllers/spree/currency_controller.rb +9 -9
- data/app/controllers/spree/home_controller.rb +5 -1
- data/app/controllers/spree/locale_controller.rb +23 -6
- data/app/controllers/spree/orders_controller.rb +2 -2
- data/app/controllers/spree/products_controller.rb +6 -5
- data/app/controllers/spree/store_controller.rb +11 -15
- data/app/controllers/spree/taxons_controller.rb +3 -2
- data/app/helpers/spree/addresses_helper.rb +9 -2
- data/app/helpers/spree/cache_helper.rb +7 -0
- data/app/helpers/spree/frontend_helper.rb +15 -23
- 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/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/edit.html.erb +2 -2
- data/app/views/spree/addresses/new.html.erb +2 -2
- data/app/views/spree/checkout/_address.html.erb +4 -6
- 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/_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/locale/index.html.erb +1 -0
- data/app/views/spree/orders/_coupon_code.html.erb +2 -3
- data/app/views/spree/orders/_line_item.html.erb +2 -2
- data/app/views/spree/orders/_line_item_data.html.erb +1 -1
- 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 +2 -3
- data/app/views/spree/products/_color_option_type.html.erb +2 -3
- 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 -2
- data/app/views/spree/shared/_carousel_4_products.html.erb +6 -12
- data/app/views/spree/shared/_color_select.html.erb +3 -3
- data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
- 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 +2 -2
- data/app/views/spree/shared/_head.html.erb +2 -1
- data/app/views/spree/shared/_header.html.erb +1 -1
- 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_and_currency.html.erb +6 -0
- 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/_main_nav_bar.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 +3 -6
- 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/_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 +3 -3
- 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_controls.html.erb +1 -2
- data/app/views/spree/users/show.html.erb +4 -4
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +26 -30
- 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
- data/spree_frontend.gemspec +1 -1
- metadata +26 -16
- data/app/views/spree/shared/_change_store.html.erb +0 -25
- data/app/views/spree/shared/_mobile_change_store.html.erb +0 -30
- data/app/views/spree/shared/forbidden.html.erb +0 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= Spree.t(:ending_in) %> <%= source.last_digits %>
|
7
7
|
<% end %>
|
8
8
|
</span>
|
9
|
-
<br
|
9
|
+
<br>
|
10
10
|
<span class="full-name"><%= source.name %></span>
|
11
11
|
<% else %>
|
12
12
|
<%= content_tag(:span, payment.payment_method.name) %>
|
@@ -14,4 +14,4 @@
|
|
14
14
|
|
15
15
|
<span class="payment-amount">(<%= payment.display_amount %>)</span>
|
16
16
|
|
17
|
-
<br
|
17
|
+
<br>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="modal product-added-modal" tabindex="-1" role="dialog" aria-hidden="true">
|
2
|
-
<div class="modal-dialog modal-lg" role="document"
|
2
|
+
<div class="modal-dialog modal-lg" role="document">
|
3
3
|
<div class="modal-content">
|
4
4
|
<div class="modal-header pb-0 px-4 pt-4 border-0">
|
5
5
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
@@ -34,7 +34,7 @@
|
|
34
34
|
</div>
|
35
35
|
<div class="row pt-5 justify-content-center align-items-center product-added-modal-product">
|
36
36
|
<div class="col-4 col-sm-2 product-added-modal-product-image-container">
|
37
|
-
<img class="product-added-modal-product-image-container-image" src="data:," alt="<%= @product
|
37
|
+
<img class="product-added-modal-product-image-container-image" src="data:," alt="<%= @product&.name %>">
|
38
38
|
</div>
|
39
39
|
<div class="col-8 col-sm-6 col-lg-4 py-1 product-added-modal-product-details">
|
40
40
|
<div class="product-added-modal-product-details-name"></div>
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<div class="row pb-4 justify-content-center">
|
49
49
|
<div class="col-12 col-lg-8">
|
50
50
|
<%= link_to spree.checkout_path, class: 'btn btn-primary w-100 font-weight-bold text-uppercase product-added-modal-button', method: :get do %>
|
51
|
-
<%= Spree.t(
|
51
|
+
<%= Spree.t(:checkout) %>
|
52
52
|
<% end %>
|
53
53
|
</div>
|
54
54
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<script>
|
2
2
|
window.addEventListener('turbolinks:load', function() {
|
3
3
|
Spree.translations = <%==
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
{
|
5
|
+
coupon_code_applied: Spree.t(:coupon_code_applied),
|
6
|
+
coupon_code_removed: Spree.t(:coupon_code_removed),
|
7
|
+
coupon_code_error_icon: image_path('error.svg')
|
8
|
+
}.to_json
|
9
|
+
%>
|
10
10
|
});
|
11
11
|
</script>
|
@@ -4,15 +4,13 @@
|
|
4
4
|
data-product-carousel-group-identifier="<%= group_id %>"
|
5
5
|
data-variant-change-trigger-identifier="<%= trigger_id %>"
|
6
6
|
data-interval="false"
|
7
|
-
data-hook
|
8
|
-
>
|
7
|
+
data-hook>
|
9
8
|
<% if images.length > 1 %>
|
10
9
|
<a
|
11
10
|
class="d-none d-md-flex h-100 justify-content-center align-items-center product-carousel-control position-absolute product-carousel-control--previous"
|
12
11
|
href="#<%= id %>"
|
13
12
|
role="button"
|
14
|
-
data-slide="prev"
|
15
|
-
>
|
13
|
+
data-slide="prev">
|
16
14
|
<span class="d-flex justify-content-center align-items-center product-carousel-control-rounded" aria-hidden="true">
|
17
15
|
<%= icon(name: 'arrow-right',
|
18
16
|
classes: 'spree-icon-arrow spree-icon-arrow-left',
|
@@ -26,8 +24,7 @@
|
|
26
24
|
class="d-none d-md-flex h-100 justify-content-center align-items-center product-carousel-control position-absolute product-carousel-control--next"
|
27
25
|
href="#<%= id %>"
|
28
26
|
role="button"
|
29
|
-
data-slide="next"
|
30
|
-
>
|
27
|
+
data-slide="next">
|
31
28
|
<span class="d-flex justify-content-center align-items-center product-carousel-control-rounded" aria-hidden="true">
|
32
29
|
<%= icon(name: 'arrow-right',
|
33
30
|
classes: 'spree-icon-arrow spree-icon-arrow-right',
|
@@ -47,8 +44,7 @@
|
|
47
44
|
<div
|
48
45
|
class="carousel-item product-carousel-item<%= ' active' if imageIndex == 0 %>"
|
49
46
|
data-variant-is-master="<%= image.viewable_id == @product.master_id %>"
|
50
|
-
data-variant-id="<%= image.viewable_id %>"
|
51
|
-
>
|
47
|
+
data-variant-id="<%= image.viewable_id %>">
|
52
48
|
<div class="product-carousel-item-squared <%= 'product-carousel-item-squared-only' if images.length == 1 %>">
|
53
49
|
<% image_attrs = {
|
54
50
|
src: main_app.url_for(image.url(zoomed ? :zoomed : :large)),
|
@@ -57,7 +53,7 @@
|
|
57
53
|
width: zoomed ? 650 : 475,
|
58
54
|
height: zoomed ? 870 : 594
|
59
55
|
} %>
|
60
|
-
<%= imageIndex.zero? ? image_tag(image_attrs.delete(:src), image_attrs) : lazy_image(image_attrs) %>
|
56
|
+
<%= imageIndex.zero? ? image_tag(image_attrs.delete(:src), image_attrs) : lazy_image(**image_attrs) %>
|
61
57
|
</div>
|
62
58
|
</div>
|
63
59
|
<% end %>
|
@@ -68,8 +64,7 @@
|
|
68
64
|
<li
|
69
65
|
data-target="#<%= id %>"
|
70
66
|
data-slide-to="<%= imageIndex %>"
|
71
|
-
class="product-carousel-indicators-indicator product-carousel-indicators-indicator--visible<%= ' active' if imageIndex == 0 %>"
|
72
|
-
>
|
67
|
+
class="product-carousel-indicators-indicator product-carousel-indicators-indicator--visible<%= ' active' if imageIndex == 0 %>">
|
73
68
|
<%= lazy_image(
|
74
69
|
src: main_app.url_for(image.url(:pdp_thumbnail)),
|
75
70
|
class: 'd-block w-100',
|
@@ -6,8 +6,7 @@
|
|
6
6
|
data-product-carousel-per-page="<%= per_page %>"
|
7
7
|
data-product-carousel-is-slave="true"
|
8
8
|
data-interval="false"
|
9
|
-
data-hook
|
10
|
-
>
|
9
|
+
data-hook>
|
11
10
|
<div class="carousel-inner order-1 h-100">
|
12
11
|
<% images.each_with_index do |image, image_index| %>
|
13
12
|
<% if image_index % per_page == 0 %>
|
@@ -19,16 +18,13 @@
|
|
19
18
|
class="product-thumbnails-carousel-item-single product-thumbnails-carousel-item-single--visible"
|
20
19
|
data-product-carousel-to-slide="<%= image_index %>"
|
21
20
|
data-variant-is-master="<%= image.viewable_id == @product.master_id %>"
|
22
|
-
data-variant-id="<%= image.viewable_id %>"
|
23
|
-
>
|
21
|
+
data-variant-id="<%= image.viewable_id %>">
|
24
22
|
<%= lazy_image(
|
25
23
|
src: main_app.url_for(image.url(:pdp_thumbnail)),
|
26
24
|
class: 'd-block w-100',
|
27
25
|
alt: image.alt || @product.name,
|
28
26
|
width: 57,
|
29
|
-
height: 70
|
30
|
-
)
|
31
|
-
%>
|
27
|
+
height: 70) %>
|
32
28
|
</div>
|
33
29
|
<% if (image_index + 1) % per_page == 0 || (image_index + 1) == images.length %>
|
34
30
|
</div>
|
@@ -42,8 +38,7 @@
|
|
42
38
|
class="d-none d-sm-flex order-0 justify-content-center w-100 product-thumbnails-carousel-previous"
|
43
39
|
href="#<%= id %>"
|
44
40
|
role="button"
|
45
|
-
data-slide="prev"
|
46
|
-
>
|
41
|
+
data-slide="prev">
|
47
42
|
<span aria-hidden="true">
|
48
43
|
<%= icon(name: 'arrow-right',
|
49
44
|
classes: 'spree-icon-arrow spree-icon-arrow-up',
|
@@ -56,8 +51,7 @@
|
|
56
51
|
class="d-none d-sm-flex order-2 justify-content-center w-100 product-thumbnails-carousel-next"
|
57
52
|
href="#<%= id %>"
|
58
53
|
role="button"
|
59
|
-
data-slide="next"
|
60
|
-
>
|
54
|
+
data-slide="next">
|
61
55
|
<span aria-hidden="true">
|
62
56
|
<%= icon(name: 'arrow-right',
|
63
57
|
classes: 'spree-icon-arrow spree-icon-arrow-down',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="container account-page">
|
2
|
-
<h3 class="text-uppercase spree-mb-large spree-mt-large spree-header"
|
2
|
+
<h3 class="text-uppercase spree-mb-large spree-mt-large spree-header"><%= accurate_title %></h3>
|
3
3
|
|
4
4
|
<div class="row">
|
5
5
|
<div class="col-xs-12 col-lg-4">
|
@@ -41,7 +41,7 @@
|
|
41
41
|
</div>
|
42
42
|
|
43
43
|
<div data-hook="account_my_orders" class="account-page-orders" id="account-my-orders">
|
44
|
-
<h3 class="text-uppercase spree-mb-medium spree-mt-medium spree-header"
|
44
|
+
<h3 class="text-uppercase spree-mb-medium spree-mt-medium spree-header"><%= Spree.t(:my_orders) %></h3>
|
45
45
|
<% if @orders.present? %>
|
46
46
|
<table>
|
47
47
|
<thead class="active">
|
@@ -57,7 +57,7 @@
|
|
57
57
|
<tbody>
|
58
58
|
<% @orders.each do |order| %>
|
59
59
|
<tr>
|
60
|
-
<td class="account-page-order-number"><%= link_to order.number,
|
60
|
+
<td class="account-page-order-number"><%= link_to order.number, spree.order_path(order), class: "text-primary" %></td>
|
61
61
|
<td class="account-page-order-date"><%= l order.completed_at.to_date %></td>
|
62
62
|
<td class="account-page-order-status"><%= Spree.t("order_state.#{order.state}").titleize %></td>
|
63
63
|
<td class="account-page-order-payment-state"><%= Spree.t("payment_states.#{order.payment_state}").titleize if order.payment_state %></td>
|
@@ -73,7 +73,7 @@
|
|
73
73
|
<% else %>
|
74
74
|
<p class="text-center"><%= Spree.t(:you_have_no_orders_yet) %></p>
|
75
75
|
<% end %>
|
76
|
-
<br
|
76
|
+
<br>
|
77
77
|
</div>
|
78
78
|
<div id="delete-address-popup" class="delete-address-popup-dropdown hide-on-esc">
|
79
79
|
<%= render 'spree/shared/delete_address_popup' %>
|
@@ -10,5 +10,5 @@ CanonicalRails.setup do |config|
|
|
10
10
|
# Parameter spamming can cause index dilution by creating seemingly different URLs with identical or near-identical content.
|
11
11
|
# Unless whitelisted, these parameters will be omitted
|
12
12
|
|
13
|
-
config.allowed_parameters = [:keywords, :
|
13
|
+
config.allowed_parameters = [:keywords, :search, :taxon]
|
14
14
|
end
|
data/config/routes.rb
CHANGED
@@ -1,40 +1,36 @@
|
|
1
1
|
Spree::Core::Engine.add_routes do
|
2
|
-
|
2
|
+
scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
|
3
|
+
root to: 'home#index'
|
3
4
|
|
4
|
-
|
5
|
+
resources :products, only: [:index, :show]
|
6
|
+
get '/products/:id/related', to: 'products#related'
|
7
|
+
# route globbing for pretty nested taxon and product paths
|
8
|
+
get '/t/*id', to: 'taxons#show', as: :nested_taxons
|
9
|
+
get '/product_carousel/:id', to: 'taxons#product_carousel'
|
5
10
|
|
6
|
-
|
11
|
+
# non-restful checkout stuff
|
12
|
+
patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
|
13
|
+
get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
|
14
|
+
get '/checkout', to: 'checkout#edit', as: :checkout
|
7
15
|
|
8
|
-
|
9
|
-
patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
|
10
|
-
get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
|
11
|
-
get '/checkout', to: 'checkout#edit', as: :checkout
|
16
|
+
resources :orders, except: [:index, :new, :create, :destroy]
|
12
17
|
|
13
|
-
|
18
|
+
resources :addresses, except: [:show]
|
14
19
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
resources :addresses, except: [:show]
|
20
|
-
|
21
|
-
get '/cart', to: 'orders#edit', as: :cart
|
22
|
-
patch '/cart', to: 'orders#update', as: :update_cart
|
23
|
-
put '/cart/empty', to: 'orders#empty', as: :empty_cart
|
20
|
+
get '/cart', to: 'orders#edit', as: :cart
|
21
|
+
patch '/cart', to: 'orders#update', as: :update_cart
|
22
|
+
put '/cart/empty', to: 'orders#empty', as: :empty_cart
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
get '/content/cvv', to: 'content#cvv', as: :cvv
|
25
|
+
get '/content/test', to: 'content#test'
|
26
|
+
get '/cart_link', to: 'store#cart_link', as: :cart_link
|
27
|
+
get '/account_link', to: 'store#account_link', as: :account_link
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
get '/cart_link', to: 'store#cart_link', as: :cart_link
|
33
|
-
get '/account_link', to: 'store#account_link', as: :account_link
|
29
|
+
get '/locales', to: 'locale#index', as: :locales
|
30
|
+
get '/locale/set', to: 'locale#set', as: :set_locale
|
31
|
+
get '/currency/set', to: 'currency#set', as: :set_currency
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
get '/currency/set', to: 'currency#set', defaults: { format: :json }, as: :set_currency
|
33
|
+
get '/api_tokens', to: 'store#api_tokens'
|
34
|
+
post '/ensure_cart', to: 'store#ensure_cart'
|
35
|
+
end
|
40
36
|
end
|
@@ -1,24 +1,18 @@
|
|
1
1
|
module Spree
|
2
2
|
module Frontend
|
3
3
|
class CopyStorefrontGenerator < Rails::Generators::Base
|
4
|
-
desc 'Copies storefront from spree frontend to your application'
|
4
|
+
desc 'Copies all storefront views and stylesheets from spree frontend to your application'
|
5
5
|
|
6
6
|
def self.source_paths
|
7
7
|
[
|
8
8
|
File.expand_path('../../../../../app', __dir__),
|
9
|
-
File.expand_path('../../../../../app/assets/images', __dir__),
|
10
9
|
File.expand_path('../../../../../app/assets/stylesheets/spree/frontend', __dir__),
|
11
|
-
File.expand_path('../../../../../app/assets/stylesheets/spree/frontend/variables', __dir__)
|
12
10
|
]
|
13
11
|
end
|
14
12
|
|
15
13
|
def copy_storefront
|
16
14
|
directory 'views', './app/views'
|
17
|
-
directory 'noimage', './app/assets/images/noimage'
|
18
|
-
directory 'homepage', './app/assets/images/homepage'
|
19
|
-
directory 'meganav', './app/assets/images/meganav'
|
20
15
|
template 'application.scss', './app/assets/stylesheets/spree/frontend/application.scss'
|
21
|
-
template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
|
22
16
|
end
|
23
17
|
end
|
24
18
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Spree
|
2
|
+
module Frontend
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
desc 'Copies storefront configuration files for easy customization'
|
6
|
+
|
7
|
+
def self.source_paths
|
8
|
+
[
|
9
|
+
File.expand_path('templates', __dir__),
|
10
|
+
File.expand_path('../templates', "../#{__FILE__}"),
|
11
|
+
File.expand_path('../templates', "../../#{__FILE__}"),
|
12
|
+
File.expand_path('../../../../../app/views/spree', __dir__),
|
13
|
+
File.expand_path('../../../../../app/assets/images', __dir__),
|
14
|
+
File.expand_path('../../../../../app/assets/stylesheets/spree/frontend/variables', __dir__)
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
def install
|
19
|
+
# main navigation configuration
|
20
|
+
template 'config/initializers/spree_storefront.rb', 'config/initializers/spree_storefront.rb'
|
21
|
+
template 'config/spree_storefront.yml', 'config/spree_storefront.yml'
|
22
|
+
# static images
|
23
|
+
directory 'noimage', './app/assets/images/noimage'
|
24
|
+
directory 'homepage', './app/assets/images/homepage'
|
25
|
+
directory 'meganav', './app/assets/images/meganav'
|
26
|
+
# SCSS theming
|
27
|
+
template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
|
28
|
+
# home page template
|
29
|
+
directory 'home', './app/views/spree/home'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -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'
|