Caterpillar agricultural tines and bale loaders
An error occurred while processing the template.
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#14309164" at line 67, column 17]
----
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 className = objectDefinitionService.getObjectDefinition(objectDefinitionId).getClassName() />
12<#assign classNameId = classNameLocalService.getClassNameId(className) />
13<#assign groupId = themeDisplay.getScopeGroupId()>
14<#assign companyId = themeDisplay.getCompanyId()>
15<#assign portalURL = themeDisplay.getPortalURL()>
16<section class="grid-productos pt-40 pb-40 m-pt-20 m-pb-20">
17 <#assign allObjectsValues =[] />
18 <div class="cc">
19 <div class="toggle-sys mb-30 tar df aic jce p-20 bg-white" id="metric-imperial-button">
20 <label class="font-12 mr-10 bold"><@liferay_ui["message"] key="finanzauto.products.unidades.medida" />
21 : </label>
22 <div class="dfc mt-0 mb-0">
23 <p onclick="toggleElements('metric')" id="metric"
24 class="cp mt-0 btn-master bg-primary h-40 "><@liferay_ui["message"] key="finanzauto.products.metrico" /></p>
25 <p onclick="toggleElements('imperial')" id="imperial"
26 class="cp mt-0 btn-master ml-10 h-40"><@liferay_ui["message"] key="finanzauto.products.imperial" /></p>
27 </div>
28 <#-- <button onclick="toggleElements()" id="toggleButton" class="btn-master bg-primary h-40 c-white">Imperial</button> -->
29 </div>
30
31 <#assign orderBy = false />
32 <#assign categoryId = assetCategory.categoryId />
33 <#attempt>
34 <#assign categoryProperties = assetCategoryPropertyService.getCategoryProperties(categoryId)/>
35 <#list categoryProperties as categoryProperty>
36 <#assign key=categoryProperty["key"]/>
37 <#assign value=categoryProperty["value"]/>
38 <#if (key == "ORDER_BY" && value!="" && value!="#") >
39 <#assign orderBy = true />
40 </#if>
41 </#list>
42 <#recover>
43 </#attempt>
44 <#-- ------------- Productos de la categoria ------------- -->
45 <#assign hits = assetEntryLocalService.search(companyId,[groupId],0,className,"","","",categoryId+"","",0,true,0,999).getDocs()>
46
47 <ul class="grid-4 gap-20 t-grid-3 m-grid-2 m-gap-15 product-carousel">
48 <#assign hideLoadCarousel = "" />
49 <#list hits as hit>
50 <#assign objectId = hit.entryClassPK?number />
51 <#-- ------------- Valores del producto ------------- -->
52 <#assign values = objectEntryLocalService.getValues(objectId) />
53 <#assign values = values + {"objectId": objectId}>
54 <#assign allObjectsValues = allObjectsValues + [values] />
55 </#list>
56
57 <#if orderBy>
58 <#assign allObjectsValues = allObjectsValues?sort_by("orderBy")>
59 <#else>
60 <#assign allObjectsValues = allObjectsValues?sort_by("names")>
61 </#if>
62 <#list allObjectsValues as values>
63 <#assign imageList = [] />
64
65 <#-- ------------- Imagen del producto ------------- -->
66 <#assign attachmentFiles = cpAttachmentFileEntryService.getCPAttachmentFileEntries(classNameId, values.objectId, 0, 0, -1, -1) />
67 <#list attachmentFiles as attachmentFile>
68 <#attempt>
69 <#assign image = dlFileEntryLocalService.getFileEntry(attachmentFile.getFileEntryId())/>
70 <#if (image.extension=="jpg"|| image.extension=="jpeg"||image.extension=="png") && !image.fileName?contains("features")
71 && !image.fileName?contains("no2dimage2davailable") && !image.fileName?contains("no-image-available")>
72 <#assign imageList = imageList + [image] />
73 </#if>
74 <#recover>
75 </#attempt>
76 </#list>
77
78 <#assign image = -1>
79 <#assign imageList = imageList?sort_by("fileName")>
80 <#if (imageList?size>0)>
81 <#assign image = imageList[0]>
82 <#else><#-- Fotos personalizadas -->
83 <#assign imagesRelationshipId = objectRelationshipService.getObjectRelationship(objectDefinitionId, "images").getObjectRelationshipId() >
84 <#assign images=objectEntryLocalService.getOneToManyObjectEntries(groupId, imagesRelationshipId, values.objectId, true, -1, -1)>
85 <#list images as image>
86 <#attempt>
87 <#assign fileId = image.getValues()["image"]>
88 <#assign file = dlFileEntryLocalService.getFileEntry(fileId)>
89 <#if (file.extension=="jpg"|| file.extension=="jpeg"||file.extension=="png") && !file.fileName?contains("features")
90 && !file.fileName?contains("no2dimage2davailable") && !file.fileName?contains("no-image-available")>
91 <#assign imageList = imageList + [file]>
92 </#if>
93 <#recover>
94 </#attempt>
95 </#list>
96
97 <#assign imageList = imageList?sort_by("fileName")>
98 <#if (imageList?size>0)>
99 <#assign image = imageList[0]>
100 </#if>
101 </#if>
102 <li class="df w-100 ${hideLoadCarousel}">
103
104 <#assign grupoElectrogenoGas = "">
105 <#assign frecuencia50 = "">
106 <#assign frecuencia60 = "">
107 <#if values.productUrlEs?contains("-gas-") >
108 <#assign grupoElectrogenoGas = "grupo-electrogeno-gas">
109 </#if>
110 <#if values.frecuencia50?? && values.frecuencia50 >
111 <#assign frecuencia50 = "frecuencia50">
112 </#if>
113 <#if values.frecuencia60?? && values.frecuencia60 >
114 <#assign frecuencia60 = "frecuencia60">
115 </#if>
116
117 <#if locale=="es_ES" && values.productUrlEs!="" >
118 <a href="/productos/${values.productUrlEs}" class="w-card w-100 product h-100 ${grupoElectrogenoGas} ${frecuencia50} ${frecuencia60}" data-order="${values.orderBy}">
119 <#elseif values.productUrlEn!="">
120 <a href="/en/products/${values.productUrlEn}"
121 class="w-card w-100 product h-100 ${grupoElectrogenoGas} ${frecuencia50} ${frecuencia60}" data-order="${values.orderBy}">
122 <#else>
123 <a href="/productos/${values.productUrlEs}" class="w-card w-100 product h-100 ${grupoElectrogenoGas} ${frecuencia50} ${frecuencia60}" data-order="${values.orderBy}">
124 </#if>
125 <span class="image p-15">
126 <#if (image?? && (!image?is_number)) >
127 <img class="ofc" loading="lazy"
128 src="${portalURL}/o/adaptive-media/image/${image.getFileEntryId()}/Thumbnail-300x300/${image.fileName}"/>
129 <#else>
130 <img class="ofc" src="/o/finanzauto-theme/images/no-photo.jpg"/>
131 </#if>
132 </span>
133 <span class="container ">
134 <span class="c-title bb-gray2 pt-10 pb-20 mb-10 dfc sb">
135
136 <p class="underline bold font-15">
137 ${getLanguage(values.names)}
138 </p>
139 <span class="card-chevron dfcc w-28 h-28 border-white br-50 circle-white"><i
140 class="bi bi-chevron-right bold"></i></span>
141 </span>
142 <span class="">
143 ${getLanguageSection(values.featuredSpecifications)}
144 </span>
145 </span>
146 <p style="display:none;" class="product-category">${assetCategory.getTitle(locale)}</p>
147 <p style="display:none;" class="product-brand">${values.brand}</p>
148 <p style="display:none;" class="product-id">${values.objectId}</p>
149 </a>
150
151 </li>
152
153 <#if values?index == 4 >
154 <#assign hideLoadCarousel>display:none</#assign>
155 </#if>
156 </#list>
157 </ul>
158
159 </div>
160</section>
161
162<style>
163 #layout-column_column-1 > .portlet-boundary_com_liferay_journal_content_web_portlet_JournalContentPortlet_:nth-child(2) section.text-columns.pt-40.pb-40 {
164 padding: 0px;
165 }
166
167 #layout-column_column-1 > .portlet-boundary_com_liferay_journal_content_web_portlet_JournalContentPortlet_:nth-child(2) section.text-columns.pt-40.pb-40 h2 + span > p {
168 margin-top: 20px !important;
169 }
170
171 #layout-column_column-1 > .portlet-boundary_com_liferay_journal_content_web_portlet_JournalContentPortlet_:nth-child(2) section.text-columns.pt-40.pb-40 h2 {
172 margin: 0px;
173 }
174
175 .toggle-sys:not(:first-of-type) {
176 display: none;
177 }
178
179 .caterpillar #metric, .caterpillar #imperial {
180 border: 1px solid #fc0;
181 }
182
183 #metric, #imperial {
184 margin-left: 0px;
185 max-height: 30px;
186 border: 1px solid #e4032e;
187 }
188
189 #metric:not(.bg-primary) {
190 font-weight: normal !important;
191 }
192
193 #imperial:not(.bg-primary) {
194 font-weight: normal !important;
195 }
196
197 div.subcategory {
198 display: flex;
199 justify-content: space-between;
200 }
201
202 div.featuredspecifications {
203 }
204
205 div.featuredspecifications div {
206 display: flex;
207 justify-content: space-between;
208 }
209
210 div.featuredspecifications div p.name {
211 color: #333D48;
212 font-size: 0.88rem;
213 line-height: 1.13rem;
214 }
215
216 div.featuredspecifications div p.value {
217 font-weight: bold;
218 margin-top: 0px;
219 font-size: 1rem;
220 line-height: 1.5rem;
221 letter-spacing: 0.5px;
222 text-align: right;
223 }
224
225
226 .product-carousel.tns-carousel > li {
227 display: inline-block !important;
228 }
229
230 .image-selector .tns-nav button {
231 width: 10px;
232 height: 10px;
233 padding: 0px;
234 margin: 0px;
235 }
236
237 .w-card span.image {
238 height: auto !important;
239 max-height: 230px;
240 }
241
242 span.c-info > .grid-2 {
243 grid-template-columns: 60% 1fr;
244 }
245
246 @media (max-width: 430px) {
247 ul.grid-4.m-grid-2.product-carousel {
248 grid-template-columns: 1fr;
249 }
250 }
251</style>
252<script>
253
254</script>
About Caterpillar Agricultural Bale Grapples
They can be used to transport wheat bales, hay and other materials for livestock feed.