Other accessories
SAMOA offers a wide range of high-quality accessories. These accessories are designed specifically for use with SAMOA equipment and are ideal for applications that require high efficiency and protection for critical equipment. SAMOA's genuine accessories can improve system performance and extend the life of our products, providing cost-effective solutions for maintenance. Partner with SAMOA to optimize your pumping system and achieve optimal performance.
Search
The following has evaluated to null or missing:
==> restClient.get("/headless-commerce-delivery-catalog/v1.0/channels/${commerceChannelId}/products/${item.productId}/images").items [in template "20097#20123#123888" at line 62, column 41]
----
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 productImage = restClient.get... [in template "20097#20123#123888" at line 62, column 17]
----
1<#-- Template: functions - Resultados de la búsqueda Plantilla -->
2<#import "${templatesPath}/FUNCTIONS__RESULTADOS_DE_LA_BUSQUEDA_PLANTILLA" as functions />
3
4<#assign
5 commerceContext = renderRequest.getAttribute("COMMERCE_CONTEXT")
6 commerceChannelId = commerceContext.getCommerceChannelId()
7/>
8<#assign elementoArray = [] />
9<#assign elementos = [] />
10<#-- Recorremos 1 vez el entries -->
11<#if entries?has_content>
12<#list entries as entry>
13<#assign definitionId = entry.getCPDefinitionId()
14definitionService = serviceLocator.findService("com.liferay.commerce.product.service.CPDefinitionLocalService")
15definition = definitionService.getCPDefinition(definitionId)
16productId = definition.getCProduct().getCProductId()
17referenceCode = definition.getCProduct().getExternalReferenceCode()
18/>
19<#assign elemento = {"name": entry.getName(), "description": entry.getDescription() ,"url": entry.getUrl(), "productId": productId, "referenceCode": referenceCode, "entradas": entry, "definitionId": definitionId} />
20<#assign elementos = elementos + [elemento] />
21</#list>
22</#if>
23<#-- Recorremos 1 vez el entries -->
24<#if elementos?has_content>
25<section class="product__list_${randomNamespace}">
26 <div class="row">
27 <#list elementos as item>
28 <#assign
29 skuProduct = functions.getSkuProduct(item.productId, commerceChannelId, "")
30 skuProductCss = functions.getSkuProductCss(skuProduct, item.definitionId)
31 varCategory = functions.getProductCategories(item.productId, commerceChannelId, "")
32 />
33 <div class="col-xl-3 col-lg-4 col-md-6 col-12 mb-5 product__list_height">
34 <div class="product__list_img text-center">
35 <div class="row">
36 <div class="col-4">
37 <span class="pl-2 pt-2 ${skuProductCss}"><@liferay.language key="product.sku" /></span>
38 </div>
39 <div class="col-8">
40
41 <#-- category name -->
42<div class="product__list_categories">
43
44 <span class="text-right pr-2 pt-2 pb-2 sku-product">
45 <@liferay.language key="${varCategory?lower_case}.key" />
46 </span>
47</div>
48 <#-- category name -->
49
50
51 </div>
52 </div>
53
54 <#-- ajustar referencia en segunda fila para no cortarse -->
55 <div class="row">
56 <div class="col-12">
57 <span class="pl-2 pb-2 ${skuProductCss}">${skuProduct}</span>
58 </div>
59 </div>
60 <#-- ajustar referencia en segunda fila para no cortarse -->
61 <a alt="${item.name}" href="/p/${item.url}">
62 <#assign productImage = restClient.get("/headless-commerce-delivery-catalog/v1.0/channels/${commerceChannelId}/products/${item.productId}/images").items />
63
64 <#global counter = 0 />
65 <#list productImage as items>
66 <#if counter < 1 && items.priority == 0>
67 <img alt="${item.name?replace('&', " ", 'r')}" loading="lazy" id="load--product--${item.productId}_${randomNamespace}" class="lazyload img-fluid" src="/o/adaptive-media/image/${items.fileEntryId}/product-catalog/${items.title}" />
68 <#global counter = counter + 1 />
69 </#if>
70 </#list>
71 </a>
72 </div>
73 <div class="row pb-4 align-items-center">
74 <div class="col-lg-6">
75 <@liferay_commerce_ui["compare-checkbox"]
76 CPCatalogEntry=item.entradas
77 label=languageUtil.get(request, "compare")
78 />
79 </div>
80 <#if themeDisplay?has_content && themeDisplay.isSignedIn()>
81 <div class="col-lg-6 text-right">
82 <@liferay_commerce_ui["add-to-wish-list"]
83 CPCatalogEntry=item.entradas
84 />
85 </div>
86 </#if>
87 </div>
88 <h2 class="product__list_title pb-3 mb-0"><a alt="${item.name}" href="/p/${item.url}">${item.name}</a></h2>
89 <#-- <div class="product__list_description pb-3">${stringUtil.shorten(htmlUtil.stripHtml(item.description), 150,"...")}</div> -->
90 <div class="button-holder">
91 <a class="btn btn-primary" href="/p/${item.url}">
92 <@liferay.language key='details' />
93 </a>
94 </div>
95 </div>
96 </#list>
97 </div>
98</section>
99 <#-- Ajustar altura para alinear botones -->
100<script>
101 $(document).ready(function() {
102 function adjustHeights() {
103 if ($(window).width() > 767.98) {
104 var highestBox = 0;
105 $('.product__list_height .product__list_title').css('height', 'auto').each(function() {
106 highestBox = Math.max(highestBox, $(this).height());
107 });
108 $('.product__list_height .product__list_title').height(highestBox);
109 } else {
110 $('.product__list_height .product__list_title').css('height', 'auto');
111 }
112 }
113 adjustHeights();
114 $(window).resize(adjustHeights);
115});
116</script>
117 <#-- Ajustar altura para alinear botones -->
118<script type="text/javascript">
119 window.dataLayer = window.dataLayer || [];
120 window.dataLayer.push({
121 event: 'view_item_list',
122 ecommerce: {
123 items: [
124 <#list elementos as analytcsEntries>
125 {
126 item_name: '${analytcsEntries.name}',
127 item_id: '${analytcsEntries.referenceCode}',
128 index: ${analytcsEntries_index + 1}
129 }<#if analytcsEntries?has_next>,</#if>
130 </#list>
131 ]
132 }
133 });
134</script>
135
136<#else>
137<div class="alert alert-info mt-5">
138 <@liferay.language key='catalog.general.search.empty' />
139</div>
140</#if>
141<style>
142 /*faceta*/
143 [id^="fragment-"] .portlet-cp-specification-option-facets .panel .panel-header {
144 padding: 30px !important;
145 padding-bottom: 16px !important;
146 padding-top: 8px !important;
147 padding-left: 0px !important;
148}
149 /*faceta*/
150 @media screen and (max-width: 991px) {
151 [id^="fragment-"] .portlet-cp-specification-option-facets .panel .panel-header {
152 max-width: 14rem;
153 }
154}
155 /*faceta*/
156 [id^="fragment-"] .portlet-cp-specification-option-facets .panel .panel-header span{
157 text-transform: initial!important;
158 }
159 /*faceta*/
160 @media (max-width: 767px) {
161 [id^="fragment-"] .portlet-commerce-product-publisher .pagination-bar .pagination .page-item, [id^="fragment-"] .portlet-cp-search-results .pagination-bar .pagination .page-item{
162 width: 35px;
163 height: 35px;
164 margin-left: 0.15rem;
165 margin-right: 0.15rem;
166 }
167 [id^="fragment-"] .portlet-commerce-product-publisher .pagination-bar .pagination .page-item .page-link, [id^="fragment-"] .portlet-cp-search-results .pagination-bar .pagination .page-item .page-link{
168 font: normal normal normal 12px/14px Lexend;
169 }
170 }
171 .portlet-cp-sorting .dropdown-menu a[data-label="relevance"],
172 .portlet-cp-sorting .dropdown-menu a[data-label="price-low-to-high"],
173 .portlet-cp-sorting .dropdown-menu a[data-label="price-high-to-low"]{
174 display: none;
175 }
176 .product__list_${randomNamespace} .product__list_img img{
177 width: 342px;
178 height: 230px;
179 object-fit: contain;
180 }
181 .product__list_${randomNamespace} .product__list_img{
182 margin-bottom: 22px;
183 background: white;
184 }
185 .product__list_${randomNamespace} .product__list_title{
186 font: normal normal 600 18px/22px Lexend;
187 letter-spacing: 0px;
188 color: #2C2C2C;
189 }
190 .product__list_${randomNamespace} .product__list_description{
191 font: normal normal 400 16px/26px Lexend;
192 letter-spacing: -0.48px;
193 color: #5C5C5C;
194 }
195 .product__list_${randomNamespace} .add-to-wish-list .wish-list-icon{
196 margin: 0;
197 }
198 .product__list_${randomNamespace} .add-to-wish-list .wish-list-icon .lexicon-icon-heart{
199 color: white;
200 }
201 .product__list_${randomNamespace} .add-to-wish-list .wish-list-icon .lexicon-icon-heart-full{
202 color: red;
203 }
204 .product__list_${randomNamespace} .add-to-wish-list .btn{
205 padding: 12px;
206 margin-right: 0;
207 background: #E8E8E8 0% 0% no-repeat padding-box;
208 border-color: #E8E8E8;
209 }
210 .product__list_${randomNamespace} .add-to-wish-list .text-truncate-inline{
211 display: none;
212 }
213 .product__list_${randomNamespace} .custom-checkbox input {
214 padding: 0;
215 height: initial;
216 width: initial;
217 margin-bottom: 0;
218 display: none;
219 cursor: pointer;
220 }
221 .product__list_${randomNamespace} .custom-checkbox label {
222 position: relative;
223 cursor: pointer;
224 }
225 .product__list_${randomNamespace} .custom-checkbox .custom-control-input:checked~.custom-control-label::after{
226 background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3E%3Cpath%20class='lexicon-icon-outline'%20d='M220.9%20377.2c-8%200-15.8-3.2-21.5-8.9l-91-91c-28.1-28.1%2014.8-71%2042.9-42.9l68.2%2068.2%20139.8-157.2c26.4-30%2072%2010.1%2045.6%2040.1L243.7%20366.9c-5.5%206.3-13.4%2010-21.8%2010.3h-1z'%20fill='%2358A031'/%3E%3C/svg%3E");
227 background-size: 100%;
228 background-position: 2px 2px;
229 }
230 .product__list_${randomNamespace} .custom-checkbox label:before {
231 content:'';
232 -webkit-appearance: none;
233 background: #E8E8E8 0% 0% no-repeat padding-box;
234 border-radius: 6px;
235 padding: 10px;
236 display: inline-block;
237 position: relative;
238 vertical-align: middle;
239 cursor: pointer;
240 margin-right: 5px;
241 }
242 .product__list_${randomNamespace} .custom-control{
243 margin-left: -16px;
244 }
245 .product__list_${randomNamespace} .custom-checkbox label .custom-control-label::before{
246 visibility: hidden;
247 }
248 .product__list_${randomNamespace} .custom-checkbox input:checked + label:after {
249 content: '';
250 display: block;
251 position: absolute;
252 top: 2px;
253 left: 9px;
254 width: 6px;
255 height: 14px;
256 border: solid #0079bf;
257 border-width: 0 2px 2px 0;
258 transform: rotate(45deg);
259 }
260 .product__list_${randomNamespace} .sku-product{
261 text-align: left;
262 display: block;
263 color: var(--sma-grease3);
264 font-weight: 500;
265 line-height: 1rem !important;
266 }
267 /*problema a la hora de mostrar el sort*/
268 .sma-container .lfr-layout-structure-item-row {
269 overflow: visible;
270 }
271</style>