spree_frontend 4.1.0 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +120 -0
- data/.codeclimate.yml +36 -0
- data/.deepsource.toml +19 -0
- data/.editorconfig +22 -0
- data/.eslintignore +7 -0
- data/.eslintrc +36 -0
- data/.gem_release.yml +7 -0
- data/.github/CONTRIBUTING.md +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/ISSUE_TEMPLATE.md +39 -0
- data/.github/dependabot.yml +32 -0
- data/.gitignore +58 -0
- data/.rubocop.yml +197 -0
- data/.solargraph.yml +20 -0
- data/.stylelintignore +4 -0
- data/.stylelintrc +6 -0
- data/CODE_OF_CONDUCT.md +22 -0
- data/Gemfile +57 -3
- data/LICENSE +1 -1
- data/README.md +89 -0
- data/Rakefile +1 -1
- data/SECURITY.md +1 -0
- data/app/assets/config/spree_frontend_manifest.js +5 -0
- data/app/assets/images/arrow-down.svg +12 -0
- data/app/assets/images/arrow-right-circle-fill.svg +3 -0
- data/app/assets/images/card-image.svg +4 -0
- data/app/assets/images/edit.svg +1 -1
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/file-image.svg +4 -0
- data/app/assets/images/global.svg +1 -0
- data/app/assets/images/image.svg +4 -0
- data/app/assets/images/info.svg +7 -0
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/logo-spree.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo.svg +10 -1
- data/app/assets/images/logo@2x.png +0 -0
- data/app/assets/images/logo@3x.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/plp.png +0 -0
- data/app/assets/images/noimage/plp.svg +16 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/images/pagination-arrow-right.svg +3 -10
- data/app/assets/images/pagination-double-arrow-right.svg +6 -13
- data/app/assets/images/plus.svg +1 -1
- data/app/assets/images/search.svg +1 -1
- data/app/assets/javascripts/spree/frontend/account.js +1 -1
- data/app/assets/javascripts/spree/frontend/api/main.js +36 -0
- data/app/assets/javascripts/spree/frontend/api/storefront/cart.js +49 -0
- data/app/assets/javascripts/spree/frontend/cart.js +24 -2
- data/app/assets/javascripts/spree/frontend/checkout/address.js +78 -52
- data/app/assets/javascripts/spree/frontend/checkout/address_book.js +38 -40
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +63 -23
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
- data/app/assets/javascripts/spree/frontend/checkout.js +17 -1
- data/app/assets/javascripts/spree/frontend/coupon_manager.js +1 -1
- data/app/assets/javascripts/spree/frontend/currency.js +44 -0
- data/app/assets/javascripts/spree/frontend/locale.es6 +12 -0
- data/app/assets/javascripts/spree/frontend/login.js +5 -0
- data/app/assets/javascripts/spree/frontend/main.js +78 -0
- data/app/assets/javascripts/spree/frontend/main_nav_bar.js +86 -0
- data/app/assets/javascripts/spree/frontend/{turbolinks_scroll_fix.js → turbo_scroll_fix.js} +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +4 -4
- data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +67 -18
- data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +76 -15
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +46 -0
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +9 -10
- data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +7 -0
- data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +93 -0
- data/app/assets/javascripts/spree/frontend.js +68 -11
- data/app/assets/stylesheets/spree/frontend/application.scss +5 -2
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +80 -1
- data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-base.scss +23 -0
- data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-list.scss +265 -0
- data/app/assets/stylesheets/spree/frontend/flags/_variables.scss +2 -0
- data/app/assets/stylesheets/spree/frontend/flags/flag-icon.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +48 -0
- data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
- 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 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/delivery.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +24 -10
- data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/_index.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/product_buy_bar.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/home/index.scss +54 -67
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +4 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +55 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +10 -9
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +9 -4
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss +3 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/change_store.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +42 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +34 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +24 -7
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +9 -12
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/search_form.scss +12 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +7 -13
- data/app/assets/stylesheets/spree/frontend.css +0 -1
- data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
- data/app/controllers/concerns/spree/locale_urls.rb +21 -0
- data/app/controllers/spree/addresses_controller.rb +16 -33
- data/app/controllers/spree/checkout_controller.rb +15 -13
- data/app/controllers/spree/cms_pages_controller.rb +29 -0
- data/app/controllers/spree/content_controller.rb +0 -2
- data/app/controllers/spree/currency_controller.rb +17 -0
- data/app/controllers/spree/errors_controller.rb +11 -0
- data/app/controllers/spree/home_controller.rb +38 -1
- data/app/controllers/spree/locale_controller.rb +35 -6
- data/app/controllers/spree/orders_controller.rb +12 -10
- data/app/controllers/spree/products_controller.rb +46 -28
- data/app/controllers/spree/store_controller.rb +77 -12
- data/app/controllers/spree/taxons_controller.rb +16 -8
- data/app/helpers/spree/addresses_helper.rb +64 -12
- data/app/helpers/spree/cache_helper.rb +7 -0
- data/app/helpers/spree/cms_pages_helper.rb +23 -0
- data/app/helpers/spree/frontend_helper.rb +170 -18
- data/app/helpers/spree/navigation_helper.rb +81 -4
- data/app/helpers/spree/products_filters_helper.rb +168 -0
- data/app/helpers/spree/store_helper.rb +41 -0
- data/app/helpers/spree/structured_data_helper.rb +6 -2
- data/app/helpers/spree/taxons_helper.rb +2 -2
- data/app/services/spree/build_localized_redirect_url.rb +141 -0
- data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +3 -3
- data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +3 -3
- data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +3 -3
- 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 +3 -3
- data/app/views/spree/address/_form.html.erb +26 -27
- data/app/views/spree/addresses/_form.html.erb +15 -6
- data/app/views/spree/addresses/edit.html.erb +13 -8
- data/app/views/spree/addresses/new.html.erb +8 -4
- data/app/views/spree/checkout/_address.html.erb +19 -23
- data/app/views/spree/checkout/_confirm.html.erb +1 -75
- data/app/views/spree/checkout/_credit_card.html.erb +3 -2
- data/app/views/spree/checkout/_delivery.html.erb +11 -4
- data/app/views/spree/checkout/_delivery_informations.html.erb +51 -0
- data/app/views/spree/checkout/_payment.html.erb +5 -24
- data/app/views/spree/checkout/_payment_sources.html.erb +17 -0
- data/app/views/spree/checkout/_summary.html.erb +22 -19
- data/app/views/spree/checkout/edit.html.erb +22 -2
- data/app/views/spree/checkout/payment/_gateway.html.erb +2 -2
- data/app/views/spree/checkout/registration.html.erb +3 -3
- data/app/views/spree/cms_pages/show.html.erb +16 -0
- data/app/views/spree/errors/not_found.html.erb +2 -2
- data/app/views/spree/home/index.html.erb +17 -123
- data/app/views/spree/layouts/checkout.html.erb +3 -1
- data/app/views/spree/layouts/spree_application.html.erb +3 -2
- data/app/views/spree/locale/index.html.erb +1 -0
- data/app/views/spree/orders/_coupon_code.html.erb +3 -4
- data/app/views/spree/orders/_line_item.html.erb +4 -4
- data/app/views/spree/orders/_line_item_data.html.erb +3 -3
- data/app/views/spree/orders/edit.html.erb +2 -3
- data/app/views/spree/orders/show.html.erb +2 -72
- data/app/views/spree/products/_cart_form.html.erb +5 -2
- data/app/views/spree/products/_color_option_type.html.erb +14 -14
- data/app/views/spree/products/_description.html.erb +19 -14
- data/app/views/spree/products/_filters_desktop.html.erb +80 -40
- data/app/views/spree/products/_filters_mobile.html.erb +47 -15
- data/app/views/spree/products/_gallery.html.erb +4 -6
- data/app/views/spree/products/_gallery_modal.html.erb +4 -6
- data/app/views/spree/products/_option_type.html.erb +1 -3
- data/app/views/spree/products/_product.html.erb +1 -1
- data/app/views/spree/products/_properties.html.erb +6 -4
- data/app/views/spree/products/_sort_desktop.html.erb +20 -14
- data/app/views/spree/products/_sort_mobile.html.erb +24 -8
- data/app/views/spree/products/_thumbnails.html.erb +2 -2
- data/app/views/spree/products/index.html.erb +7 -4
- data/app/views/spree/products/related.html.erb +11 -5
- data/app/views/spree/products/show.html.erb +2 -3
- data/app/views/spree/shared/_breadcrumbs.html.erb +2 -2
- data/app/views/spree/shared/_carousel_4_products.html.erb +14 -20
- data/app/views/spree/shared/_cart.html.erb +1 -1
- data/app/views/spree/shared/_checkout_header.html.erb +22 -21
- data/app/views/spree/shared/_color_select.html.erb +3 -3
- data/app/views/spree/shared/_copyright.html.erb +1 -10
- 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 +31 -21
- data/app/views/spree/shared/_get_started.html.erb +32 -0
- data/app/views/spree/shared/_head.html.erb +8 -5
- data/app/views/spree/shared/_header.html.erb +4 -4
- data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
- data/app/views/spree/shared/_line_item.html.erb +3 -3
- data/app/views/spree/shared/_link_to_account.html.erb +7 -4
- data/app/views/spree/shared/_link_to_cart.html.erb +1 -2
- 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 +5 -5
- data/app/views/spree/shared/_main_nav_bar.html.erb +69 -45
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
- data/app/views/spree/shared/_mobile_navigation.html.erb +48 -63
- data/app/views/spree/shared/_nav_bar.html.erb +9 -19
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +2 -21
- data/app/views/spree/shared/_order_details.html.erb +117 -174
- data/app/views/spree/shared/_paths.html.erb +8 -0
- 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/_properties.html.erb +4 -0
- data/app/views/spree/shared/_quantity_select.html.erb +2 -2
- data/app/views/spree/shared/_search.html.erb +9 -13
- data/app/views/spree/shared/_translations.html.erb +8 -7
- data/app/views/spree/shared/carousel/_single.html.erb +9 -14
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +35 -39
- data/app/views/spree/shared/cms/pages/_edit_mode.html.erb +13 -0
- data/app/views/spree/shared/cms/sections/_featured_article.html.erb +27 -0
- data/app/views/spree/shared/cms/sections/_hero_image.html.erb +60 -0
- data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +171 -0
- data/app/views/spree/shared/cms/sections/_product_carousel.html.erb +5 -0
- data/app/views/spree/shared/cms/sections/_rich_text_content.html.erb +3 -0
- data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +118 -0
- data/app/views/spree/taxons/_header.html.erb +7 -2
- data/app/views/spree/users/_address.html.erb +16 -24
- data/app/views/spree/users/_address_controls.html.erb +10 -0
- data/app/views/spree/users/show.html.erb +21 -16
- data/config/initializers/admin_actions.rb +18 -0
- data/config/initializers/assets.rb +4 -13
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +30 -26
- 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/app/assets/config/manifest.js +2 -0
- data/lib/generators/spree/frontend/install/templates/vendor/assets/javascripts/spree/frontend/all.js +8 -0
- data/lib/generators/spree/frontend/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +9 -0
- data/lib/spree/frontend/configuration.rb +18 -0
- data/lib/spree/frontend/engine.rb +3 -1
- data/lib/spree/frontend/version.rb +9 -0
- data/lib/spree/frontend.rb +8 -4
- data/license.md +13 -0
- data/spec/fixtures/files/store_favicon.ico +0 -0
- data/spree_frontend.gemspec +26 -14
- data/vendor/assets/javascripts/cleave.js +8 -0
- data/vendor/assets/javascripts/fetch.umd.js +531 -0
- data/vendor/assets/javascripts/jquery.payment.js +652 -0
- data/vendor/assets/javascripts/jsuri.js +458 -0
- data/vendor/assets/javascripts/polyfill.min.js +1 -0
- metadata +224 -86
- data/app/assets/images/homepage/big_category_banner.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_mobile.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_mobile.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_mobile.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/main_banner.jpg +0 -0
- data/app/assets/images/homepage/main_banner_mobile.jpg +0 -0
- data/app/assets/images/homepage/main_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/main_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_mobile.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_mobile.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_tablet_portrait.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-first-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-second-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-third-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-first-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-second-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-third-category.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/category_banner.jpg +0 -0
- data/app/assets/images/noimage/category_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/category_banner_plp.jpg +0 -0
- data/app/assets/images/noimage/category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/main_banner.jpg +0 -0
- data/app/assets/images/noimage/main_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/main_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/main_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/product_photo.jpg +0 -0
- data/app/assets/images/noimage/promo_banner.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_megamenu.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/spark-logo@3x.png +0 -0
- data/app/assets/stylesheets/spree/frontend/_glyphicons_urls_fix.scss +0 -10
- data/app/assets/stylesheets/spree/frontend/address_book.scss +0 -8
- data/app/models/spree/frontend_configuration.rb +0 -7
- data/app/views/spree/shared/_taxonomies.html.erb +0 -16
- /data/app/views/spree/{shared → errors}/forbidden.html.erb +0 -0
- /data/app/views/spree/{shared → errors}/unauthorized.html.erb +0 -0
@@ -1,12 +1,69 @@
|
|
1
|
-
<% cache
|
1
|
+
<% cache filters_cache_key('desktop') do %>
|
2
2
|
<div id="plp-filters-accordion" class="d-none d-lg-block col-lg-3 pr-5 position-sticky h-100 plp-filters" data-hook="taxon_sidebar_navigation">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
<%= clear_all_filters_link(permitted_params) if product_filters_present?(permitted_params) %>
|
4
|
+
|
5
|
+
<div class="plp-filters-scroller">
|
6
|
+
<% available_option_types.each do |option_type| %>
|
7
|
+
<div class="w-100 card plp-filters-card">
|
8
|
+
<% ot_filter_param = option_type.filter_param %>
|
9
|
+
<% option_type_name = ot_filter_param.titleize %>
|
10
|
+
<% collapsed = params[ot_filter_param].blank? %>
|
11
|
+
|
12
|
+
<button class="card-header <%= 'collapsed' if collapsed %> px-1 plp-filters-card-header" id="filters<%= ot_filter_param %>" data-toggle="collapse" data-target="#collapseFilter<%= ot_filter_param %>" aria-expanded="<%= !collapsed %>" aria-controls="collapseFilter<%= ot_filter_param %>" role="heading" aria-level="2">
|
13
|
+
<%= option_type.presentation %>
|
14
|
+
<%= icon(name: 'plus',
|
15
|
+
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--plus',
|
16
|
+
width: 16,
|
17
|
+
height: 16) %>
|
18
|
+
<%= icon(name: 'minus',
|
19
|
+
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--minus',
|
20
|
+
width: 16,
|
21
|
+
height: 16) %>
|
22
|
+
</button>
|
23
|
+
<div id="collapseFilter<%= ot_filter_param %>" class="collapse <%= 'show' unless collapsed %>" aria-labelledby="filters<%= ot_filter_param %>">
|
24
|
+
<div class="card-body px-0 pt-1">
|
25
|
+
<%= render 'spree/shared/option_values',
|
26
|
+
option_type: option_type,
|
27
|
+
permitted_params: permitted_params %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
7
32
|
|
8
|
-
|
9
|
-
|
33
|
+
<% available_properties.each do |property| %>
|
34
|
+
<% if property.uniq_values.present? %>
|
35
|
+
<div class="w-100 card plp-filters-card">
|
36
|
+
<% property_name = property.name %>
|
37
|
+
<% collapsed = params.dig(:properties, property.filter_param).blank? %>
|
38
|
+
<button class="card-header <%= 'collapsed' if collapsed %> px-1 plp-filters-card-header" id="filters<%= property_name %>" data-toggle="collapse" data-target="#collapseFilter<%= property_name %>" aria-expanded="<%= !collapsed %>" aria-controls="collapseFilter<%= property_name %>" role="heading" aria-level="2">
|
39
|
+
<%= property.presentation %>
|
40
|
+
<%= icon(name: 'plus',
|
41
|
+
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--plus',
|
42
|
+
width: 16,
|
43
|
+
height: 16) %>
|
44
|
+
<%= icon(name: 'minus',
|
45
|
+
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--minus',
|
46
|
+
width: 16,
|
47
|
+
height: 16) %>
|
48
|
+
</button>
|
49
|
+
<div id="collapseFilter<%= property_name %>" class="collapse <%= 'show' unless collapsed %>" aria-labelledby="filters<%= property_name %>">
|
50
|
+
<div class="card-body px-0 pt-1">
|
51
|
+
<%= render 'spree/shared/properties',
|
52
|
+
params_property_name: params[property_name],
|
53
|
+
property: property,
|
54
|
+
permitted_params: permitted_params,
|
55
|
+
property_name: property_name
|
56
|
+
%>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
62
|
+
|
63
|
+
<% price_collapsed = params[:price].blank? %>
|
64
|
+
<div class="w-100 card plp-filters-card">
|
65
|
+
<button class="card-header text-capitalize <%= 'collapsed' if price_collapsed %> px-1 plp-filters-card-header" id="filtersPrice" data-toggle="collapse" data-target="#collapseFilterPrice" aria-expanded="<% !price_collapsed %>" aria-controls="collapseFilterPrice" role="heading" aria-level="2">
|
66
|
+
<%= Spree.t('plp.price') %>
|
10
67
|
<%= icon(name: 'plus',
|
11
68
|
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--plus',
|
12
69
|
width: 16,
|
@@ -15,44 +72,27 @@
|
|
15
72
|
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--minus',
|
16
73
|
width: 16,
|
17
74
|
height: 16) %>
|
18
|
-
</
|
19
|
-
<div id="
|
75
|
+
</button>
|
76
|
+
<div id="collapseFilterPrice" class="collapse <%= 'show' unless price_collapsed %>" aria-labelledby="filtersPrice">
|
20
77
|
<div class="card-body px-0 pt-1">
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
permitted_params: permitted_params,
|
25
|
-
ot_downcase_name: ot_downcase_name
|
26
|
-
%>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
<% end %>
|
78
|
+
<% price_filters.each do |price_range| %>
|
79
|
+
<%= price_filter_link(price_range, permitted_params) %>
|
80
|
+
<% end %>
|
31
81
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--plus',
|
37
|
-
width: 16,
|
38
|
-
height: 16) %>
|
39
|
-
<%= icon(name: 'minus',
|
40
|
-
classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--minus',
|
41
|
-
width: 16,
|
42
|
-
height: 16) %>
|
43
|
-
</div>
|
44
|
-
<div id="collapseFilterPrice" class="collapse <%= 'show' unless params[:price].blank? %>" aria-labelledby="filtersPrice">
|
45
|
-
<div class="card-body px-0 pt-1">
|
46
|
-
<% price_filter_values.each do |name| %>
|
47
|
-
<% price_param = params[:price] == name ? '' : name %>
|
48
|
-
<%= link_to permitted_params.merge({ price: price_param }), class: "d-block" do %>
|
49
|
-
<div class="d-inline-block py-1 px-2 m-1 text-uppercase plp-filters-card-item <%= 'plp-filters-card-item--selected' if params[:price] == name %>">
|
50
|
-
<%= name %>
|
82
|
+
<div id="filterPriceRangeDesktop" class="m-1">
|
83
|
+
<div class="d-inline-flex mb-2">
|
84
|
+
<%= min_price_filter_input class: 'w-50 p-2 mr-1' %>
|
85
|
+
<%= max_price_filter_input class: 'w-50 p-2' %>
|
51
86
|
</div>
|
52
|
-
|
53
|
-
|
87
|
+
|
88
|
+
<%= link_to Spree.t('plp.done'), permitted_params, class: 'btn btn-primary spree-btn w-100', data: { params: permitted_params } %>
|
89
|
+
</div>
|
90
|
+
</div>
|
54
91
|
</div>
|
55
92
|
</div>
|
93
|
+
<% additional_filters_partials.each do |partial| %>
|
94
|
+
<%= render "spree/products/filters/#{partial}", permitted_params: permitted_params %>
|
95
|
+
<% end %>
|
56
96
|
</div>
|
57
97
|
</div>
|
58
98
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% is_visible = params[:menu_open] ? 'block' : 'none' %>
|
2
2
|
|
3
3
|
<div id="filter-by-overlay" class="d-lg-none plp-overlay" style="display: <%= is_visible %>;">
|
4
|
-
<% cache
|
4
|
+
<% cache filters_cache_key('mobile') do %>
|
5
5
|
<div class="plp-scroll">
|
6
6
|
<div class="container">
|
7
7
|
<div class="plp-overlay-header">
|
@@ -11,18 +11,18 @@
|
|
11
11
|
</div>
|
12
12
|
<div id="filters-accordion">
|
13
13
|
<% available_option_types.each do |option_type| %>
|
14
|
-
<% option_type_name = option_type.
|
14
|
+
<% option_type_name = option_type.filter_param %>
|
15
15
|
<% ot_downcase_name = option_type_name.downcase %>
|
16
16
|
|
17
17
|
<div class="card plp-overlay-card">
|
18
|
-
<div class="card-header text-uppercase <%= 'collapsed' if params[ot_downcase_name].blank? %> plp-overlay-card-header" data-toggle="collapse" data-target="#collapseFilterMobile<%= option_type_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= option_type_name %>" role="heading" aria-level="3">
|
19
|
-
<%=
|
18
|
+
<div class="card-header text-uppercase <%= 'collapsed' if params[ot_downcase_name].blank? %> plp-overlay-card-header" data-toggle="collapse" id="filtersMobile<%= option_type_name %>" data-target="#collapseFilterMobile<%= option_type_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= option_type_name %>" role="heading" aria-level="3">
|
19
|
+
<%= option_type.presentation %>
|
20
20
|
<%= icon(name: 'arrow-right',
|
21
21
|
classes: 'spree-icon-arrow spree-icon-arrow-right mt-1 float-right arrow plp-overlay-card-header-arrow',
|
22
22
|
width: 16,
|
23
23
|
height: 16) %>
|
24
24
|
</div>
|
25
|
-
<div id="collapseFilterMobile<%= option_type_name %>" class="collapse <%= 'show' unless params[ot_downcase_name].blank? %>" aria-labelledby="
|
25
|
+
<div id="collapseFilterMobile<%= option_type_name %>" class="collapse <%= 'show' unless params[ot_downcase_name].blank? %>" aria-labelledby="filtersMobile<%= option_type_name %>" data-parent="#filters-accordion">
|
26
26
|
<div class="card-body pt-1">
|
27
27
|
<%= render 'spree/shared/option_values', params_ot_downcase_name: params[ot_downcase_name], option_type: option_type, permitted_params: permitted_params, ot_downcase_name: ot_downcase_name %>
|
28
28
|
</div>
|
@@ -30,6 +30,32 @@
|
|
30
30
|
</div>
|
31
31
|
<% end %>
|
32
32
|
|
33
|
+
<% available_properties.each do |property| %>
|
34
|
+
<% if property.uniq_values.present? %>
|
35
|
+
<% property_name = property.name %>
|
36
|
+
<% collapsed = params.dig(:properties, property.filter_param).blank? %>
|
37
|
+
<div class="card plp-overlay-card">
|
38
|
+
<div class="card-header text-uppercase <%= 'collapsed' if collapsed %> plp-overlay-card-header" data-toggle="collapse" id="filtersMobile<%= property_name %>" data-target="#collapseFilterMobile<%= property_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= property_name %>" role="heading" aria-level="3">
|
39
|
+
<%= property.presentation %>
|
40
|
+
<%= icon(name: 'arrow-right',
|
41
|
+
classes: 'spree-icon-arrow spree-icon-arrow-right mt-1 float-right arrow plp-overlay-card-header-arrow',
|
42
|
+
width: 16,
|
43
|
+
height: 16) %>
|
44
|
+
</div>
|
45
|
+
<div id="collapseFilterMobile<%= property_name %>" class="collapse <%= 'show' unless collapsed %>" aria-labelledby="filtersMobile<%= property_name %>" data-parent="#filters-accordion">
|
46
|
+
<div class="card-body pt-1">
|
47
|
+
<%= render 'spree/shared/properties',
|
48
|
+
params_property_name: params[property_name],
|
49
|
+
property: property,
|
50
|
+
permitted_params: permitted_params,
|
51
|
+
property_name: property_name
|
52
|
+
%>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
<% end %>
|
57
|
+
<% end %>
|
58
|
+
|
33
59
|
<div class="card plp-overlay-card">
|
34
60
|
<div class="card-header text-uppercase <%= 'collapsed' if params[:price].blank? %> plp-overlay-card-header" id="headingFour" data-toggle="collapse" data-target="#collapseFour" aria-expanded="true" aria-controls="collapseFour" role="heading" aria-level="3">
|
35
61
|
<%= Spree.t('plp.price') %>
|
@@ -40,23 +66,29 @@
|
|
40
66
|
</div>
|
41
67
|
<div id="collapseFour" class="collapse <%= 'show' unless params[:price].blank? %>" aria-labelledby="headingFour" data-parent="#filters-accordion">
|
42
68
|
<div class="card-body pt-1">
|
43
|
-
<%
|
44
|
-
|
45
|
-
<%= link_to permitted_params.merge(price: price_param, menu_open: 1) do %>
|
46
|
-
<div class="d-inline-block py-1 px-2 m-1 text-uppercase plp-overlay-card-item <%= 'plp-overlay-card-item--selected' if params[:price] == name %>">
|
47
|
-
<%= name %>
|
48
|
-
</div>
|
49
|
-
<% end %>
|
69
|
+
<% price_filters.each do |price_range| %>
|
70
|
+
<%= price_filter_link(price_range, permitted_params) %>
|
50
71
|
<% end %>
|
72
|
+
|
73
|
+
<div id="filterPriceRangeMobile" class="m-1">
|
74
|
+
<div class="d-inline-flex">
|
75
|
+
<%= min_price_filter_input class: 'w-50 p-2 mr-1' %>
|
76
|
+
<%= max_price_filter_input class: 'w-50 p-2' %>
|
77
|
+
</div>
|
78
|
+
</div>
|
51
79
|
</div>
|
52
80
|
</div>
|
53
81
|
</div>
|
82
|
+
|
83
|
+
<% additional_filters_partials.each do |partial| %>
|
84
|
+
<%= render "spree/products/filters/mobile/#{partial}", permitted_params: permitted_params %>
|
85
|
+
<% end %>
|
54
86
|
</div>
|
55
87
|
</div>
|
56
88
|
<% end %>
|
57
89
|
|
58
|
-
<div class="container position-absolute text-center
|
59
|
-
<%=
|
60
|
-
<%= link_to Spree.t('plp.done'), permitted_params, class: 'btn btn-primary spree-btn w-100' %>
|
90
|
+
<div class="container position-absolute text-center plp-overlay-buttons pt-3">
|
91
|
+
<%= clear_all_filters_link(permitted_params) %>
|
92
|
+
<%= link_to Spree.t('plp.done'), permitted_params, id: 'filterProductsButtonMobile', class: 'btn btn-primary spree-btn w-100 done-btn', data: { params: permitted_params } %>
|
61
93
|
</div>
|
62
94
|
</div>
|
@@ -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,9 +1,9 @@
|
|
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">
|
6
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
6
|
+
<button type="button" class="close position-absolute mr-3" data-dismiss="modal" aria-label="Close">
|
7
7
|
<span aria-hidden="true">
|
8
8
|
<%= icon(name: 'close',
|
9
9
|
classes: 'd-block d-lg-none',
|
@@ -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,12 +15,10 @@
|
|
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",
|
23
|
-
tabindex: 0,
|
24
22
|
"aria-label" => option_value[:presentation] do %>
|
25
23
|
|
26
24
|
<span><%= option_value[:presentation] %></span>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% end %>
|
11
11
|
</div>
|
12
12
|
<div class="card-footer text-center">
|
13
|
-
<span class="price selling lead" content="<%= price.nil? 0 : price.to_d %>">
|
13
|
+
<span class="price selling lead" content="<%= price.nil? ? 0 : price.to_d %>">
|
14
14
|
<%= display_price(product) %>
|
15
15
|
</span>
|
16
16
|
<span content="<%= current_currency %>"></span>
|
@@ -2,10 +2,12 @@
|
|
2
2
|
<h3 class="pt-4 font-weight-bold text-uppercase product-details-subtitle"><%= Spree.t(:details) %></h3>
|
3
3
|
<ul id="product-properties" class="m-0 list-unstyled product-properies" data-hook>
|
4
4
|
<% @product_properties.each do |product_property| %>
|
5
|
-
|
6
|
-
<
|
7
|
-
|
8
|
-
|
5
|
+
<% if product_property.show_property? %>
|
6
|
+
<li>
|
7
|
+
<span class="font-weight-bold text-break"><%= product_property.property.presentation %>:</span>
|
8
|
+
<span class="text-break"><%= product_property.value %></span>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
9
11
|
<% end %>
|
10
12
|
</ul>
|
11
13
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="container dropdown d-none d-lg-flex justify-content-end mt-5 pr-4 pb-3 plp-sort">
|
2
|
-
<
|
2
|
+
<a data-toggle="dropdown" class="plp-sort-header" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
3
3
|
<%= Spree.t("plp.#{ params[:sort_by].blank? ? 'sort_by': params[:sort_by].gsub('-', '_') }") %>
|
4
4
|
<%= icon(name: 'arrow-right',
|
5
5
|
classes: 'spree-icon-arrow spree-icon-arrow-up ml-3 plp-sort-header-arrow--up',
|
@@ -9,22 +9,28 @@
|
|
9
9
|
classes: 'spree-icon-arrow spree-icon-arrow-down ml-3 plp-sort-header-arrow--down',
|
10
10
|
width: 18,
|
11
11
|
height: 18) %>
|
12
|
-
</
|
13
|
-
|
12
|
+
</a>
|
14
13
|
<div class="dropdown-menu text-right plp-sort-dropdown">
|
15
14
|
<ul class="pt-1 plp-sort-dropdown-ul">
|
16
15
|
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by].blank? %>">
|
17
|
-
<%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)) %>
|
16
|
+
<%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)), class: 'dropdown-item' %>
|
18
17
|
</li>
|
19
|
-
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == '
|
20
|
-
<%= link_to Spree.t('plp.
|
18
|
+
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'name-a-z' %>">
|
19
|
+
<%= link_to Spree.t('plp.name_a_z'), url_for(permitted_params.merge(sort_by: 'name-a-z')), class: 'dropdown-item' %>
|
21
20
|
</li>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
</
|
29
|
-
|
21
|
+
</li>
|
22
|
+
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'name-z-a' %>">
|
23
|
+
<%= link_to Spree.t('plp.name_z_a'), url_for(permitted_params.merge(sort_by: 'name-z-a')), class: 'dropdown-item' %>
|
24
|
+
</li>
|
25
|
+
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'newest-first' %>">
|
26
|
+
<%= link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')), class: 'dropdown-item' %>
|
27
|
+
</li>
|
28
|
+
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-high-to-low' %>">
|
29
|
+
<%= link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')), class: 'dropdown-item' %>
|
30
|
+
</li>
|
31
|
+
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-low-to-high' %>">
|
32
|
+
<%= link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')), class: 'dropdown-item' %>
|
33
|
+
</li>
|
34
|
+
</ul>
|
35
|
+
</div>
|
30
36
|
</div>
|
@@ -7,32 +7,48 @@
|
|
7
7
|
</div>
|
8
8
|
<div class="plp-overlay-header-border"></div>
|
9
9
|
<ul class="pt-1 plp-overlay-ul">
|
10
|
-
<li class="
|
11
|
-
<a href="<%= url_for(permitted_params.merge(sort_by: nil)) %>"
|
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)) %>">
|
12
12
|
<div class="plp-empty-dot">
|
13
13
|
<div class="filled-dot"></div>
|
14
14
|
</div>
|
15
15
|
<%= Spree.t('plp.default') %>
|
16
16
|
</a>
|
17
17
|
</li>
|
18
|
-
<li class="
|
19
|
-
<a href="<%= url_for(permitted_params.merge(sort_by: '
|
18
|
+
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'name-a-z' %>">
|
19
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'name-a-z')) %>">
|
20
|
+
<div class="plp-empty-dot">
|
21
|
+
<div class="filled-dot"></div>
|
22
|
+
</div>
|
23
|
+
<%= Spree.t('plp.name_a_z') %>
|
24
|
+
</a>
|
25
|
+
</li>
|
26
|
+
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'name-z-a' %>">
|
27
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'name-z-a')) %>">
|
28
|
+
<div class="plp-empty-dot">
|
29
|
+
<div class="filled-dot"></div>
|
30
|
+
</div>
|
31
|
+
<%= Spree.t('plp.name_z_a') %>
|
32
|
+
</a>
|
33
|
+
</li>
|
34
|
+
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'newest-first' %>">
|
35
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>">
|
20
36
|
<div class="plp-empty-dot">
|
21
37
|
<div class="filled-dot"></div>
|
22
38
|
</div>
|
23
39
|
<%= Spree.t('plp.newest_first') %>
|
24
40
|
</a>
|
25
41
|
</li>
|
26
|
-
<li class="
|
27
|
-
<a href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>"
|
42
|
+
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-high-to-low' %>">
|
43
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>">
|
28
44
|
<div class="plp-empty-dot">
|
29
45
|
<div class="filled-dot"></div>
|
30
46
|
</div>
|
31
47
|
<%= Spree.t('plp.price_high_to_low') %>
|
32
48
|
</a>
|
33
49
|
</li>
|
34
|
-
<li class="
|
35
|
-
<a href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>"
|
50
|
+
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-low-to-high' %>">
|
51
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>">
|
36
52
|
<div class="plp-empty-dot">
|
37
53
|
<div class="filled-dot"></div>
|
38
54
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<ul id="product-thumbnails" class="thumbnails d-flex w-100 pl-0 my-4" data-hook>
|
4
4
|
<% @product.images.each do |i| %>
|
5
5
|
<li class='tmb-all mr-2 tmb-<%= i.viewable.id %>'>
|
6
|
-
<%= link_to(image_tag(main_app.
|
6
|
+
<%= link_to(image_tag(main_app.cdn_image_url(i.url(:mini)), class: "img-thumbnail d-inline-block"), main_app.cdn_image_url(i.url(:product))) %>
|
7
7
|
</li>
|
8
8
|
<% end %>
|
9
9
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% @product.variant_images.each do |i| %>
|
12
12
|
<% next if @product.images.include?(i) %>
|
13
13
|
<li class='vtmb mr-2 tmb-<%= i.viewable.id %>'>
|
14
|
-
<%= link_to(image_tag(main_app.
|
14
|
+
<%= link_to(image_tag(main_app.cdn_image_url(i.url(:mini)), class: "img-thumbnail"), main_app.cdn_image_url(i.url(:product))) %>
|
15
15
|
</li>
|
16
16
|
<% end %>
|
17
17
|
<% end %>
|
@@ -1,7 +1,8 @@
|
|
1
|
-
<% permitted_params =
|
1
|
+
<% permitted_params = permitted_products_params %>
|
2
|
+
<% products_empty = @products.empty? %>
|
2
3
|
|
3
4
|
<div data-hook="search_results">
|
4
|
-
<% if
|
5
|
+
<% if products_empty %>
|
5
6
|
<% if permitted_params[:keywords].present? && permitted_params.to_h.one? %>
|
6
7
|
<%= render 'spree/products/no_results' %>
|
7
8
|
<% else %>
|
@@ -40,6 +41,8 @@
|
|
40
41
|
<%= render 'spree/products/filters_mobile', permitted_params: permitted_params %>
|
41
42
|
<%= render 'spree/products/sort_mobile', permitted_params: permitted_params %>
|
42
43
|
|
43
|
-
<%
|
44
|
-
|
44
|
+
<% unless products_empty %>
|
45
|
+
<% cache cache_key_for_products(@products, 'json-ld') do %>
|
46
|
+
<%= products_structured_data(@products) %>
|
47
|
+
<% end %>
|
45
48
|
<% end %>
|
@@ -1,8 +1,14 @@
|
|
1
|
-
<% if
|
1
|
+
<% if product_relation_types.any? %>
|
2
2
|
<div id="related-products">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
<% product_relation_types.each do |relation_type| %>
|
4
|
+
<% products = product_relations_by_type(relation_type) %>
|
5
|
+
|
6
|
+
<% if products.any? %>
|
7
|
+
<div class="product-details-related" id="product-details-related-<%= relation_type.id %>">
|
8
|
+
<p class="font-weight-bold text-center text-uppercase product-details-carousel-text"><%= relation_type.name %></p>
|
9
|
+
<%= render 'spree/shared/carousel_4_products', id: "related-products-carousel-#{relation_type.id}", products: products %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
7
13
|
</div>
|
8
14
|
<% end %>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
<%= render partial: 'gallery_modal' %>
|
40
40
|
</div>
|
41
|
-
<div id="related-products"
|
41
|
+
<div id="related-products"></div>
|
42
42
|
|
43
43
|
<%= products_structured_data([@product]) %>
|
44
44
|
|
@@ -48,5 +48,4 @@
|
|
48
48
|
<div
|
49
49
|
data-related-products
|
50
50
|
data-related-products-id="<%= @product.slug %>"
|
51
|
-
data-related-products-enabled="<%= @product.respond_to?(:has_related_products?) %>"
|
52
|
-
/>
|
51
|
+
data-related-products-enabled="<%= @product.respond_to?(:has_related_products?) %>" />
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<nav id="breadcrumbs" class="col-12 mt-1 mt-sm-3 mt-lg-4">
|
1
|
+
<nav id="breadcrumbs" class="col-12 mt-1 mt-sm-3 mt-lg-4" aria-label="breadcrumbs">
|
2
2
|
<ol class="breadcrumb">
|
3
3
|
<li class="breadcrumb-item">
|
4
4
|
<span>
|
5
|
-
<%= link_to Spree.t(
|
5
|
+
<%= link_to Spree.t(:home), spree.root_path %>
|
6
6
|
</span>
|
7
7
|
</li>
|
8
8
|
<% if @taxon %>
|