Virhe tapahtui prosessoidessa esitysmallia.
The following has evaluated to null or missing:
==> variants  [in template "20116#20152#307443" at line 49, column 32]

----
Tip: If the failing expression is known to be 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: #list variants.iterator() as variant  [in template "20116#20152#307443" at line 49, column 25]
----
1<#if cmsEntity?has_content> 
2<#include "${templatesPath}/227222" />  
3 
4 
5<@sectionHeader title="${title}" menuTitle="${menuTitle}" cssClasses="bg-white" id="accessory-main-image"/> 
6<#assign ns = themeDisplay.portletDisplay.getId() > 
7<#assign siteDefaultLocale = portalUtil.getSiteDefaultLocale(groupId)?string?replace("_","-") > 
8 
9<#assign listPriceField = "listPrice" > 
10<#assign iconSetPath ="/o/genelec-site-theme/images/icons/symbol-defs.svg"> 
11<#if cmsEntity.getField(profile, "/entity/relationships/variants")?has_content> 
12    <#assign variants = cmsEntity.getField(profile, "/entity/relationships/variants") > 
13</#if> 
14<#if cmsEntity.getField(profile, "/entity/fields")?has_content> 
15    <#assign fields = cmsEntity.getField(profile, "/entity/fields") >  
16</#if> 
17<#if cmsEntity.getField(profile, "/entity/fields/title")?has_content> 
18    <#assign productTitle = cmsEntity.getLocalizedField(profile, "/entity/fields/title")> 
19</#if> 
20<#if cmsEntity.getField(profile, "/entity/fields/summary")?has_content > 
21    <#assign summary = cmsContentFormatterService.getMarkdown(cmsEntity.getLocalizedField(profile, "/entity/fields/summary"))> 
22</#if> 
23<#assign content = "" > 
24 
25<#if cmsEntity.getLocalizedField(profile, "/entity/fields/content")?has_content > 
26    <#assign content = cmsContentFormatterService.getMarkdown(cmsEntity.getLocalizedField(profile, "/entity/fields/content"))> 
27</#if> 
28 
29<#assign portalUrl = themeDisplay.getPortalURL() > 
30<#assign currentURL = portalUrl + themeDisplay.getURLCurrent()  > 
31<@appendHTMLMetas currentURL cmsEntity "product" /> 
32 
33        <div class="row"> 
34            <div class="col-lg-6"> 
35                <#if productTitle?has_content> 
36                    <h1 class="product-page-heading">${productTitle}</h1> 
37                </#if> 
38                    <div class="row justify-content-between"> 
39                        <div class="col-lg-12 article-content"> 
40                            <#if summary?has_content> 
41                                <div class="product-page-intro">${summary}</div>  
42                            </#if> 
43                            <hr> 
44                        </div>  
45                    </div>  
46                    <form class="product-page-form">  
47                 
48                    <p> 
49                        <#list variants.iterator() as variant> 
50                            <#assign id = variant.id> 
51                            <#if !fields.isNull("b2cVisibilityKey")>  
52                                <@b2Visibility container=fields field="b2cVisibilityKey" langCode="${siteDefaultLocale}"/> 
53                                <#if b2cVisibility = "showWithPrice" && variant?index = 0 || b2cVisibility = "showForPurchase" && variant?index = 0> 
54                                    <#if !variant.properties.isNull(listPriceField)> 
55                                        <div id="price-${id}"> 
56                                            <span class="h1">${variant.properties[listPriceField]} €</span> 
57                                            <span class="h3">/unit</span> 
58                                            <span class="text-muted small text-bold">(inc. VAT)</span> 
59                                        </div> 
60                                    </#if> 
61                                <#elseif b2cVisibility ="showWithPrice" || b2cVisibility = "showForPurchase"> 
62                                    <#if !variant.properties.isNull(listPriceField)> 
63                                        <div class="price-variant" id="price-${id}"> 
64                                            <span class="h1">${variant.properties[listPriceField]} €</span> 
65                                            <span class="h3">/unit</span> 
66                                            <span class="text-muted small text-bold">(inc. VAT)</span> 
67                                        </div> 
68                                    </#if> 
69                                </#if> 
70                            </#if> 
71                        </#list> 
72                    </p> 
73     
74                    <p class="text-muted text-bolder small"> 
75                        <#if !fields.isNull("deliveryTime")> 
76                            <@liferay.language key="delivery-time"/> ${localizeField(fields.deliveryTime, profile.getCMSLangCode())}<br> 
77                        </#if> 
78                        <#if !fields.isNull("deliveryRegions")> 
79                        <#assign deliveryRegions = localizeField(fields.deliveryRegions, profile.getCMSLangCode())> 
80                        <@liferay.language key="delivery-to"/>  
81                        <#list deliveryRegions.iterator() as deliveryRegion> 
82                            ${deliveryRegion}  
83                        </#list> 
84                        </#if> 
85                    </p>  
86                    <#list variants.iterator() as variant> 
87                        <#if !variant.properties.isNull("sku")> 
88                            <#assign sku = variant.properties.sku> 
89                        <#else> 
90                            <#assign sku = ""> 
91                        </#if> 
92                    </#list> 
93                    <#if !fields.isNull("b2cVisibilityKey")>  
94                        <@b2Visibility container=fields field="b2cVisibilityKey" langCode="${siteDefaultLocale}"/> 
95                         
96                            <#if b2cVisibility = "showForPurchase" && sku != ""> 
97                                <div class="btn-container">      
98                                    <a class="btn btn-theme btn-product-page-buy btn-bold btn-medium"  
99                                        href="#" 
100                                        data-sku="${variants.get(0).properties.sku}"> 
101                                            <@liferay.language key="buy-product"/> 
102                                    </a> 
103 
104                                    <select class="form-control buy-product-dropdown" style=> 
105                                        <option value="1" selected>1</option> 
106                                        <option value="2">2</option> 
107                                        <option value="3">3</option> 
108                                    </select> 
109 
110                                </div> 
111                            </#if> 
112                     </#if> 
113                     <div class="btn-container"> 
114                    <a class="btn btn-black-white btn-medium text-bolder" href="#"> 
115                        <@liferay.language key="search-dealer"/> 
116                        <@linkIcon cssClasses="icon tiny-icon" alt="" icon="arrow-black"/> 
117                    </a> 
118                </div> 
119 
120                </form> 
121                 <hr> 
122                  <#if content?has_content> 
123                        <div class="text-intro">${content}</div>  
124                    </#if> 
125                <#if cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/lengthMin")?has_content> 
126                <div class="text-bolder"> 
127                    Length min. 
128                </div> 
129                <div class="text-medium"> 
130                    ${cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/lengthMin")}  
131                    mm 
132                </div> 
133                </#if> 
134                <#if cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/lengthMax")?has_content> 
135                <div class="text-bolder"> 
136                    Length max. 
137                </div> 
138                <div class="text-medium"> 
139                    ${cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/lengthMax")}  
140                    mm 
141                </div> 
142                </#if> 
143                <#if cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/width")?has_content> 
144                <div class="text-bolder"> 
145                    <@liferay.language key="width"/> 
146                </div> 
147                <div class="text-medium"> 
148                    ${cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/width")}  
149                    mm 
150                </div> 
151                </#if> 
152                <#if cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/height")?has_content> 
153                <div class="text-bolder"> 
154                    <@liferay.language key="height"/> 
155                </div> 
156                <div class="text-medium"> 
157                    ${cmsEntity.getField(profile, "/entity/relationships/accessorySpecifications/properties/height")}  
158                    mm 
159                </div> 
160                </#if> 
161 
162 
163                 
164 
165            </div> 
166            <div class="col-lg-6"> 
167                <#list variants.iterator() as variant> 
168                <#if !variant.assets.isNull("images")> 
169                    <#if variant?index = 0> 
170                        <@imageZoom  
171                            id=variant.id  
172                            cssClasses="zoom-gallery-slide active"  
173                            images=variant.assets.images  
174                            carouselCss="accessory-main-carousel owl-carousel owl-theme image-carousel-container"  
175                            zoomCss="MagicZoom accessory-page-product-image" 
176                            videoCss="accessory-main-video" 
177                            />  
178                    <#else> 
179                    <@imageZoom  
180                        id=variant.id  
181                        variantCss="variant-gallery"  
182                        cssClasses="zoom-gallery-slide active"  
183                        images=variant.assets.images  
184                        carouselCss="accessory-main-carousel owl-carousel owl-theme image-carousel-container"  
185                        zoomCss="MagicZoom accessory-page-product-image" 
186                        videoCss="accessory-main-video" 
187                    /> 
188                    </#if> 
189                </#if> 
190                </#list> 
191                <#list variants.iterator() as variant> 
192                    <#if !variant.properties.isNull("colorCode")> 
193                        <#if variant?index == 0> 
194                            <div class="text-bold"><@liferay.language key="color-options"/></div> 
195                        </#if> 
196                        <#assign color = "${variant.properties.colorCode}"> 
197                        <#if !variant.properties.isNull("sku")> 
198                            <#assign sku = variant.properties.sku> 
199                        <#else> 
200                            <#assign sku = ""> 
201                        </#if> 
202                     
203                    <#if variant?index = 0> 
204                        <@variantChange id=variant.id checked="checked" color=color sku=sku/> 
205                    <#else> 
206                        <@variantChange id=variant.id color=color sku=sku/> 
207                    </#if> 
208                    </#if> 
209                </#list> 
210            </div> 
211        </div> 
212 <@sectionFooter/> 
213 
214<style> 
215 
216    .product-page-product-title { 
217        font-weight: 600; 
218        margin-bottom: 0; 
219
220 
221    .product-page-form { 
222        margin-bottom: 15px; 
223
224 
225    .btn-product-page-buy { 
226        width: 40%; 
227        min-width: 250px;  
228        height: 43px  
229
230 
231    .btn-bold { 
232        border-width: 2px; 
233        text-transform: uppercase; 
234        font-weight: 800; 
235
236 
237    .buy-product-dropdown { 
238        display: inline-block; 
239        width: 60px; 
240        height: 43px !important; 
241        border-radius: 0; 
242        border-left: none; 
243        position: absolute; 
244        clear: left; 
245        padding-left: 2%; 
246        font-size: 1.3em; 
247        border: 2px solid #ced4da; 
248        border-left: none; 
249        line-height: 20px; 
250
251 
252    .buy-product-dropdown h3 { 
253        display: inline; 
254        vertical-align: middle; 
255
256 
257    .buy-product-dropdown svg { 
258        width: 20px; 
259        line-height: .2; 
260        vertical-align: middle; 
261
262 
263.accessory-main-carousel .owl-prev { 
264    width: 17px; 
265    height: 100px; 
266    position: absolute; 
267    left: -20px; 
268    top: 47%; 
269    transform: translateY(-50%); 
270    display: block !important; 
271    border:0px solid black; 
272    font-size: 2em !important; 
273
274 
275.accessory-main-carousel .owl-next { 
276    width: 17px; 
277    height: 100px; 
278    position: absolute; 
279    right: -20px; 
280    top: 47%; 
281    transform: translateY(-50%); 
282    display: block !important; 
283    border:0px solid black; 
284    font-size: 2em !important; 
285
286 
287.accessory-main-video{ 
288    height:396px; 
289    width:396px; 
290
291 
292.price-variant { 
293        display:none; 
294
295 
296</style> 
297 
298<script> 
299    
300     $('.accessory-main-carousel').owlCarousel({ 
301    loop:false, 
302    nav:true, 
303    dots:false, 
304    margin:5, 
305    lazyLoad:true, 
306    navText : ['<i class="icon-angle-left">','<i class="icon-angle-right">'], 
307    responsive:{ 
308        0:{items:3, slideBy:3}, 
309        600:{items:4, slideBy:4}, 
310        1000:{items:5, slideBy:5} 
311     }, 
312}); 
313 
314// Add product into shopping cart  
315    $('.btn-product-page-buy').click(function(event){ 
316        genelec.cart().then(function(cart){ 
317            let qty  = $(event.target).parent().find(".buy-product-dropdown").val(); 
318            let sku = $(event.target).attr("data-sku"); 
319             
320            // qty is number and sku exists 
321            if (!isNaN(qty) && sku) { 
322                cart.add(sku, qty).then(function(){$( document ).trigger("genelec-shopping-cart-updated");}); 
323
324        }); 
325 
326        return false; 
327    }); 
328 
329 
330</script> 
331</#if> 

Etsi jälleenmyyjäsi

Kirjoita kenttään sijaintisi ja löydä lähin jälleenmyyjäsi.