Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Use dash (-) for id target elements on sliders, not backslash (/) (#11255)

Matthew Kennedy7061fc0e2dd5
diff --git a/frontend/app/views/spree/shared/_carousel_4_products.html.erb b/frontend/app/views/spree/shared/_carousel_4_products.html.erb
index e4ab75ddde..49efe88829 100644
--- a/frontend/app/views/spree/shared/_carousel_4_products.html.erb
+++ b/frontend/app/views/spree/shared/_carousel_4_products.html.erb
@@ -1,5 +1,5 @@
<% cache [common_product_cache_keys, products&.except(:group, :order)&.maximum(:updated_at)&.to_i, id, products&.ids&.join(',')] do %>
- <div id="<%= id %>-mobile" class="carousel slide d-md-none homepage-carousel" data-interval="false">
+ <div id="<%= id.parameterize %>-mobile" class="carousel slide d-md-none homepage-carousel" data-interval="false">
<div class="carousel-inner">
<% products.each_slice(2).with_index do |sliced_items, index| %>
<div class="carousel-item <%= 'active' if index == 0 %>">
@@ -18,7 +18,7 @@
</div>
<a
class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--previous"
- href="#<%= id %>-mobile"
+ href="#<%= id.parameterize %>-mobile"
role="button"
data-slide="prev">
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
@@ -32,7 +32,7 @@
<a
class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--next"
- href="#<%= id %>-mobile"
+ href="#<%= id.parameterize %>-mobile"
role="button"
data-slide="next">
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
@@ -45,14 +45,14 @@
</a>
</div>
- <div id="<%= id %>-desktop" class="carousel slide d-none d-md-block homepage-carousel" data-interval="false">
+ <div id="<%= id.parameterize %>-desktop" class="carousel slide d-none d-md-block homepage-carousel" data-interval="false">
<div class="carousel-inner carousel-inner-width">
<% products.each_slice(4).with_index do |sliced_items, index| %>
<div class="carousel-item <%= 'active' if index == 0 %>">
<div class="container position-relative">
<a
class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--previous"
- href="#<%= id %>-desktop"
+ href="#<%= id.parameterize %>-desktop"
role="button"
data-slide="prev">
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
@@ -74,7 +74,7 @@
<a
class="d-md-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--next"
- href="#<%= id %>-desktop"
+ href="#<%= id.parameterize %>-desktop"
role="button"
data-slide="next">
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">