Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> restClient.get("/c/bookinfos/?filter=r_bookInfo_CPDefinitionId eq '${CPDefinition_cpDefinitionId.getData()}'").items[0]  [in template "34352066712900#33336#null" at line 65, column 25]

----
Tip: It's the final [] step 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 bookInfo = restClient.get("/c...  [in template "34352066712900#33336#null" at line 65, column 5]
----
1<#assign channelResponse = restClient.get("/headless-commerce-delivery-catalog/v1.0/channels?filter=name eq 'Aenor Tienda'")> 
2<#assign channel = channelResponse.items[0]> 
3<#assign channelId = channel.id> 
4<#assign categories = restClient.get("/headless-commerce-delivery-catalog/v1.0/channels/${channelId}/products/${CPDefinition_cProductId.getData()}/categories").items> 
5 
6<#assign hasProductCategoriaTipoEntidadLibro = isVocabularyNameIntoCategories(categories, 'entity type', 'libro') /> 
7<#assign hasProductCategoriaTipoEntidadNorma = isVocabularyNameIntoCategories(categories, 'entity type', 'norma') /> 
8<#assign hasProductCategoriaTipoEntidadColeccionTematica = isVocabularyNameIntoCategories(categories, 'entity type', 'coleccion tematica') /> 
9 
10<#function isVocabularyNameIntoCategories categories vocabulary name> 
11    <#assign found = false /> 
12 
13    <#if categories?has_content && vocabulary?has_content && name?has_content> 
14 
15        <#assign vocabNorm = normalize(vocabulary) /> 
16        <#assign nameNorm  = normalize(name) /> 
17 
18        <#list categories as category> 
19            <#if !found> 
20                <#assign catVocabNorm = normalize(category.vocabulary) /> 
21                <#assign catNameNorm  = normalize(category.name) /> 
22 
23                <#if catVocabNorm == vocabNorm && catNameNorm == nameNorm> 
24                    <#assign found = true /> 
25                </#if> 
26            </#if> 
27        </#list> 
28 
29    </#if> 
30 
31    <#return found> 
32</#function> 
33 
34<#function normalize text onlyAccents = false> 
35    <#-- proteger null --> 
36    <#if !text?has_content> 
37        <#return ""> 
38    </#if> 
39 
40    <#assign t = text /> 
41 
42    <#-- quitar acentos --> 
43    <#assign t = t 
44        ?replace("á","a")?replace("é","e")?replace("í","i") 
45        ?replace("ó","o")?replace("ú","u")?replace("ü","u") 
46        ?replace("ñ","n") 
47        ?replace("Á","A")?replace("É","E")?replace("Í","I") 
48        ?replace("Ó","O")?replace("Ú","U")?replace("Ü","U") 
49        ?replace("Ñ","N") 
50    /> 
51 
52    <#-- si NO es solo acentos, normalización completa --> 
53    <#if !onlyAccents> 
54        <#assign t = t?lower_case /> 
55        <#assign t = t?trim /> 
56        <#assign t = t?replace("\\s+", " ", "r") /> 
57    </#if> 
58 
59    <#return t> 
60</#function> 
61 
62<#if hasProductCategoriaTipoEntidadLibro> 
63    <#assign name = htmlUtil.stripHtml(CPDefinition_name.getData())?js_string?replace("\\n", "")?trim> 
64    <#assign description = htmlUtil.stripHtml(CPDefinition_description.getData())?js_string?replace("\\n", "")?replace("     ", "")?replace("    ", "")?replace("   ", "")?replace("  ", "")?trim?truncate(200, '')?trim> 
65    <#assign bookInfo = restClient.get("/c/bookinfos/?filter=r_bookInfo_CPDefinitionId eq '${CPDefinition_cpDefinitionId.getData()}'").items[0]> 
66    <#assign imageUrl = "${themeDisplay.getPortalURL()}/documents/d/global/${bookInfo.cubierta}"> 
67    <#assign books = restClient.get("/c/books/?filter=r_books_CPDefinitionId eq '${CPDefinition_cpDefinitionId.getData()}'").items> 
68 
69    <script type="application/ld+json"> 
70
71        "@context": "https://schema.org/", 
72        "@type": "Product", 
73        "name": "${name}", 
74        "image": "${imageUrl}", 
75        "description": "${description}", 
76        "sku": "POR_DEFINIR" 
77        "brand": { 
78            "@type": "Brand", 
79            "name": "${bookInfo.editorial}", 
80        }, 
81        <#if books?? && books?has_content> 
82        <#list books as book>  
83        "offers": {  
84            "@type": "Offer",  
85            "price": "${book.price}",  
86            "priceCurrency": "EUR", 
87            "category": "${book.codFormat}", 
88            "availability": "https://schema.org/InStock", 
89            "itemOffered": { 
90                "@type": "CreativeWork", 
91                "inLanguage": "${book.codLanguage}" 
92
93
94        </#list> 
95        </#if> 
96
97    </script> 
98</#if> 
99 
100<#if hasProductCategoriaTipoEntidadNorma> 
101    <#assign name = htmlUtil.stripHtml(CPDefinition_name.getData())?js_string?replace("\\n", "")?trim> 
102    <#assign description = htmlUtil.stripHtml(CPDefinition_description.getData())?js_string?replace("\\n", "")?replace("     ", "")?replace("    ", "")?replace("   ", "")?replace("  ", "")?trim?truncate(200, '')?trim> 
103    <#assign organism = getOrganism(categories, 'organismos') /> 
104    <#assign imageUrl = "${themeDisplay.getPortalURL()}/documents/d/global/${organism}"> 
105    <#assign standards = restClient.get("/c/standards/?filter=r_standards_CPDefinitionId eq '${CPDefinition_cpDefinitionId.getData()}'").items> 
106 
107    <script type="application/ld+json"> 
108
109        "@context": "https://schema.org/", 
110        "@type": "Product", 
111        "name": "${name}", 
112        "image": "${imageUrl}", 
113        "description": "${description}", 
114        "sku": "POR_DEFINIR" 
115        "brand": { 
116            "@type": "Brand", 
117            "name": "${organism}", 
118        }, 
119        <#if standards?? && standards?has_content> 
120        <#list standards as standard>  
121        "offers": {  
122            "@type": "Offer",  
123            "price": "${standard.price}",  
124            "priceCurrency": "EUR", 
125            "category": "${standard.format}", 
126            "availability": "https://schema.org/InStock", 
127            "itemOffered": { 
128                "@type": "CreativeWork", 
129                "inLanguage": "${standard.language}" 
130
131
132        </#list> 
133        </#if> 
134
135    </script> 
136 
137    <#function getOrganism categories vocabulary> 
138        <#assign organism = ""> 
139        <#assign vocabNorm = normalize(vocabulary)> 
140 
141        <#list categories as category> 
142                <#assign catVocabNorm = normalize(category.vocabulary) /> 
143                <#if catVocabNorm == vocabNorm> 
144                    <#assign organism = category.name> 
145                    <#if organism == "EN" || organism == "CEN" || organism == "CENELEC"> 
146                        <#assign organism = "UNE"> 
147                    </#if> 
148                </#if> 
149        </#list> 
150        <#return organism> 
151    </#function> 
152</#if> 
153 
154<#if hasProductCategoriaTipoEntidadColeccionTematica> 
155    <#assign name = htmlUtil.stripHtml(CPDefinition_name.getData())?js_string?replace("\\n", "")?trim> 
156    <#assign description = htmlUtil.stripHtml(CPDefinition_description.getData())?js_string?replace("\\n", "")?replace("     ", "")?replace("    ", "")?replace("   ", "")?replace("  ", "")?trim?truncate(200, '')?trim> 
157    <#assign product = restClient.get("/headless-commerce-delivery-catalog/v1.0/channels/${channelId}/products/${CPDefinition_cProductId.getData()}")> 
158    <#assign imageUrl = "${themeDisplay.getPortalURL()}/documents/d/tienda/${product.externalReferenceCode}"> 
159    <#assign thematicCollections = restClient.get("/c/thematiccollections/?filter=r_thematicCollection_CPDefinitionId eq '${CPDefinition_cpDefinitionId.getData()}'").items> 
160 
161    <#if thematicCollections?? && thematicCollections?has_content> 
162        <#assign price = getPrice(thematicCollections)> 
163    </#if> 
164 
165    <#function getPrice thematicCollections> 
166        <#assign price = 0> 
167        <#list thematicCollections as thematicCollection> 
168            <#if price == 0> 
169                <#assign price = thematicCollection.price> 
170            <#else> 
171                <#if thematicCollection.precio < price> 
172                    <#assign price = thematicCollection.price> 
173                </#if> 
174            </#if> 
175        </#list> 
176        <#return price> 
177    </#function> 
178 
179    <script type="application/ld+json"> 
180
181        "@context": "https://schema.org/", 
182        "@type": "Product", 
183        "name": "${name}", 
184        "image": "${imageUrl}", 
185        "description": "${description}", 
186        "brand": { 
187            "@type": "Brand", 
188            "name": "AENOR", 
189        },     
190        "offers": {  
191            "@type": "Offer",  
192            "price": "${price}",  
193            "priceCurrency": "EUR", 
194            "category": "Lectura", 
195            "availability": "https://schema.org/InStock", 
196            "itemOffered": { 
197                "@type": "CreativeWork", 
198                "inLanguage": "es" 
199
200
201
202    </script> 
203</#if> 
-50% de descuento* Si compras la misma norma UNE en distintos idiomas. * Dto. sobre el pvp inferior. Ver condiciones
IEC White Paper Semantic Interoperability: 2019

IEC White Paper Semantic Interoperability: 2019

Editorial:

¿Abrumado/a por la IA?

Pasa de la teoría a la práctica con el Taller de IA: Fundamentos Prácticos y Maestría. Próximo 4 de Junio

¡RESERVA TU PLAZA AQUÍ!
Equipo trabajando en una oficina moderna

Los seres humanos utilizan palabras, diagramas, imágenes, contexto, pero también sonidos, expresiones faciales o lenguaje corporal para ser entendidos. Las máquinas utilizan modelos de datos e información, así como algoritmos para manipular la información, y los conceptos humanos deben traducirse para su uso por máquinas. Debido al número exponencialmente creciente de sistemas que recopilan, procesan y comparten datos, las máquinas necesitan cada vez más poder comunicarse entre sí sin la intervención de humanos. Este documento da respuesta a cómo los estándares pueden proporcionar estructuras que permitan que las máquinas interactúen de manera verdaderamente independiente.

El libro en palabras del autor

Ultricies magna feugiat malesuada sociosqu varius vivamus cubilia parturient, himenaeos vitae vehicula nam placerat netus urna platea, nostra rutrum felis mattis penatibus velit quisque.

Button
Preguntas frecuentes ¿Tienes alguna duda sobre nuestros productos?

Respuesta 2

Desde la web

Libros y normas