Implementos para el Sector Industrial

Implementos para el Sector Industrial

Ponemos a tu disposición un amplio rango de implementos y herramientas Cat para el sector industrial de la más alta calidad.

Ponemos a tu disposición un amplio rango de implementos y herramientas Cat para el sector industrial de la más alta calidad.

Se ha producido un error al procesar la plantilla.
Denied access to model object as it does not belong to current company 14306307

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #list attachmentFiles as attachmentFile  [in template "14306307#14306335#12373263" at line 118, column 33]
----
1<#include  "${templatesPath}/10241186"> 
2<#assign objectDefinitionId = 14695654> 
3<#assign objectDefinitionService = serviceLocator.findService("com.liferay.object.service.ObjectDefinitionService")> 
4<#assign objectEntryLocalService = serviceLocator.findService("com.liferay.object.service.ObjectEntryLocalService")> 
5<#assign objectRelationshipService = serviceLocator.findService("com.liferay.object.service.ObjectRelationshipService")> 
6<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")> 
7<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 
8<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
9<#assign cpAttachmentFileEntryService = serviceLocator.findService("com.liferay.commerce.product.service.CPAttachmentFileEntryService")> 
10<#assign assetCategoryPropertyService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyService")> 
11<#assign dlAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")/> 
12<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
13<#assign friendlyURLEntryLocalService = serviceLocator.findService("com.liferay.friendly.url.service.FriendlyURLEntryLocalService")> 
14<#assign className = objectDefinitionService.getObjectDefinition(objectDefinitionId).getClassName() /> 
15<#assign classNameId = classNameLocalService.getClassNameId(className) /> 
16<#assign groupId = themeDisplay.getScopeGroupId()> 
17<#assign portalURL = themeDisplay.getPortalURL()> 
18<#assign assetCategoryClassName = "com.liferay.asset.kernel.model.AssetCategory" /> 
19<#assign assetCategoryClassNameId = classNameLocalService.getClassNameId(assetCategoryClassName) /> 
20<section class="grid-productos pt-40 pb-40 m-pt-20 m-pb-20"> 
21    <div class="cc"> 
22 
23        <div class="toggle-sys mb-30 tar df aic jce p-20 bg-white" id="metric-imperial-button"> 
24            <label class="font-12 mr-10"><@liferay_ui["message"] key="finanzauto.products.unidades.medida" /> : </label> 
25            <div class="dfc mt-0 mb-0"> 
26                <p onclick="toggleElements('metric')" id="metric" 
27                   class="cp mt-0 btn-master  bg-primary h-40 "><@liferay_ui["message"] key="finanzauto.products.metrico" /></p> 
28                <p onclick="toggleElements('imperial')" id="imperial" 
29                   class="cp mt-0 btn-master ml-10 h-40"><@liferay_ui["message"] key="finanzauto.products.imperial" /></p> 
30            </div> 
31            <#-- <button onclick="toggleElements()" id="toggleButton"  class="btn-master  bg-primary h-40 c-white">Imperial</button> --> 
32        </div> 
33<#assign articleId = .vars['reserved-article-id'].data /> 
34<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
35<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
36<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(scopeGroupId), articleId) /> 
37<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.resourcePrimKey) /> 
38<#assign categories =asset.getCategories() /> 
39 
40        <#if categories?has_content> 
41            <#list categories as curAssetCategory> 
42                <#assign categoryId = curAssetCategory.getCategoryId() /> 
43                <#assign categoryProperties = assetCategoryPropertyService.getCategoryProperties(categoryId)/> 
44                ${curAssetCategory.setName("99")} 
45                <#list categoryProperties as categoryProperty> 
46                    <#assign key=categoryProperty["key"]/> 
47                    <#if (key == "SORT") > 
48                        ${curAssetCategory.setName(categoryProperty["value"])} 
49                    </#if> 
50                </#list> 
51            </#list> 
52 
53            <#assign categories = categories?sort_by("name")> 
54            <#list categories as curAssetCategory> 
55                <#assign categoryHreflist = friendlyURLEntryLocalService.getFriendlyURLEntries(groupId,assetCategoryClassNameId, curAssetCategory.categoryId)/> 
56                    
57									<#assign categoryHrefLocale = ""/> 
58                 <#list categoryHreflist as categoryHref> 
59								 <#attempt ><#assign categoryHrefLocale = friendlyURLEntryLocalService.getFriendlyURLEntryLocalization(categoryHref.getFriendlyURLEntryId(),locale)/> 
60                <#recover></#attempt > 
61                  </#list> 
62            <#-- ------------- Saber si mostramos el  "Ver todos" -------------  --> 
63                <#assign showChilds = true /> 
64                <#assign categoryId = curAssetCategory.getCategoryId() /> 
65                <#assign categoryProperties = assetCategoryPropertyService.getCategoryProperties(categoryId)/> 
66                <#list categoryProperties as categoryProperty> 
67                    <#assign key=categoryProperty["key"]/> 
68                    <#if (key == "DONT_SHOW_CHILDS") > 
69                        <#assign showChilds = false /> 
70                    </#if> 
71                </#list> 
72                <#assign categoryHref = "/${categoryHrefLocale.getUrlTitle()?replace('/g/','/')}"/> 
73                <#assign categoryName = curAssetCategory.getTitle(locale) /> 
74                <#assign allObjectsValues =[] /> 
75 
76            <#-- ------------- Productos de la categoria -------------  --> 
77                <#assign hits = assetEntryLocalService.search(companyId,[groupId],0,className,"","","",categoryId+"","",0,true,0,99).getDocs()> 
78            <#-- ------------- Si no hay productos, mostramos los de sus hijos -------------  --> 
79                <#if (hits?size==0) > 
80                    <#assign  childCategories = assetCategoryLocalService.getSubcategoryIds(categoryId)/> 
81                    <#if (childCategories?size>0)> 
82                        <#assign hits = assetEntryLocalService.search(companyId,[groupId],0,className,"","","",childCategories?join(","),"",0,true,0,99).getDocs()> 
83                    </#if> 
84                </#if> 
85                <#if (hits?size>0) > 
86                    <div class="carousel-section mb-60 m-mb-40"> 
87                        <div class="subcategory mb-20"> 
88                            <#assign urlCategory =categoryHref?replace('/g/','/') /> 
89                            <#if showChilds> 
90                                <h2 class="font-20 c-neutral900 dfc"><a class="dfc ml-5 underline m-mc" 
91                                                                        href="${urlCategory}">${categoryName} 
92                                    </a> 
93                                    <p class="font-16  ml-5">(${hits?size})</p> 
94                                </h2> 
95                                <a href="${urlCategory}"><span 
96                                            class="underline bold"><@liferay_ui["message"] key="finanzauto.products.ver.todos" /></span> 
97                                    <i class="bi bi-arrow-right bold"></i></a> 
98                            <#else> 
99                                <h2 class="font-20 c-neutral900 dfc">${categoryName} <p class="font-16 ml-5"> 
100                                        (${hits?size})</p> 
101                                </h2> 
102                            </#if> 
103                        </div> 
104                        <ul class="df product-carousel product-carousel${curAssetCategory?index}"> 
105                            <#assign hideLoadCarousel = "" /> 
106                            <#list hits as hit> 
107                                <#assign objectId = hit.entryClassPK?number  /> 
108                            <#-- ------------- Valores del producto -------------  --> 
109                                <#assign values = objectEntryLocalService.getValues(objectId)  /> 
110                                <#assign values = values + {"objectId": objectId}> 
111                                <#assign allObjectsValues = allObjectsValues + [values]  /> 
112                            </#list> 
113                            <#assign allObjectsValues = allObjectsValues?sort_by("names")> 
114                            <#list allObjectsValues as values> 
115                                <#assign imageList = [] /> 
116                            <#-- ------------- Imagen del producto -------------  --> 
117                                <#assign attachmentFiles = cpAttachmentFileEntryService.getCPAttachmentFileEntries(classNameId, values.objectId, 0, 0, -1, -1)  /> 
118                                <#list attachmentFiles as attachmentFile> 
119                                    <#attempt> 
120                                        <#assign image = dlFileEntryLocalService.getFileEntry(attachmentFile.getFileEntryId())/> 
121                                        <#if (image.extension=="jpg"|| image.extension=="jpeg"||image.extension=="png")  
122																				&& !image.fileName?contains("features") && !image.fileName?contains("no2dimage2davailable")  
123																				&& !image.fileName?contains("no-image-available")> 
124                                            <#assign imageList = imageList + [image] /> 
125                                        </#if> 
126                                        <#recover> 
127                                    </#attempt> 
128                                </#list> 
129																 
130                            <#assign image = -1> 
131                                <#assign imageList = imageList?sort_by("fileName")> 
132                                <#if (imageList?size>0)> 
133                                    <#assign image = imageList[0]> 
134                                <#else><#-- Fotos personalizadas --> 
135                                    <#assign imagesRelationshipId = objectRelationshipService.getObjectRelationship(objectDefinitionId, "images").getObjectRelationshipId() > 
136                                    <#assign images=objectEntryLocalService.getOneToManyObjectEntries(groupId, imagesRelationshipId, values.objectId, true, -1, -1)> 
137                                    <#list images as image> 
138                                        <#assign fileId = image.getValues()["image"]> 
139                                        <#attempt> 
140                                            <#assign file = dlFileEntryLocalService.getFileEntry(fileId)> 
141                                            <#assign imageList = imageList + [file]> 
142                                            <#recover> 
143                                        </#attempt> 
144                                    </#list> 
145 
146                                    <#assign imageList = imageList?sort_by("fileName")> 
147                                    <#if (imageList?size>0)> 
148                                        <#assign image = imageList[0]> 
149                                    </#if> 
150                                </#if> 
151                            <#-- ------------- Valores del producto -------------  --> 
152                                <li class="${hideLoadCarousel}"> 
153 
154                                    <#if locale=="es_ES" && values.productUrlEs!="" > 
155                                       <a href="/productos/${values.productUrlEs}" class="w-card w-100 product h-100"> 
156                                    <#elseif values.productUrlEn!=""> 
157                                        <a href="/en/products/${values.productUrlEn}" 
158                                           class="w-card w-100 product h-100"> 
159                                    <#else> 
160                                       <a href="/productos/${values.productUrlEs}" class="w-card w-100 product h-100"> 
161                                    </#if> 
162 
163                                            <span class="image p-15"> 
164                                      <#if (image?? && (!image?is_number)) > 
165                                        <img class="ofc" loading="lazy" 
166                                             src="${portalURL}/o/adaptive-media/image/${image.getFileEntryId()}/Thumbnail-300x300/${image.fileName}"/> 
167                                    <#else> 
168                                        <img class="ofc" src="/o/finanzauto-theme/images/no-photo.jpg"/> 
169                                    </#if> 
170                                        </span> 
171                                            <span class="container"> 
172                                            <span class="c-title bb-gray2 pt-10 pb-20 mb-10 dfc sb"> 
173                                                <p class="underline bold font-15"> 
174                                                    ${getLanguage(values.names)} 
175                                                </p> 
176                                                <span class="card-chevron dfcc w-28 h-28 border-white br-50 circle-white"><i 
177                                                            class="bi bi-chevron-right bold"></i></span> 
178                                            </span> 
179 
180                                            <span> 
181                                                ${getLanguageSection(values.featuredSpecifications)} 
182                                            </span> 
183                                        </span> 
184 
185                                            <p style="display:none;" class="product-category">${categoryName}</p> 
186                                            <p style="display:none;" class="product-brand">${values.brand}</p> 
187                                            <p style="display:none;" class="product-id">${values.objectId}</p> 
188                                        </a> 
189                                    </a> 
190                                </li> 
191 
192                                <#if values?index == 3 > 
193                                    <#assign hideLoadCarousel>display:none</#assign> 
194                                </#if> 
195                            </#list> 
196                        </ul> 
197                    </div> 
198                </#if> 
199 
200            </#list> 
201        </#if> 
202 
203    </div> 
204</section> 
205 
206 
207<style> 
208    .toggle-sys:not(:first-of-type) { 
209        display: none; 
210
211 
212    .caterpillar #metric, .caterpillar #imperial { 
213        border: 1px solid #fc0; 
214
215 
216    #metric, #imperial { 
217        margin-left: 0px; 
218        max-height: 30px; 
219        border: 1px solid #e4032e; 
220
221 
222    #metric:not(.bg-primary) { 
223        font-weight: normal !important; 
224
225 
226    #imperial:not(.bg-primary) { 
227        font-weight: normal !important; 
228
229 
230    div.subcategory { 
231        display: flex; 
232        justify-content: space-between; 
233
234 
235    div.featuredspecifications div { 
236        display: flex; 
237        justify-content: space-between; 
238
239 
240    div.featuredspecifications div p.name { 
241        color: #333D48; 
242        font-size: 0.88rem; 
243        line-height: 1.13rem; 
244
245 
246    div.featuredspecifications div p.value { 
247        font-weight: bold; 
248        margin-top: 0px; 
249        font-size: 1rem; 
250        line-height: 1.5rem; 
251        letter-spacing: 0.5px; 
252        text-align: right; 
253
254 
255    ul.product-carousel:not(.tns-carousel) { 
256        display: grid; 
257        grid-template-columns: 1fr 1fr 1fr 1fr; 
258        gap: 15px; 
259
260 
261    .product-carousel.tns-carousel > li { 
262        display: inline-block !important; 
263
264 
265    .image-selector .tns-nav button { 
266        width: 10px; 
267        height: 10px; 
268        padding: 0px; 
269        margin: 0px; 
270
271 
272 
273    .tns-outer { 
274        display: grid; 
275        grid-template: 
276        "a a" 
277        "b c"; 
278
279 
280    .tns-controls { 
281        grid-area: c; 
282        display: flex; 
283        justify-content: flex-end; 
284        padding-right: 10px; 
285
286 
287    .tns-nav { 
288        grid-area: b; 
289
290 
291    .tns-ovh { 
292        grid-area: a; 
293
294 
295    .tns-controls button { 
296        width: 32px; 
297        height: 32px; 
298        border-radius: 50%; 
299        border: 0px; 
300        background-color: #030712; 
301        color: #fff; 
302        overflow: hidden; 
303        white-space: nowrap; 
304        text-indent: 100px; 
305        position: relative; 
306
307 
308    .tns-controls button + button { 
309        margin-left: 10px; 
310
311 
312    .tns-controls button + button::after { 
313        content: "\F285"; 
314        font-size: 14px; 
315        color: #fff; 
316        text-indent: 0px; 
317        left: 10px; 
318        top: 9px; 
319        position: absolute; 
320        z-index: 1; 
321        font-family: 'bootstrap-icons'; 
322        font-weight: bold; 
323
324 
325    .tns-controls button:first-child::after { 
326        content: "\F284"; 
327        font-size: 14px; 
328        color: #fff; 
329        text-indent: 0px; 
330        left: 9px; 
331        top: 9px; 
332        position: absolute; 
333        z-index: 1; 
334        font-family: 'bootstrap-icons'; 
335        font-weight: bold; 
336
337 
338    .tns-controls button[disabled] { 
339        background-color: #d4d6d8; 
340        color: #404953; 
341
342 
343    .tns-controls button[disabled]::after { 
344        color: #404953; 
345
346 
347    .tns-nav button { 
348        width: 50px; 
349        margin-right: 20px; 
350        border-radius: 6px; 
351        border: 0px; 
352        background-color: #bfc2c6; 
353        height: 4px; 
354
355 
356    .tns-nav button.tns-nav-active { 
357        background-color: #030712; 
358
359 
360    .tns-item { 
361        opacity: 0; 
362        transition: all 0.25s linear; 
363
364 
365    .tns-item.tns-slide-active { 
366        opacity: 1; 
367
368 
369    .tns-controls { 
370        margin-top: 20px; 
371
372 
373    .tns-nav { 
374        margin-top: 20px; 
375
376 
377    ul.product-carousel:not(.tns-carousel) li { 
378        max-width: 300.75px; 
379
380 
381    .w-card span.image { 
382        height: auto !important; 
383        max-height: 230px; 
384
385 
386    span.c-info > .grid-2 { 
387        grid-template-columns: 60% 1fr; 
388
389 
390    @media (max-width: 769px) { 
391        .tns-nav { 
392            display: none; 
393
394 
395        .w-card span.image { 
396            max-height: inherit; 
397
398 
399        .m-mc { 
400 
401            width: min-content; 
402
403
404 
405 
406</style> 
407<script> 
408 
409    $(document).ready(function () { 
410 
411 
412        <#if categories?has_content> 
413        <#list categories as curAssetCategory> 
414        var slider = tns({ 
415            container: '.product-carousel${curAssetCategory?index}', 
416            items: 4, 
417            gutter: 15, 
418            slideBy: 'page', 
419            autoplay: false, 
420            loop: false, 
421            responsive: { 
422                1150: { 
423                    items: 4 
424                }, 
425                769: { 
426                    items: 3 
427                }, 
428                550: { 
429                    items: 2 
430                }, 
431                0: { 
432                    items: 1 
433
434
435        }); 
436        </#list> 
437        </#if> 
438 
439    }); 
440</script> 

Sobre los Implementos Industriales de Caterpillar

Ponemos a tu disposición un amplio rango de implementos y herramientas Cat para el sector industrial. Sea cual sea tu área de trabajo, modelo y marca de máquina, dispones de implementos de la más alta calidad.