Jump to content

Allow-oosp in product-list is not working with Layered navigation block enable


Recommended Posts

Hi,
in file product-list.tpl is used condition product.allow_oosp (Deny Orders When out of stock). This ensures that the Add to Cart button is inactive. 
 
When I turn on the module Layered navigation block then stop working condition and all buttons Add to Cart are active!
 
I found that problem related to the file blocklayered.php (module Blocklayered) at line 479
public function hookProductListAssign($params)
{
global $smarty;
if (version_compare(_PS_VERSION_,'1.5','<') && !Configuration::get('PS_LAYERED_INDEXED')
|| version_compare(_PS_VERSION_,'1.5','>') && !Configuration::getGlobalValue('PS_LAYERED_INDEXED'))
return;
// Inform the hook was executed
$params['hookExecuted'] = true;
// List of product to overrride categoryController
$params['catProducts'] = array();
$selected_filters = $this->getSelectedFilters();
$filter_block = $this->getFilterBlock($selected_filters);
$title = '';
if (is_array($filter_block['title_values']))
foreach ($filter_block['title_values'] as $key => $val)
$title .= ' – '.$key.' '.implode('/', $val);


$smarty->assign('categoryNameComplement', $title);
$this->getProducts($selected_filters, $params['catProducts'], $params['nbProducts'], $p, $n, $pages_nb, $start, $stop, $range);

I attach pictures  product-list page when module Blocklayered is on or off .

 

PS is version 1.5.4

 

Any way to fix that was module Layered navigation block is enabled and simultaneously  the condition allow_oosp work? Thanks.
 
 
 

post-571702-0-22563200-1395564413_thumb.jpg

post-571702-0-79093900-1395564415_thumb.jpg

Link to comment
Share on other sites

×
×
  • Create New...