'; $.ajax({ type: 'GET', url: '/kereses-kategoria/kontrollerek?paginate=20&page='+page+'&'+$( ".search_productsv2" ).serialize().replace(/[^&]+=\.?(?:&|$)/g, ''), dataType: 'json', success: function (data) { /* lapozó létrehozása */ var search_products_paging = $(".search-pagination").paging(data.pages.total, { format: "< (q -) nncnn (- p) >", perpage: data.pages.paginate, lapping: 0, onClick: function (page) { search_productsv2($(page.delegateTarget).data('page')); }, onFormat: function (type) { switch (type) { case 'block': if (!this.active) return '
' + this.value + ''; else if (this.value != this.page) return '
' + this.value + ''; return '
' + this.value + ''; case 'right': case 'left': if (!this.active) { return ""; } return '
' + this.value + ''; case 'next': return '
'; case 'prev': return '
'; case 'fill': if (this.active) { return '
...'; } } return ""; } }); search_products_paging.setPage(page); /*var image_size = 207; if($(document).find('.search_box').length > 0){ image_size = 240; }*/ var image_size = 240; $( ".products" ).html(null); $('.search_count').html($.number(data.pages.total, 0, '.', ' ')); $.each(data.products, function(index, item) { var product_second_image = item.images[0]; if(typeof item.images[1] !== "undefined"){ product_second_image = item.images[1]; } $( ".products" ).append( $.tmpl( product_sizev2+product_template_new+'
' , { "plus_18" : item.plus_18, "buyable" : item.buyable, "product_id" : item.id, "product_name" : item.name, "release_date" : item.releaseDate, "is_release_date" : item.is_release_date, "product_image" : item.images[0]+'&height='+image_size+'&width='+image_size, "product_image2" : product_second_image+'&height='+image_size+'&width='+image_size, "product_url" : item.url, "price" : item.grossPrice, "price_format" : XuPeSystem.Currency.symbol_left+$.number(item.grossPrice, XuPeSystem.Currency.decimals, XuPeSystem.Currency.decimal_separator, XuPeSystem.Currency.thousands_separator)+XuPeSystem.Currency.symbol_right, "sale_price" : item.discountedPrice, "sale_price_format" : XuPeSystem.Currency.symbol_left+$.number(item.discountedPrice, XuPeSystem.Currency.decimals, XuPeSystem.Currency.decimal_separator, XuPeSystem.Currency.thousands_separator)+XuPeSystem.Currency.symbol_right, "price_percent" : (((item.discountedPrice - item.grossPrice)*100) / item.discountedPrice).toFixed(2), "rating_count" : item.ratingCount, "rating_percent" : item.ratingPercent, "is_new" : item.is_new, /*"tags" : item.tags,*/ }) ); }); if(data.pages.total > 0){ $(".search-pagination").show(); }else{ $(".products").html('