[Skip to main content](#vessel-content)

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

##

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

6 years 4 days ago [\#326255](#326255) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  *[The carousel does not follow the setting 'Only with products'](/forum/43-carousel-slider/901284-the-carousel-does-not-follow-the-setting-only-with-products#326255 "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.")* was created by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")*

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.
[ ![ScreenShot11-22-20at02.43PM.PNG](/forum/attachment/51180) ](/forum/attachment/51180 "...0at02.43PM.PNG")

[ ![ScreenShot11-22-20at02.43PM001.PNG](/forum/attachment/51181) ](/forum/attachment/51181 "...02.43PM001.PNG")

- [ ![ScreenShot11-22-20at02.43PM.PNG](/forum/attachment/51180) ](/forum/attachment/51180 "...0at02.43PM.PNG") [ ](/forum/attachment/51180?download=1 "...0at02.43PM.PNG")
- [ ![ScreenShot11-22-20at02.43PM001.PNG](/forum/attachment/51181) ](/forum/attachment/51181 "...02.43PM001.PNG") [ ](/forum/attachment/51181?download=1 "...02.43PM001.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQzLWNhcm91c2VsLXNsaWRlci85MDEyODQtdGhlLWNhcm91c2VsLWRvZXMtbm90LWZvbGxvdy10aGUtc2V0dGluZy1vbmx5LXdpdGgtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

6 years 3 days ago [\#326281](#326281) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[The carousel does not follow the setting 'Only with products'](/forum/43-carousel-slider/901284-the-carousel-does-not-follow-the-setting-only-with-products#326281 "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.")*

Hi,

You're totally correct.
That setting is currently ignored in carousel mode.
Add the code: Code:

$rows = array(); if($this-&gt;params-&gt;get('only_if_products','-1')=='-1'){ $config = hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('only_if_products',@$defaultParams['only_if_products']); } $only_if_products = $this-&gt;params-&gt;get('only_if_products',0); foreach($this-&gt;rows as $row) { if($only_if_products &amp;&amp; $row-&gt;number_of_products &lt; 1) continue; $rows[] = $row; } $this-&gt;rows = $rows;

at the beginning of the view file category / carousel.php via the menu Display&gt;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](/forum/user/35364-neo191987 "View neo191987's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQzLWNhcm91c2VsLXNsaWRlci85MDEyODQtdGhlLWNhcm91c2VsLWRvZXMtbm90LWZvbGxvdy10aGUtc2V0dGluZy1vbmx5LXdpdGgtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.042 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
