.ecom-norma body { font-family: Arial, sans-serif; font-size: 14px; color: #333; background: #f9f9f9; } .ecom-norma .main-container, .ecom-norma .container { width: 100%; margin: 40px auto; display: flex; gap: 24px; } .ecom-norma .main-container { max-width: 1200px; } .ecom-norma .container { padding: 1em 5em; } .ecom-norma .top-section { display: flex; align-items: flex-start; gap: 24px; } .ecom-norma .promo-banner { display: flex; align-items: center; justify-content: center; background: #111; color: #fff; font-size: 14px; padding: 12px 20px; gap: 8px; } .ecom-norma .promo-banner .discount { color: #ffd700; font-weight: bold; } .ecom-norma .promo-banner .conditions { display: flex; align-items: center; font-weight: bold; text-decoration: none; color: #fff; } .ecom-norma .promo-banner .conditions:hover { text-decoration: underline; } .ecom-norma .promo-banner .conditions i { margin-left: 4px; font-size: 16px; } .ecom-norma .product-detail { flex: 1; background: #fff; padding: 24px; border-radius: 4px; } .ecom-norma .header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; } .ecom-norma .header .logo { height: 80px; } .ecom-norma .title { font-family: 'SohoPro-Regular'; font-size: 24px; color: #00437a; font-weight: bold; } .ecom-norma .subinfo { display: inline-block; margin: 10px 0 0; padding: 4px 8px; background: #D8F8FF; font-size: 12px; font-weight: bold; color: #00437A; } .ecom-norma .description { margin: 10px 0 20px; font-family: 'SohoPro-Regular'; font-size: 1.2em; font-weight: 600; line-height: 1.4; color: #222; } .ecom-norma .btn { display: inline-block; font-family: 'SohoPro-Regular'; font-weight: bold; padding: 8px 16px; text-decoration: none; } .ecom-norma .extract-btn { font-size: 1em !important; border: 2px solid #00437a; color: #00437a; transition: background .2s, color .2s; text-transform: none !important; } .ecom-norma .extract-btn:hover { background: #e6f0ff; color: #120e5b; } .ecom-norma .purchase-box { flex: 0 0 300px; background: #f3f6f9; padding: 10px 0 15px; border-radius: 4px; text-align: center; } .ecom-norma .purchase-box .price-header { padding: 16px; text-align: left; } .ecom-norma .purchase-box .price-header .price { font-family: 'SohoPro-Regular'; font-size: 28px; font-weight: bold; color: #00437a; } .ecom-norma .purchase-box .price-header .note { font-family: sans-serif; font-size: 12px; font-weight: 500; margin-top: 4px; color: #000; } .ecom-norma .purchase-box .selectors { display: flex; align-items: center; gap: 8px; padding: 0 16px 16px; } .ecom-norma .purchase-box .selectors .qty { flex: 0 0 50px; } .ecom-norma .purchase-box .selectors input, .ecom-norma .purchase-box .selectors select { width: 100%; height: 40px; padding: 0 12px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: #fff; } .ecom-norma .purchase-box .selectors select { background-image: url(/documents/d/global/ico-chevron-down); background-repeat: no-repeat; background-size: 18px 10px; background-position: right 12px center; } .ecom-norma .purchase-box .selectors select::-ms-expand { display: none; } .ecom-norma .purchase-box .selectors .selector { position: relative; flex: 1; } .ecom-norma .purchase-box .selectors .selector .arrow { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); pointer-events: none; font-size: 12px; color: #666; } .ecom-norma .purchase-box .selectors .selector:focus-within { background-size: 18px 10px; background-position-x: 95%; } .ecom-norma .purchase-box .buy-btn { width: calc(100% - 32px); text-transform: uppercase; } .ecom-norma .purchase-box .buy-btn:hover, .ecom-norma .purchase-box .buy-btn:focus, .ecom-norma .purchase-box .buy-btn:focus-visible { outline: 2px solid var(--brand-color-2, #6a9bd3); outline-offset: 2px; box-shadow: 0 0 0 3px rgba(106, 155, 211, 0.35); } .ecom-norma .purchase-box .buy-btn.disabled, .ecom-norma .purchase-box .buy-btn:disabled, .ecom-norma .purchase-box .buy-btn[disabled], .ecom-norma .purchase-box .buy-btn.ecom-btn-loading { opacity: .6; pointer-events: none; } .ecom-norma .purchase-box .buy-btn.ecom-btn-loading::before, .ecom-norma .purchase-box .buy-btn.ecom-btn-loading::after { display: none; } .ecom-norma .tabs-section { max-width: 900px; //margin: 0 auto 40px; //padding-top: 3em; background: #fff; border-radius: 4px; overflow: hidden; } .ecom-norma .tabs-section .tabs { display: flex; border-bottom: 1px solid #ddd; } .ecom-norma .tabs-section .tab { padding: 12px 16px; margin-right: 8px; background: transparent; border: none; border-radius: 4px 4px 0 0; cursor: pointer; font-size: 14px; color: #222; transition: background .2s; } .ecom-norma .tabs-section .tab:hover { background: rgba(0, 67, 122, 0.05); } .ecom-norma .tabs-section .tab.active { color: #00437a; background: #e5f5ff; border-bottom: 2px solid #00437a; font-weight: bold; } .ecom-norma .tabs-section .tab-content { margin: 0; padding: 0; } .ecom-norma .tabs-section table { width: 100%; border-collapse: collapse; } .ecom-norma .tabs-section th, .ecom-norma .tabs-section td { padding: 12px 16px; vertical-align: middle; } .ecom-norma .tabs-section th { width: 180px; font-weight: 600; color: #444; text-align: right; white-space: nowrap; } .ecom-norma .tabs-section td { font-weight: 400; color: #222; line-height: 1.4; } .ecom-norma .tabs-section tr:nth-child(even) > * { background: #f9fafb; } .ecom-norma .tabs-section .badge { display: inline-block; margin-left: 8px; padding: 2px 6px; font-size: 11px; text-transform: uppercase; border-radius: 3px; } .ecom-norma .tabs-section .alert-label { vertical-align: top; text-align: right; } .ecom-norma .tabs-section .th-content { vertical-align: top; text-align: right; } .ecom-norma .tabs-section .alert-content { vertical-align: bottom; text-align: left; } /* Márgenes para dentro del td */ .ecom-norma .tabs-section .alert-content p { margin-top: 0; margin-bottom: 0; } /* Márgenes para

dentro del td */ .ecom-norma .tabs-section .td-content p { margin-top: 0; margin-bottom: 0; } /* Márgenes para el del título */ .ecom-norma .tabs-section .alert-content strong { display: inline; /* o block si quieres control total del margen */ margin: 0; } .ecom-norma .tabs-section .tag-success { background: #2a7a36; color: #fff; } .ecom-norma .tabs-section .tag-danger { background: #c00000; color: #fff; } .ecom-norma .tabs-section .tag-blue { background: #0078c0; color: #fff; } .ecom-norma .info-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5em; height: 1.5em; margin-right: 8px; border: 2px solid #273469; border-radius: 50%; font-size: 1em; font-weight: bold; } /* === Media queries === */ @media (max-width: 1024px) { .ecom-norma .main-container { padding: 20px; margin: 20px auto; } .ecom-norma .top-section { flex-direction: column; gap: 16px; } .ecom-norma .purchase-box { flex: none; width: 100%; } .ecom-norma .product-detail { padding: 16px; } .ecom-norma .header .logo { height: 60px; } .ecom-norma .title { font-size: 18px; } .ecom-norma .description { font-size: 1em; } .ecom-norma .tabs-section { max-width: 100%; padding: 1.5em 1em; } } @media (max-width: 768px) { .ecom-norma body { font-size: 13px; } .ecom-norma .promo-banner { flex-direction: column; text-align: center; gap: 4px; padding: 8px 10px; } .ecom-norma .main-container { margin: 16px auto; } .ecom-norma .top-section { gap: 12px; } .ecom-norma .header { flex-direction: column; align-items: flex-start; } .ecom-norma .header .logo { height: 50px; } .ecom-norma .title { font-size: 16px; } .ecom-norma .subinfo { font-size: 11px; } .ecom-norma .description { font-size: 0.95em; } .ecom-norma .extract-btn { padding: 6px 12px; font-size: 13px; } .ecom-norma .selectors { flex-direction: column; gap: 8px; padding: 12px; } .ecom-norma .selectors .qty, .ecom-norma .selectors .selector { width: 100%; } .ecom-norma .buy-btn { width: 100%; margin-bottom: 16px; } .ecom-norma .tabs-section .tabs { flex-wrap: wrap; justify-content: center; } .ecom-norma .tabs-section .tab { flex: 1 1 45%; margin: 4px; padding: 10px 8px; font-size: 13px; text-align: center; } .ecom-norma .tabs-section th, .ecom-norma .tabs-section td { padding: 8px 10px; font-size: 12px; } .ecom-norma .tabs-section th { width: 140px; } }

Se ha producido un error inesperado.
window.ecomNormaScripts = window.ecomNormaScripts || (function () { /* ===================================== PROPIEDADES PRIVADAS ===================================== */ const privateProps = window.ecomNormaScripts?.privateProps || { //test1: {}, //test2: 0 }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PRIVADAS ===================================== */ (function initPrivateProps() { /* privateProps.test1 = { test11: "", test111: { test1112: "00,00", test1113: "€", test1114: "00", test1115: "000-00-000", test1116: "0000", test1117: "000" }, test2: "" };*/ })(); /* ===================================== PROPIEDADES PÚBLICAS ===================================== */ const publicProps = { funcsEcomGlobalScripts: null, propsEcomGlobalScripts: null, isDebug: false }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PÚBLICAS ===================================== */ (function initPublicProps() { //publicProps.TEST1 = ""; //publicProps.TEST2 = 0; })(); /* ===================================== FUNCIONES PÚBLICAS ===================================== */ //En functions declaramos la functions publicas const functions = {}; functions.init = async function () { await _initPublicProps(); await _DOMContentLoaded(); }; /* ===================================== FUNCIONES PRIVADAS ===================================== */ const _initPublicProps = async function() { // Obtener referencias de ecomGlobalScripts publicProps.funcsEcomGlobalScripts = window.ecomGlobalScripts?.functions || {}; publicProps.propsEcomGlobalScripts = window.ecomGlobalScripts?.properties || {}; // Configurar debug publicProps.isDebug = (false || publicProps.propsEcomGlobalScripts?.isDebug) ?? false; // Asegurar que querySelectors existe (crearlo si no existe) publicProps.propsEcomGlobalScripts.querySelectors ??= {}; // Agregar las propiedades querySelectors publicProps.propsEcomGlobalScripts.querySelectors.rootSelector = "#ecom-norma-detail-normas-referenced .standards-section"; }; const _DOMContentLoaded = async function () { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") if (publicProps.isDebug) console.log("DOMContentLoaded ecom Norma scripts"); window.ecomGlobalScripts?.functions?.pushViewItemEvent?.({ name: "ISO 10284:1997", id: "018326", category: "Normas ISO" }); }; // ---- Execute Listener DOMContentLoaded ---- document.addEventListener("DOMContentLoaded", async function() { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") //await _DOMContentLoaded(); }); /* ===================================== API PÚBLICA ===================================== */ return { properties: publicProps, // properties public functions: functions // functions public }; })(); window.ecomNormaScripts = window.ecomNormaScripts || (function () { /* ===================================== PROPIEDADES PRIVADAS ===================================== */ const privateProps = window.ecomNormaScripts?.privateProps || { //test1: {}, //test2: 0 }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PRIVADAS ===================================== */ (function initPrivateProps() { /* privateProps.test1 = { test11: "", test111: { test1112: "00,00", test1113: "€", test1114: "00", test1115: "000-00-000", test1116: "0000", test1117: "000" }, test2: "" };*/ })(); /* ===================================== PROPIEDADES PÚBLICAS ===================================== */ const publicProps = { funcsEcomGlobalScripts: null, propsEcomGlobalScripts: null, isDebug: false }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PÚBLICAS ===================================== */ (function initPublicProps() { //publicProps.TEST1 = ""; //publicProps.TEST2 = 0; })(); /* ===================================== FUNCIONES PÚBLICAS ===================================== */ //En functions declaramos la functions publicas const functions = {}; functions.init = async function () { await _initPublicProps(); await _DOMContentLoaded(); }; /* ===================================== FUNCIONES PRIVADAS ===================================== */ const _initPublicProps = async function() { // Obtener referencias de ecomGlobalScripts publicProps.funcsEcomGlobalScripts = window.ecomGlobalScripts?.functions || {}; publicProps.propsEcomGlobalScripts = window.ecomGlobalScripts?.properties || {}; // Configurar debug publicProps.isDebug = (false || publicProps.propsEcomGlobalScripts?.isDebug) ?? false; // Asegurar que querySelectors existe (crearlo si no existe) publicProps.propsEcomGlobalScripts.querySelectors ??= {}; // Agregar las propiedades querySelectors publicProps.propsEcomGlobalScripts.querySelectors.rootSelector = "#ecom-norma-detail-normas-referenced .standards-section"; }; const _DOMContentLoaded = async function () { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") if (publicProps.isDebug) console.log("DOMContentLoaded ecom Norma scripts"); window.ecomGlobalScripts?.functions?.pushViewItemEvent?.({ name: "ISO 10284:1997", id: "018326", category: "Normas ISO" }); }; // ---- Execute Listener DOMContentLoaded ---- document.addEventListener("DOMContentLoaded", async function() { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") //await _DOMContentLoaded(); }); /* ===================================== API PÚBLICA ===================================== */ return { properties: publicProps, // properties public functions: functions // functions public }; })(); window.ecomNormaScripts = window.ecomNormaScripts || (function () { /* ===================================== PROPIEDADES PRIVADAS ===================================== */ const privateProps = window.ecomNormaScripts?.privateProps || { //test1: {}, //test2: 0 }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PRIVADAS ===================================== */ (function initPrivateProps() { /* privateProps.test1 = { test11: "", test111: { test1112: "00,00", test1113: "€", test1114: "00", test1115: "000-00-000", test1116: "0000", test1117: "000" }, test2: "" };*/ })(); /* ===================================== PROPIEDADES PÚBLICAS ===================================== */ const publicProps = { funcsEcomGlobalScripts: null, propsEcomGlobalScripts: null, isDebug: false }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PÚBLICAS ===================================== */ (function initPublicProps() { //publicProps.TEST1 = ""; //publicProps.TEST2 = 0; })(); /* ===================================== FUNCIONES PÚBLICAS ===================================== */ //En functions declaramos la functions publicas const functions = {}; functions.init = async function () { await _initPublicProps(); await _DOMContentLoaded(); }; /* ===================================== FUNCIONES PRIVADAS ===================================== */ const _initPublicProps = async function() { // Obtener referencias de ecomGlobalScripts publicProps.funcsEcomGlobalScripts = window.ecomGlobalScripts?.functions || {}; publicProps.propsEcomGlobalScripts = window.ecomGlobalScripts?.properties || {}; // Configurar debug publicProps.isDebug = (false || publicProps.propsEcomGlobalScripts?.isDebug) ?? false; // Asegurar que querySelectors existe (crearlo si no existe) publicProps.propsEcomGlobalScripts.querySelectors ??= {}; // Agregar las propiedades querySelectors publicProps.propsEcomGlobalScripts.querySelectors.rootSelector = "#ecom-norma-detail-normas-referenced .standards-section"; }; const _DOMContentLoaded = async function () { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") if (publicProps.isDebug) console.log("DOMContentLoaded ecom Norma scripts"); window.ecomGlobalScripts?.functions?.pushViewItemEvent?.({ name: "ISO 10284:1997", id: "018326", category: "Normas ISO" }); }; // ---- Execute Listener DOMContentLoaded ---- document.addEventListener("DOMContentLoaded", async function() { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") //await _DOMContentLoaded(); }); /* ===================================== API PÚBLICA ===================================== */ return { properties: publicProps, // properties public functions: functions // functions public }; })(); window.ecomNormaScripts = window.ecomNormaScripts || (function () { /* ===================================== PROPIEDADES PRIVADAS ===================================== */ const privateProps = window.ecomNormaScripts?.privateProps || { //test1: {}, //test2: 0 }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PRIVADAS ===================================== */ (function initPrivateProps() { /* privateProps.test1 = { test11: "", test111: { test1112: "00,00", test1113: "€", test1114: "00", test1115: "000-00-000", test1116: "0000", test1117: "000" }, test2: "" };*/ })(); /* ===================================== PROPIEDADES PÚBLICAS ===================================== */ const publicProps = { funcsEcomGlobalScripts: null, propsEcomGlobalScripts: null, isDebug: false }; /* ===================================== INICIALIZACIÓN DE PROPERTIES PÚBLICAS ===================================== */ (function initPublicProps() { //publicProps.TEST1 = ""; //publicProps.TEST2 = 0; })(); /* ===================================== FUNCIONES PÚBLICAS ===================================== */ //En functions declaramos la functions publicas const functions = {}; functions.init = async function () { await _initPublicProps(); await _DOMContentLoaded(); }; /* ===================================== FUNCIONES PRIVADAS ===================================== */ const _initPublicProps = async function() { // Obtener referencias de ecomGlobalScripts publicProps.funcsEcomGlobalScripts = window.ecomGlobalScripts?.functions || {}; publicProps.propsEcomGlobalScripts = window.ecomGlobalScripts?.properties || {}; // Configurar debug publicProps.isDebug = (false || publicProps.propsEcomGlobalScripts?.isDebug) ?? false; // Asegurar que querySelectors existe (crearlo si no existe) publicProps.propsEcomGlobalScripts.querySelectors ??= {}; // Agregar las propiedades querySelectors publicProps.propsEcomGlobalScripts.querySelectors.rootSelector = "#ecom-norma-detail-normas-referenced .standards-section"; }; const _DOMContentLoaded = async function () { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") if (publicProps.isDebug) console.log("DOMContentLoaded ecom Norma scripts"); window.ecomGlobalScripts?.functions?.pushViewItemEvent?.({ name: "ISO 10284:1997", id: "018326", category: "Normas ISO" }); }; // ---- Execute Listener DOMContentLoaded ---- document.addEventListener("DOMContentLoaded", async function() { //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded") //await _DOMContentLoaded(); }); /* ===================================== API PÚBLICA ===================================== */ return { properties: publicProps, // properties public functions: functions // functions public }; })(); //TODO: repasar y quitar lo relacionado con selectores y precio. /*TODO: -Se llama a la [async function init()] dentro de aqui [ecomNormaReferencedScript] desde fragment [dxp-ecom-portal/misc/fragments/Collection Tienda/ECOM-Global_functions/index.js] de la siguiente manera: if (typeof window.ecomNormaReferencedScript?.init === "function") { await window.ecomNormaReferencedScript.init(); } */ window.ecomNormaReferencedScript = (function ($) { /* === CONFIG === */ let DEBUG = false; let ROOT_SELECTOR = null; function log(...args) { if (DEBUG) console.log("[ecomNorma]", ...args); } /* === FUNCIONES PRIVADAS === */ function _euros(v) { const n = Number(v) || 0; return n.toLocaleString("es-ES", { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + " €"; } function _uniq(a) { return Array.from(new Set(a)); } function _fill($sel, values, textFn) { const keep = $sel.val(); $sel.empty(); values.forEach(v => { $sel.append($("< //TODO: repasar y quitar lo relacionado con selectores y precio. /*TODO: -Se llama a la [async function init()] dentro de aqui [ecomNormaReferencedScript] desde fragment [dxp-ecom-portal/misc/fragments/Collection Tienda/ECOM-Global_functions/index.js] de la siguiente manera: if (typeof window.ecomNormaReferencedScript?.init === "function") { await window.ecomNormaReferencedScript.init(); } */ window.ecomNormaReferencedScript = (function ($) { /* === CONFIG === */ let DEBUG = false; let ROOT_SELECTOR = null; function log(...args) { if (DEBUG) console.log("[ecomNorma]", ...args); } /* === FUNCIONES PRIVADAS === */ function _euros(v) { const n = Number(v) || 0; return n.toLocaleString("es-ES", { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + " €"; } function _uniq(a) { return Array.from(new Set(a)); } function _fill($sel, values, textFn) { const keep = $sel.val(); $sel.empty(); values.forEach(v => { $sel.append($("r"<<option>", { value: v, text: textFn ? textFn(v) : v })); }); if (keep && values.includes(keep)) $sel.val(keep); else if (values.length) $sel.val(values[0]); } function _relabel($sel, textFn) { $sel.find("option").each(function () { const v = $(this).attr("value"); $(this).text(textFn ? textFn(v) : v); }); } /* === initCarousel — PÚBLICA === */ function initCarousel(force = false) { const $owl = $(ROOT_SELECTOR + " .standards-container"); // no inicializar si no existe, está oculto o no tiene items if (!$owl.length || !$owl.hasClass("owl-carousel") || !$owl.is(':visible') || $owl.children().length === 0) { log("initCarousel abortado: no visible o sin items", $owl); return; } if (force && $owl.hasClass("owl-loaded") && $owl.data("owl.carousel")) { log("initCarousel Destruyendo Owl Carousel existent:", $owl); $owl.trigger('destroy.owl.carousel'); // limpiar también owl-hidden para permitir reinicialización $owl.removeClass('owl-loaded owl-hidden'); // limpiar markup de Owl $owl.find('.owl-stage-outer').children().unwrap(); } if ($owl.length && !$owl.hasClass("owl-loaded") && !$owl.data("owl.carousel")) { $owl.owlCarousel({ nav: true, navText: [ '<'<i class="fa-solid fa-chevron-left">option>", { value: v, text: textFn ? textFn(v) : v })); }); if (keep && values.includes(keep)) $sel.val(keep); else if (values.length) $sel.val(values[0]); } function _relabel($sel, textFn) { $sel.find("option").each(function () { const v = $(this).attr("value"); $(this).text(textFn ? textFn(v) : v); }); } /* === initCarousel — PÚBLICA === */ function initCarousel(force = false) { const $owl = $(ROOT_SELECTOR + " .standards-container"); // no inicializar si no existe, está oculto o no tiene items if (!$owl.length || !$owl.hasClass("owl-carousel") || !$owl.is(':visible') || $owl.children().length === 0) { log("initCarousel abortado: no visible o sin items", $owl); return; } if (force && $owl.hasClass("owl-loaded") && $owl.data("owl.carousel")) { log("initCarousel Destruyendo Owl Carousel existent:", $owl); $owl.trigger('destroy.owl.carousel'); // limpiar también owl-hidden para permitir reinicialización $owl.removeClass('owl-loaded owl-hidden'); // limpiar markup de Owl $owl.find('.owl-stage-outer').children().unwrap(); } if ($owl.length && !$owl.hasClass("owl-loaded") && !$owl.data("owl.carousel")) { $owl.owlCarousel({ nav: true, navText: [ '</ i�wa>', '>', ' i class="fa-solid fa-chevron-right"><</>' ], loop: false, dots: false, pagination: false, margin: 25, autoHeight: false, responsive: { 0: { items: 1 }, 500: { items: 1 }, 767: { items: 2 }, 1000: { items: 3 }, 1200: { items: 4 } } }); $owl.off("initialized.owl.carousel refreshed.owl.carousel resized.owl.carousel translated.owl.carousel") .on("initialized.owl.carousel refreshed.owl.carousel resized.owl.carousel translated.owl.carousel", adjustHeights); log("initCarousel executed"); } } /* === initCard — PÚBLICA === */ function initCard($card) { const dataNode = $card.find("script.normas-data")[0]; let data = []; if (dataNode) { try { data = JSON.parse(dataNode.textContent); } catch {} } const hasData = Array.isArray(data) && data.length > 0; let langMap = {}; const mapNode = $card.find("script.lang-map")[0]; try { if (mapNode) langMap = JSON.parse(mapNode.textContent); } catch {} const $lang = $card.find(".select-language"); const $fmt = $card.find(".select-format"); const $price = $card.find(".price-ae"); const toUC = s => (s || "").toString().toUpperCase(); const labelOf = lang => langMap[toUC(lang)] || lang; const formatsFor = lang => _uniq(data.filter(d => d.language === lang).map(d => d.format)); const languagesFor = fmt => _uniq(data.filter(d => d.format === fmt).map(d => d.language)); const priceOf = (lang, fmt) => { const m = data.find(d => d.language === lang && d.format === fmt); return m ? Number(m.price) || 0 : 0; }; const parsePriceText = (text) => { if (!text) return 0; const clean = String(text).replace(/[^\d,.-]/g, "").trim(); if (!clean) return 0; if (clean.includes(",") && clean.includes(".")) { const normalized = clean.replace(/\./g, "").replace(",", "."); return Number(normalized) || 0; } const normalized = clean.replace(",", "."); return Number(normalized) || 0; }; if (hasData) { function onLanguageChange() { const lang = $lang.val(); const fmts = formatsFor(lang); _fill($fmt, fmts); $price.text(_euros(priceOf(lang, $fmt.val()))); } function onFormatChange() { const fmt = $fmt.val(); const langs = languagesFor(fmt); _fill($lang, langs, labelOf); $price.text(_euros(priceOf($lang.val(), fmt))); } const l0 = $lang.val(); const f0 = $fmt.val(); if (!data.find(d => d.language === l0 && d.format === f0)) onLanguageChange(); else $price.text(_euros(priceOf(l0, f0))); _relabel($lang, labelOf); $lang.off("change.ae").on("change.ae", onLanguageChange); $fmt.off("change.ae").on("change.ae", onFormatChange); } async function onAdd(e) { e.preventDefault(); var entryType = ($card.data('entrytype') || 'Norma'); var code = ($card.data('code') || '').toString(); var codIdioma = ($card.find('.select-language').val() || '').toString(); var codFormato = ($card.find('.select-format').val() || '').toString(); if (!code) code = ($card.find('.title-standard').text() || '').trim(); await window.ecomGlobalScripts.functions.addToCart({ entryType: entryType, code: code, codIdioma: codIdioma, codFormato: codFormato, price: Number(priceOf(codIdioma, codFormato)) || 0, name: ($card.data('title') || '').toString(), amount: 1 }); } $card.find(".standard-button").off("click.ae").on("click.ae", function(e){ const btn = this; const run = () => onAdd(e); const helper = window.ecomGlobalScripts?.functions?.withButtonSpinner; if (typeof helper === "function") { return helper(btn, run, { spinnerClass: "spinner-border spinner-border-sm text-light", mode: "replace" }); } return run(); }); // Evita que Owl Carousel interprete el click como drag horizontal $card.find(".standard-button") .off("pointerdown.owl mousedown.owl touchstart.owl") .on("pointerdown.owl mousedown.owl touchstart.owl", function(e){ e.stopPropagation(); }); } /* === adjustHeights — PÚBLICA === */ function adjustHeights() { if ($(window).width() > 766.98) { let hT = 0, hD = 0; $(ROOT_SELECTOR + " .title-standard").css("height","auto").each(function(){ hT=Math.max(hT,$(this).outerHeight()); }); $(ROOT_SELECTOR + " .description-text").css("height","auto").each(function(){ hD=Math.max(hD,$(this).outerHeight()); }); $(ROOT_SELECTOR + " .title-standard").height(hT); $(ROOT_SELECTOR + " .description-text").height(hD); } else { $(ROOT_SELECTOR + " .title-standard, .description-text").css("height","auto"); } log("adjustHeights executed"); } /* === init — PÚBLICA === */ async function init() { // debug externo DEBUG = window.ecomNormaScripts?.properties?.isDebug === true; // prefijo para todos los selectores ROOT_SELECTOR = window.ecomGlobalScripts?.properties?.querySelectors?.rootSelector || window.ecomNormaScripts?.properties?.querySelectors?.rootSelector || "#ecom-norma-detail-normas-referenced .standards-section"; log("window.ecomNormaReferencedScript init"); $(ROOT_SELECTOR + " .item-standard").each(function(){ initCard($(this)); }); initCarousel(true); adjustHeights(); $(window).off("resize.standards").on("resize.standards", adjustHeights); log("init executed"); } /* === API pública === */ return { init, initCard, adjustHeights, initCarousel }; })(jQuery); </>' ], loop: false, dots: false, pagination: false, margin: 25, autoHeight: false, responsive: { 0: { items: 1 }, 500: { items: 1 }, 767: { items: 2 }, 1000: { items: 3 }, 1200: { items: 4 } } }); $owl.off("initialized.owl.carousel refreshed.owl.carousel resized.owl.carousel translated.owl.carousel") .on("initialized.owl.carousel refreshed.owl.carousel resized.owl.carousel translated.owl.carousel", adjustHeights); log("initCarousel executed"); } } /* === initCard — PÚBLICA === */ function initCard($card) { const dataNode = $card.find("script.normas-data")[0]; let data = []; if (dataNode) { try { data = JSON.parse(dataNode.textContent); } catch {} } const hasData = Array.isArray(data) && data.length > 0; let langMap = {}; const mapNode = $card.find("script.lang-map")[0]; try { if (mapNode) langMap = JSON.parse(mapNode.textContent); } catch {} const $lang = $card.find(".select-language"); const $fmt = $card.find(".select-format"); const $price = $card.find(".price-ae"); const toUC = s => (s || "").toString().toUpperCase(); const labelOf = lang => langMap[toUC(lang)] || lang; const formatsFor = lang => _uniq(data.filter(d => d.language === lang).map(d => d.format)); const languagesFor = fmt => _uniq(data.filter(d => d.format === fmt).map(d => d.language)); const priceOf = (lang, fmt) => { const m = data.find(d => d.language === lang && d.format === fmt); return m ? Number(m.price) || 0 : 0; }; const parsePriceText = (text) => { if (!text) return 0; const clean = String(text).replace(/[^\d,.-]/g, "").trim(); if (!clean) return 0; if (clean.includes(",") && clean.includes(".")) { const normalized = clean.replace(/\./g, "").replace(",", "."); return Number(normalized) || 0; } const normalized = clean.replace(",", "."); return Number(normalized) || 0; }; if (hasData) { function onLanguageChange() { const lang = $lang.val(); const fmts = formatsFor(lang); _fill($fmt, fmts); $price.text(_euros(priceOf(lang, $fmt.val()))); } function onFormatChange() { const fmt = $fmt.val(); const langs = languagesFor(fmt); _fill($lang, langs, labelOf); $price.text(_euros(priceOf($lang.val(), fmt))); } const l0 = $lang.val(); const f0 = $fmt.val(); if (!data.find(d => d.language === l0 && d.format === f0)) onLanguageChange(); else $price.text(_euros(priceOf(l0, f0))); _relabel($lang, labelOf); $lang.off("change.ae").on("change.ae", onLanguageChange); $fmt.off("change.ae").on("change.ae", onFormatChange); } async function onAdd(e) { e.preventDefault(); var entryType = ($card.data('entrytype') || 'Norma'); var code = ($card.data('code') || '').toString(); var codIdioma = ($card.find('.select-language').val() || '').toString(); var codFormato = ($card.find('.select-format').val() || '').toString(); if (!code) code = ($card.find('.title-standard').text() || '').trim(); await window.ecomGlobalScripts.functions.addToCart({ entryType: entryType, code: code, codIdioma: codIdioma, codFormato: codFormato, price: Number(priceOf(codIdioma, codFormato)) || 0, name: ($card.data('title') || '').toString(), amount: 1 }); } $card.find(".standard-button").off("click.ae").on("click.ae", function(e){ const btn = this; const run = () => onAdd(e); const helper = window.ecomGlobalScripts?.functions?.withButtonSpinner; if (typeof helper === "function") { return helper(btn, run, { spinnerClass: "spinner-border spinner-border-sm text-light", mode: "replace" }); } return run(); }); // Evita que Owl Carousel interprete el click como drag horizontal $card.find(".standard-button") .off("pointerdown.owl mousedown.owl touchstart.owl") .on("pointerdown.owl mousedown.owl touchstart.owl", function(e){ e.stopPropagation(); }); } /* === adjustHeights — PÚBLICA === */ function adjustHeights() { if ($(window).width() > 766.98) { let hT = 0, hD = 0; $(ROOT_SELECTOR + " .title-standard").css("height","auto").each(function(){ hT=Math.max(hT,$(this).outerHeight()); }); $(ROOT_SELECTOR + " .description-text").css("height","auto").each(function(){ hD=Math.max(hD,$(this).outerHeight()); }); $(ROOT_SELECTOR + " .title-standard").height(hT); $(ROOT_SELECTOR + " .description-text").height(hD); } else { $(ROOT_SELECTOR + " .title-standard, .description-text").css("height","auto"); } log("adjustHeights executed"); } /* === init — PÚBLICA === */ async function init() { // debug externo DEBUG = window.ecomNormaScripts?.properties?.isDebug === true; // prefijo para todos los selectores ROOT_SELECTOR = window.ecomGlobalScripts?.properties?.querySelectors?.rootSelector || window.ecomNormaScripts?.properties?.querySelectors?.rootSelector || "#ecom-norma-detail-normas-referenced .standards-section"; log("window.ecomNormaReferencedScript init"); $(ROOT_SELECTOR + " .item-standard").each(function(){ initCard($(this)); }); initCarousel(true); adjustHeights(); $(window).off("resize.standards").on("resize.standards", adjustHeights); log("init executed"); } /* === API pública === */ return { init, initCard, adjustHeights, initCarousel }; })(jQuery);
  • URL del producto: https://aenorportalesweb-uat.lxc.liferay.com/web/tienda/e/{friendlyURL_display-page-template}/{ClassNameId-CPDefinition}/{CPDefinition ID (Field: product.id)}
    por ejemplo: https://aenorportalesweb-uat.lxc.liferay.com/web/tienda/e/producto-tienda/30025/${cpDefinitionId}

Nombre producto:

ISO 17338:2009

URL producto tienda:

{"nofollow":true,"url":"https://tienda-uat.aenor.com/e/normas-relacionadas/30025/156833860"}

CPDefinitionId producto:

156833860

CProductId producto:

156833861