fix blocklayered

This commit is contained in:
Nolwenn 2016-07-07 16:00:56 +02:00
parent d44345340a
commit 5e9e4d9824
4 changed files with 13 additions and 6 deletions

View File

@ -3165,7 +3165,7 @@ class BlockLayered extends Module
if ($nb_products == 0)
$product_list = $this->display(__FILE__, 'blocklayered-no-products.tpl');
else
$product_list = $smarty->fetch(_PS_THEME_DIR_.'product-list.tpl');
$product_list = $smarty->fetch(_PS_THEME_DIR_.'product-list-blocs.tpl');
$vars = array(
'filtersBlock' => utf8_encode($this->generateFiltersBlock($selected_filters)),

View File

@ -346,7 +346,7 @@ function reloadContent(params_plus)
if (!ajaxLoaderOn)
{
$('.products-list > .row').prepend($('#layered_ajax_loader').html());
$('.products-list').prepend($('#layered_ajax_loader').html());
$('.products-list').css('opacity', '0.7');
ajaxLoaderOn = 1;
}
@ -400,6 +400,7 @@ function reloadContent(params_plus)
}
data += '&nbProduct=3';
data += '&column=true';
// Get nb items per page
if($('#nb_item_per_page').length)
@ -433,13 +434,13 @@ function reloadContent(params_plus)
$('.category-product-count, .nb-products').html(result.categoryCount);
if (result.productList)
$('.products-list > .row').html(utf8_decode(result.productList));
$('.products-list').html(utf8_decode(result.productList));
else
$('.products-list > .row').html('');
$('.products-list').html('');
$('.products-list').css('opacity', '1');
if ($.browser.msie) // Fix bug with IE8 and aliasing
$('.products-list > .row').css('filter', '');
$('.products-list').css('filter', '');
if (result.pagination.search(/[^\s]/) >= 0) {
var pagination = $('<div/>').html(result.pagination)
@ -521,7 +522,7 @@ function reloadContent(params_plus)
window.location = current_friendly_url;
lockLocationChecking = true;
$('body, html').animate({ 'scrollTop' : $('.products .product-anchor').offset().top}, 500);
// $('body, html').animate({ 'scrollTop' : $('.products .product-anchor').offset().top}, 500);
$('.hide-action').each(function() {
hideFilterValueAction(this);

View File

@ -1,5 +1,8 @@
{if isset($products) && $products}
{if !isset($column) && Tools::getValue('column')}
{assign var=column value=Tools::getValue('column')}
{/if}
<!-- liste produits -->
{foreach from=$products item=product name=products key=key}

View File

@ -1,5 +1,8 @@
{if isset($products) && $products}
{if !isset($column) && Tools::getValue('column')}
{assign var=column value=Tools::getValue('column')}
{/if}
<!-- liste produits -->
{foreach from=$products item=product name=products key=key}