1<script type="template/klevu" id="klevuLandingTemplateBaseCustom">
2 <div ku-container data-container-id="ku_landing_main_container" data-container-role="main">
3
4 <header ku-container data-container-id="ku_landing_main_header_container" data-container-role="header">
5 <section ku-block data-block-id="ku_landing_main_header_sub_panel"></section>
6 <section ku-block data-block-id="ku_landing_main_header_banner">
7 <%=helper.render('klevuLandingPromotionBanner',scope,data,"top") %>
8 <%=helper.render('klevuLandingPromotionBanner',scope,data,"bottom") %>
9 </section>
10 <section ku-block data-block-id="ku_landing_main_header_site_navigation"></section>
11 </header>
12
13 <div class="kuContainer">
14 <% if(!helper.hasResults(data,"productList") && !helper.hasFilters(data,"productList")) { %>
15 <%=helper.render('noResultsFoundLanding',scope) %>
16 <% } else { %>
17 <%= helper.render('klevuLandingTemplateSearchBar', scope) %>
18 <%=helper.render('klevuLandingImageSearchUploadBanner',scope,data) %>
19 <%= helper.render('tab-results', scope) %>
20 <%= helper.render('results',scope) %>
21 <% } %>
22 <div class="kuClearBoth"></div>
23 </div>
24
25 <footer ku-container data-container-id="ku_landing_main_footer_container" data-container-role="footer">
26 <section ku-block data-block-id="ku_landing_main_footer_sub_panel"></section>
27 <section ku-block data-block-id="ku_landing_main_footer_banner">
28
29 </section>
30 </footer>
31
32 </div>
33 <!-- start of compare customization -->
34 <div class="klevu-compare-table" id="klevu-compare-table">
35 <table class="klevu-compare-table__products">
36 <div class="klevu-compare-table-header">
37 <label class="toggle-differences"><input type="checkbox" id="toggleDifferences" <% if (klevu_compare_show_differences_checked) { %>checked<% } %> /><%= helper.translate("Show only differences")%></label>
38 <button id="klevu-close-compare">
39 <svg style="pointer-events:none;" enable-background="new 0 0 386.667 386.667" height="15" viewBox="0 0 386.667 386.667" width="15">
40 <path d="m386.667 45.564-45.564-45.564-147.77 147.769-147.769-147.769-45.564 45.564 147.769 147.769-147.769 147.77 45.564 45.564 147.769-147.769 147.769 147.769 45.564-45.564-147.768-147.77z"/>
41 </svg>
42 </button>
43 </div>
44 <thead>
45 <tr>
46 <th class="klevu-compare-table__label"></th>
47 <th><img src="" alt=""><span></span></th>
48 </tr>
49 </thead>
50 <tbody>
51 <tr>
52 <td class="klevu-compare-table__label">Label</td>
53 <td><div class="spec" spec-title="Label"></div></td>
54 </tr>
55 </tbody>
56 </table>
57 </div>
58 <!-- end of compare customization -->
59</script>
60
61<script type="template/klevu" id="klevuLandingTemplateFiltersCustom">
62 <% if(data.query[dataLocal].filters.length > 0 ) { %>
63 <div class="kuFilters" role="navigation" data-position="left" aria-label="Product Filters" tabindex="0">
64
65 <!-- start of compare customization -->
66 <div class="klevu-compare-widget klevu-compare-widget--klevu-hidden" id="klevu-compare-widget">
67 <ul class="klevu-compare-widget__images"></ul>
68 <div class="klevu-compare-widget__header">
69 <span><%= helper.translate("To compare")%><span class="klevu-compare-widget__selected-amount"></span></span>
70 <button id="klevu-compare-button" type="button" disabled><%= helper.translate("Compare")%></button>
71 </div>
72 </div>
73 <!-- end of compare customization -->
74
75 <h3 class="kuFiltersTitleHeading"><%=helper.translate("Narrow by")%></h3>
76 <% helper.each(data.query[dataLocal].filters,function(key,filter){ %>
77 <% if(filter.type == "OPTIONS"){ %>
78 <div class="kuFilterBox klevuFilter <%=(filter.multiselect)?'kuMulticheck':''%>" data-filter="<%=filter.key%>" <% if(filter.multiselect){ %> data-singleselect="false" <% } else { %> data-singleselect="true"<% } %>>
79 <div class="kuFilterHead <%=(filter.isCollapsed) ? 'kuExpand' : 'kuCollapse'%>">
80 <% var filter_label = (filter.label=="klevu_price") ? "price" : filter.label; %>
81 <%=helper.translate(filter_label)%>
82 </div>
83 <div data-optionCount="<%= filter.options.length %>" class="kuFilterNames <%= (filter.options.length <= 5 ) ? 'kuFilterShowAll': '' %> <%=(filter.isCollapsed) ? 'kuFilterCollapse' : ''%>">
84 <ul>
85 <% helper.each(filter.options,function(key,filterOption){ %>
86 <li <% if(filterOption.selected ==true) { %> class="kuSelected"<% } %>>
87 <a
88 target="_self"
89 href="#"
90 title="<%=helper.escapeHTML(filterOption.name)%>"
91 class="klevuFilterOption<% if(filterOption.selected ==true) { %> klevuFilterOptionActive<% } %>"
92 data-value="<%=helper.escapeHTML(filterOption.value)%>"
93 data-name="<%=helper.escapeHTML(filterOption.name)%>"
94 >
95 <span class="kuFilterIcon"></span>
96 <span class="kufacet-text"><%=filterOption.name%></span>
97 <% if(filterOption.selected ==true) { %>
98 <span class="kuFilterCancel">X</span>
99 <% } else { %>
100 <span class="kuFilterTotal"><%=filterOption.count%></span>
101 <% } %>
102 </a>
103 </li>
104
105 <% }); %>
106 </ul>
107 <% if(filter.options.length > 5 ) { %>
108 <div class="kuShowOpt" tabindex="-1">
109 <span class="kuFilterDot"></span><span class="kuFilterDot"></span><span class="kuFilterDot"></span>
110 </div>
111 <% } %>
112 </div>
113 </div>
114 <% } else if(filter.type == "SLIDER") { %>
115 <div class="kuFilterBox klevuFilter" data-filter="<%=filter.key%>">
116 <div class="kuFilterHead <%=(filter.isCollapsed) ? 'kuExpand' : 'kuCollapse'%>">
117 <% var filter_label = (filter.label=="klevu_price") ? "price" : filter.label; %>
118 <%=helper.translate(filter_label)%>
119 </div>
120 <div class="kuFilterNames sliderFilterNames <%=(filter.isCollapsed) ? 'kuFilterCollapse' : ''%>">
121 <div class="kuPriceSlider klevuSliderFilter" data-query = "<%=dataLocal%>">
122 <div data-querykey = "<%=dataLocal%>" class="noUi-target noUi-ltr noUi-horizontal noUi-background kuSliderFilter kuPriceRangeSliderFilter<%=dataLocal%>"></div>
123 </div>
124 </div>
125 </div>
126 <% } else if (filter.type == "RATING") { %>
127 <div class="kuFilterBox klevuFilter <%=(filter.multiselect)?'kuMulticheck':''%>" data-filter="<%=filter.key%>" <% if(filter.multiselect){ %> data-singleselect="false" <% } else { %> data-singleselect="true"<% } %>>
128 <div class="kuFilterHead <%=(filter.isCollapsed) ? 'kuExpand' : 'kuCollapse'%>">
129 <%=helper.translate(filter.label)%>
130 </div>
131 <div data-optionCount="<%= filter.options.length %>" class="kuFilterNames <%= (filter.options.length <= 5 ) ? 'kuFilterShowAll': '' %> <%=(filter.isCollapsed) ? 'kuFilterCollapse' : ''%>">
132 <ul>
133 <% helper.each(filter.options,function(key,filterOption){ %>
134 <li <% if(filterOption.selected ==true) { %> class="kuSelected"<% } %>>
135 <a
136 target="_self"
137 href="#"
138 title="<%=helper.escapeHTML(filterOption.name)%>"
139 class="klevuFilterOption<% if(filterOption.selected ==true) { %> klevuFilterOptionActive<% } %>"
140 data-value="<%=helper.escapeHTML(filterOption.value)%>"
141 data-name="<%=helper.escapeHTML(filterOption.name)%>"
142 >
143 <span class="kuFilterIcon"></span>
144 <span class="kufacet-text">
145 <div class="klevuFacetStars">
146 <div class="klevuFacetRating" style="width:<%=(20*Number(filterOption.name))%>%;"></div>
147 </div>
148 </span>
149 <% if(filterOption.selected ==true) { %>
150 <span class="kuFilterCancel">X</span>
151 <% } else { %>
152 <span class="kuFilterTotal"><%=filterOption.count%></span>
153 <% } %>
154 </a>
155 </li>
156
157 <% }); %>
158 </ul>
159 </div>
160 </div>
161 <% } else { %>
162 <!-- Other Facets -->
163 <% } %>
164 <% }); %>
165
166 <!-- <div class="kuFiltersFooter">
167 <a target="_self" href="javascript:void(0)" class="kuBtn kuFacetsSlideOut kuMobileFilterCloseBtn" role="button" tabindex="0" area-label=""><%=helper.translate("Close")%></a>
168 </div> -->
169
170
171 </div>
172 <% } %>
173</script>
174
175<script type="template/klevu" id="klevuLandingTemplateProductBlockCustom">
176 <%
177 var updatedProductName = dataLocal.name;
178 if(klevu.search.modules.kmcInputs.base.getSkuOnPageEnableValue()) {
179 if(klevu.dom.helpers.cleanUpSku(dataLocal.sku)) {
180 updatedProductName += klevu.dom.helpers.cleanUpSku(dataLocal.sku);
181 }
182 }
183 %>
184 <li ku-product-block class="klevuProduct" data-id="<%=dataLocal.id%>">
185 <div class="kuProdWrap">
186 <header ku-block data-block-id="ku_landing_result_item_header">
187 <%=helper.render('landingProductBadge', scope, data, dataLocal) %>
188 </header>
189 <% var desc = [dataLocal.summaryAttribute,dataLocal.packageText,dataLocal.summaryDescription].filter(function(el) { return el; }); desc = desc.join(" "); %>
190 <main ku-block data-block-id="ku_landing_result_item_info">
191 <div class="kuProdTop">
192 <div class="klevuImgWrap">
193 <a data-id="<%=dataLocal.id%>" href="<%=dataLocal.url%>" class="klevuProductClick kuTrackRecentView">
194 <img src="<%=dataLocal.image%>" origin="<%=dataLocal.image%>" onerror="klevu.dom.helpers.cleanUpProductImage(this)" alt="<%=updatedProductName%>" class="kuProdImg">
195 <%=helper.render('landingImageRollover', scope, data, dataLocal) %>
196 </a>
197 </div>
198 <!-- <div class="kuQuickView">
199 <button data-id="<%=dataLocal.id%>" class="kuBtn kuBtnLight kuQuickViewBtn" role="button" tabindex="0" area-label="">Quick view</button>
200 </div> -->
201 </div>
202 </main>
203 <footer ku-block="" data-block-id="ku_landing_result_item_footer">
204 <div class="kuProdBottom">
205 <div class="kuName kuClippedOne"><a data-id="<%=dataLocal.id%>" href="<%=dataLocal.url%>" class="klevuProductClick kuTrackRecentView" title="<%= updatedProductName %>"><%= updatedProductName %></a></div>
206 <% if(dataLocal.inStock && dataLocal.inStock != "yes") { %>
207 <%=helper.render('landingProductStock', scope, data, dataLocal) %>
208 <% } else { %>
209 <% if(klevu.search.modules.kmcInputs.base.getShowPrices()) { %>
210 <div class="kuPrice">
211 <%
212 var kuTotalVariants = klevu.dom.helpers.cleanUpPriceValue(dataLocal.totalVariants);
213 var kuStartPrice = klevu.dom.helpers.cleanUpPriceValue(dataLocal.startPrice,dataLocal.currency);
214 var kuSalePrice = klevu.dom.helpers.cleanUpPriceValue(dataLocal.salePrice,dataLocal.currency);
215 var kuPrice = klevu.dom.helpers.cleanUpPriceValue(dataLocal.price,dataLocal.currency);
216 %>
217 <% if(!Number.isNaN(kuTotalVariants) && !Number.isNaN(kuStartPrice)) { %>
218 <div class="kuSalePrice kuStartPrice kuClippedOne">
219 <span class="klevuQuickPriceGreyText"><%=helper.translate("Starting at")%></span>
220 <span><%=helper.processCurrency(dataLocal.currency,parseFloat(dataLocal.startPrice))%></span>
221 </div>
222 <% } else if(!Number.isNaN(kuSalePrice) && !Number.isNaN(kuPrice) && (kuPrice > kuSalePrice)){ %>
223 <span class="kuOrigPrice kuClippedOne">
224 <%= helper.processCurrency(dataLocal.currency,parseFloat(dataLocal.price)) %>
225 </span>
226 <span class="kuSalePrice kuSpecialPrice kuClippedOne">
227 <%=helper.processCurrency(dataLocal.currency,parseFloat(dataLocal.salePrice))%>
228 </span>
229 <% } else if(!Number.isNaN(kuSalePrice)) { %>
230 <span class="kuSalePrice kuSpecialPrice">
231 <%= helper.processCurrency(dataLocal.currency,parseFloat(dataLocal.salePrice)) %>
232 </span>
233 <% } else if(!Number.isNaN(kuPrice)) { %>
234 <span class="kuSalePrice">
235 <%= helper.processCurrency(dataLocal.currency,parseFloat(dataLocal.price)) %>
236 </span>
237 <% } %>
238 <%=helper.render('searchResultProductVATLabel', scope, data, dataLocal) %>
239 </div>
240 <% } %>
241 <% } %>
242 </div>
243 <div class="kuProdAdditional">
244 <div class="kuProdAdditionalData">
245 <% if(desc && desc.length) { %>
246 <div class="kuDesc kuClippedTwo"> <%=desc%> </div>
247 <% } %>
248 <%=helper.render('landingProductSwatch',scope,data,dataLocal) %>
249 <%=helper.render('klevuLandingProductRating',scope,data,dataLocal) %>
250 <% var isAddToCartEnabled = klevu.search.modules.kmcInputs.base.getAddToCartEnableValue(); %>
251 <% if(isAddToCartEnabled) { %>
252 <%=helper.render('landingPageProductAddToCart',scope,data,dataLocal) %>
253 <% } %>
254 </div>
255 </div>
256 </footer>
257 </div>
258
259 <!-- start of compare customization -->
260 <button class="klevu-compare" data-id="<%=dataLocal.id%>" data-itemGroupId="<%=dataLocal.itemGroupId%>">
261 <input id="klevuCompare_<%=dataLocal.id%>" class="klevu-compare__checkbox" type="checkbox" style="pointer-events:none"/>
262 <label for="klevuCompare_<%=dataLocal.id%>" class="klevu-compare__label"> <%= helper.translate("Compare")%> </label>
263 </button>
264 <!-- end of compare customization -->
265
266 </li>
267</script>