From 052d0be0d6638976369ddf742b0068347f9037cc Mon Sep 17 00:00:00 2001 From: luechinger Date: Tue, 31 Mar 2026 12:47:01 +0200 Subject: [PATCH] fix: display slideshow arrows only if generic images exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context: If color swatches are enabled and multiple product variants (with their variant image) exist, the current version of Horizon will always display slideshow arrows – even if no "generic" images are present. In this case, clicking the arrow will have no effect, thus confusing the user. Fix: Added a check for generic images which are not attached to a variant. Hide slideshow arrows if not the case. --- snippets/product-media-gallery-content.liquid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/snippets/product-media-gallery-content.liquid b/snippets/product-media-gallery-content.liquid index bd5f5a133..a67c1980c 100644 --- a/snippets/product-media-gallery-content.liquid +++ b/snippets/product-media-gallery-content.liquid @@ -73,7 +73,11 @@ assign slideshow_class = '' if media_presentation == 'carousel' - assign render_slideshow_arrows = true + assign pdp_variant_images = selected_product.images | where: 'attached_to_variant?', true | map: 'src' + assign pdp_generic_media_size = selected_product.media.size | minus: pdp_variant_images.size + if pdp_generic_media_size > 0 + assign render_slideshow_arrows = true + endif endif endif