An error occurred while processing the template.
The following has evaluated to null or missing:
==> channelResponse.items [in template "34352066712900#33336#null" at line 4, column 20]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign channel = channelResponse.ite... [in template "34352066712900#33336#null" at line 4, column 1]
----
1<#-- Variables -->
2<#assign isDebug = false>
3<#assign channelResponse = restClient.get("/headless-commerce-delivery-catalog/v1.0/channels?filter=name eq 'Aenor Tienda'")>
4<#assign channel = channelResponse.items[0]>
5<#assign channelId = channel.id>
6<#assign product = getProduct(channelId, CPDefinition_cProductId.getData()) />
7
8<#-- Product data -->
9<#assign displayDateProduct = CPDefinition_displayDate.getData() />
10<#assign productId = product.productId />
11<#assign cpDefinitionId = product.id />
12<#assign productERC = product.externalReferenceCode />
13
14<#assign categoriesProduct = getProductCategories(channelId, productId) />
15<#assign hasProductCategoriaTipoEntidadLibro = isVocabularyNameIntoCategories(categoriesProduct, 'entity type', 'libro') />
16<#assign hasProductCategoriaTipoEntidadNorma = isVocabularyNameIntoCategories(categoriesProduct, 'entity type', 'norma') />
17<#assign hasProductCategoriaTipoEntidadColeccionTematica = isVocabularyNameIntoCategories(categoriesProduct, 'entity type', 'coleccion tematica') />
18
19
20
21<#-- Functions -->
22<#function getProductCategories channelId productId>
23 <#return restClient.get("/headless-commerce-delivery-catalog/v1.0/channels/${channelId}/products/${productId}/categories?sort=vocabulary").items>
24</#function>
25
26
27<#function isVocabularyNameIntoCategories categories vocabulary name>
28 <#assign found = false />
29
30 <#if categories?has_content && vocabulary?has_content && name?has_content>
31
32 <#assign vocabNorm = normalize(vocabulary) />
33 <#assign nameNorm = normalize(name) />
34
35 <#list categories as category>
36 <#if !found>
37 <#assign catVocabNorm = normalize(category.vocabulary) />
38 <#assign catNameNorm = normalize(category.name) />
39
40 <#if catVocabNorm == vocabNorm && catNameNorm == nameNorm>
41 <#assign found = true />
42 </#if>
43 </#if>
44 </#list>
45
46 </#if>
47
48 <#return found>
49</#function>
50
51
52<#function getProduct channelId productId>
53 <#return restClient.get("/headless-commerce-delivery-catalog/v1.0/channels/${channelId}/products/${productId}")>
54</#function>
55
56
57<#function normalize text onlyAccents = false>
58 <#-- proteger null -->
59 <#if !text?has_content>
60 <#return "">
61 </#if>
62
63 <#assign t = text />
64
65 <#-- quitar acentos -->
66 <#assign t = t
67 ?replace("á","a")?replace("é","e")?replace("í","i")
68 ?replace("ó","o")?replace("ú","u")?replace("ü","u")
69 ?replace("ñ","n")
70 ?replace("Á","A")?replace("É","E")?replace("Í","I")
71 ?replace("Ó","O")?replace("Ú","U")?replace("Ü","U")
72 ?replace("Ñ","N")
73 />
74
75 <#-- si NO es solo acentos, normalización completa -->
76 <#if !onlyAccents>
77 <#assign t = t?lower_case />
78 <#assign t = t?trim />
79 <#assign t = t?replace("\\s+", " ", "r") />
80 </#if>
81
82 <#return t>
83</#function>
84
85
86
87<#-- Div with data -->
88<#-- Se incluye desde dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Generic-Scripts.ftl -->
89<#--
90 <#if hasProductCategoriaTipoEntidadLibro>
91 <div id="ecom-scripts">
92 <div class="data-product-wrapper"
93 data-product-id="${productId}"
94 data-product-erc="${productERC}"
95 data-product-cpdefinition-id="${cpDefinitionId}"
96 data-channel-id="${channelId}"
97 data-product-islibro="${hasProductCategoriaTipoEntidadLibro?c}"
98 data-product-isnorma="${hasProductCategoriaTipoEntidadNorma?c}"
99 data-product-iscolecciontematica="${hasProductCategoriaTipoEntidadColeccionTematica?c}"
100 />
101 </div>
102 </#if>
103-->
104
105<#-- Script JS -->
106<#if hasProductCategoriaTipoEntidadLibro>
107
108
109 <script id="ecom-libro-scripts">
110
111 window.ecomLibroScripts = window.ecomLibroScripts || (function () {
112
113 /* =====================================
114 PROPIEDADES PRIVADAS
115 ===================================== */
116 const privateProps = window.ecomLibroScripts?.privateProps || {
117 querySelectors: {}
118 };
119
120 /* =====================================
121 INICIALIZACIÓN DE PROPERTIES PRIVADAS
122 ===================================== */
123 (function initPrivateProps() {
124 /*privateProps.test1 = {
125 test11: "",
126 test111: {
127 test1112: "00,00",
128 test1113: "€",
129 test1114: "00",
130 test1115: "000-00-000",
131 test1116: "0000",
132 test1117: "000"
133 },
134 test2: ""
135 };
136 */
137 })();
138
139 /* =====================================
140 PROPIEDADES PÚBLICAS
141 ===================================== */
142
143 const publicProps = {
144 funcsEcomGlobalScripts: null,
145 propsEcomGlobalScripts: null,
146 isDebug: false
147 };
148
149 /* =====================================
150 INICIALIZACIÓN DE PROPERTIES PÚBLICAS
151 ===================================== */
152 (function initPublicProps() {
153
154 // Obtener referencias de ecomGlobalScripts
155 publicProps.funcsEcomGlobalScripts = window.ecomGlobalScripts?.functions || {};
156 publicProps.propsEcomGlobalScripts = window.ecomGlobalScripts?.properties || {};
157
158 // Configurar debug
159 publicProps.isDebug = (${isDebug?c} || publicProps.propsEcomGlobalScripts?.isDebug) ?? false;
160
161 })();
162
163 /* =====================================
164 FUNCIONES PÚBLICAS
165 ===================================== */
166
167 //En functions declaramos la functions publicas
168 const functions = {};
169
170 functions.init = async function () {
171 await _DOMContentLoaded();
172 };
173
174 /* =====================================
175 FUNCIONES PRIVADAS
176 ===================================== */
177
178 const _DOMContentLoaded = async function () {
179 //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded")
180
181 if (publicProps.isDebug) console.log("DOMContentLoaded ecom Libro scripts");
182
183 window.ecomGlobalScripts?.functions?.pushViewItemEvent?.({
184 name: "${product.name?js_string}",
185 id: "${productERC?js_string}",
186 category: "Publicaciones"
187 });
188
189 //Obtenemos elementos.
190 privateProps.querySelectors.modal = document.getElementById('author-modal');
191 privateProps.querySelectors.modalContent = document.querySelector('.modal-content');
192 privateProps.querySelectors.nameField = document.getElementById('modal-name');
193 privateProps.querySelectors.infoField = document.getElementById('modal-info');
194 privateProps.querySelectors.closeCross = privateProps.querySelectors.modal.querySelector('.modal-close');
195 privateProps.querySelectors.closeBtn = privateProps.querySelectors.modal.querySelector('.modal-btn-close');
196
197 //TODO:document.querySelectorAll('.print-object-json-content').forEach(d=>d.textContent=d.textContent.replace(/[\r\n]+/g,''));
198
199 document.querySelectorAll('.autor-add').forEach(btn => {
200 btn.addEventListener('click', () => {
201 const nombre = btn.previousElementSibling.textContent;
202 const biografia = btn.getAttribute('data-author-biografia') || Liferay.Language.get("ecom-biografia_no_disponible");
203 privateProps.querySelectors.nameField.textContent = nombre;
204 privateProps.querySelectors.infoField.textContent = biografia;
205 privateProps.querySelectors.modal.classList.add('show');
206 });
207 });
208
209 // Delegación de clicks dentro del modal
210 privateProps.querySelectors.modal.addEventListener('click', (e) => {
211
212 if (e.target.closest('.modal-close') || e.target.closest('.modal-btn-close')) {
213 // Cierra con la X o el botón Cerrar
214 privateProps.querySelectors.modal.classList.remove('show');
215 } else if (!privateProps.querySelectors.modalContent.contains(e.target)) {
216 // Cierra si se hace click fuera del contenido
217 privateProps.querySelectors.modal.classList.remove('show');
218 }
219
220 });
221
222 // Cierra con la tecla ESC
223 document.addEventListener('keydown', (e) => {
224 if (e.key === 'Escape') {
225 privateProps.querySelectors.modal.classList.remove('show');
226 }
227 });
228
229 };
230
231 /* =====================================
232 FUNCIONES PRIVADAS
233 ===================================== */
234 //No hay funciones privadas
235
236 // ---- Execute Listener DOMContentLoaded ----
237 document.addEventListener("DOMContentLoaded", async function() {
238 //Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded")
239 //await _DOMContentLoaded();
240 });
241
242 /* =====================================
243 API PÚBLICA
244 ===================================== */
245 return {
246 properties: publicProps, // properties public
247 functions: functions // functions public
248 };
249
250 })();
251
252 </script>
253
254</#if>
UNE-EN IEC 60475:2023
Método de toma de muestras de líquidos aislantes.
| Edition date: |
2023-03-29
In Force
|
|---|---|
| Available languages: | Spanish, English |
| ICS: | 29.040-Insulating fluids, 29.035.01-Insulating materials in general |
| CTN: | CTN 207/SC 10 - Fluidos para aplicaciones electrotécnicas |
|
International Equivalence |
Identic EN IEC 60475:2022 Identic IEC 60475:2022 |
|
Otras Versiones Vigentes |
Conjunta UNE-EN 60475:2013 |










