fix(extra-features): Fixed the sync product image/gallery

This commit is contained in:
2026-05-29 12:07:12 +02:00
parent d2d1dc4302
commit 1dc5ceb241
4 changed files with 336 additions and 122 deletions
+1 -16
View File
@@ -13,6 +13,7 @@ import "@js/theme/components/quickview";
import "@js/theme/components/product";
import "@js/theme/components/cart/cart";
import "@js/theme/components/cart/block-cart";
import "@js/theme/components/product-miniature-form.js";
import usePasswordPolicy from "@js/theme/components/usePasswordPolicy";
import prestashop from "prestashop";
@@ -66,22 +67,6 @@ function initStickyHeader() {
}
}
// Sync product thumbs height with main images height
function syncThumbsHeight() {
const mainImages = document.querySelector(".product-main-images");
const thumbs = document.querySelector(".product-thumbs.swiper");
// Only apply if Swiper is vertical
if (mainImages && thumbs && thumbs.classList.contains("swiper-vertical")) {
thumbs.style.maxHeight = mainImages.offsetHeight + "px";
thumbs.style.height = mainImages.offsetHeight + "px";
} else {
return;
}
}
window.addEventListener("load", syncThumbsHeight);
window.addEventListener("resize", syncThumbsHeight);
$(() => {
initStickyHeader();
accLinksTriggerActive();