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: "IEC 60216-5:2022", id: "61340", category: "Normas IEC" }); }; // ---- 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 }; })();

Training course for students and employees within the framework of the corporate social responsibility - Innovative pedagogy to develop their corporate social responsibility within the framework of the corporate social responsibility : Pedagogy ICSR (Individual Corporate Social Responsibility)

(function () { var container = document.getElementById("ecom-norma-header"); if (!container) return; var btn = container.querySelector(".extract-btn"); if (!btn) return; var rawCode = btn.getAttribute("data-code"); if (!rawCode || rawCode.indexOf("-") === -1) return; var organism = rawCode.split("-")[0]; var code = rawCode.split("-")[1]; var downloadUrl = ""; var fileName = "extracto.pdf"; async function waitForGlobalScripts(timeoutMs) { var start = Date.now(); return new Promise(function (resolve, reject) { (function poll() { if (window.ecomGlobalScripts?.functions?.getFieldCXCustomConfig && window.ecomGlobalScripts?.properties?.cxCustomConfigsNames) return resolve(); if (Date.now() - start > timeoutMs) return reject(new Error("ecomGlobalScripts no disponible")); requestAnimationFrame(poll); })(); }); } async function resolveExtract() { try { await waitForGlobalScripts(5000); var apiHost = await window.ecomGlobalScripts.functions.getFieldCXCustomConfig( window.ecomGlobalScripts.properties.cxCustomConfigsNames.defaultName, "webApiUrl" ); var infoRes = await fetch(apiHost + "/tijuana/normaExtract/" + encodeURIComponent(organism) + "/" + encodeURIComponent(code)); if (!infoRes.ok) return; var info = await infoRes.json(); if (info.docId) { downloadUrl = apiHost + "/tijuana/downloadNormaExtract/" + encodeURIComponent(organism) + "/" + encodeURIComponent(info.docId); fileName = info.fileName || "extracto.pdf"; btn.style.display = ""; } } catch (err) { console.error("Error resolviendo extracto:", err); } } var spinner = document.getElementById("ecom-extract-spinner"); btn.addEventListener("click", async function () { if (!downloadUrl) return; btn.disabled = true; if (spinner) spinner.style.display = "flex"; try { var fileRes = await fetch(downloadUrl); if (!fileRes.ok) throw new Error("Error descargando el extracto"); var blob = await fileRes.blob(); var url = URL.createObjectURL(blob); var a = document.createElement("a"); a.href = url; a.download = fileName; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } catch (err) { console.error("Error descargando extracto:", err); } finally { btn.disabled = false; if (spinner) spinner.style.display = "none"; } }); resolveExtract(); })();
  • 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:

IEC 60216-5:2022

URL producto tienda:

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

CPDefinitionId producto:

153359814

CProductId producto:

153359815