Skip to main content

The carousel does not follow the setting 'Only with products'

More
5 years 10 months ago #326255 by neo191987
Hi, I created a module with content for a category, but when I activate the carousel, the setting 'Only with products' is not observed - all available categories are displayed.

Please Log in or Create an account to join the conversation.

More
5 years 10 months ago #326281 by nicolas
Hi,

You're totally correct.
That setting is currently ignored in carousel mode.
Add the code:
Code:
$rows = array(); if($this->params->get('only_if_products','-1')=='-1'){ $config = hikashop_config(); $defaultParams = $config->get('default_params'); $this->params->set('only_if_products',@$defaultParams['only_if_products']); } $only_if_products = $this->params->get('only_if_products',0); foreach($this->rows as $row) { if($only_if_products && $row->number_of_products < 1) continue; $rows[] = $row; } $this->rows = $rows;
at the beginning of the view file category / carousel.php via the menu Display>Views and it should work properly.
We'll add that patch on our end for the next version.
The following user(s) said Thank You: neo191987

Please Log in or Create an account to join the conversation.

Time to create page: 0.230 seconds
Powered by Kunena Forum