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

#   Empty categories message

##

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago [\#330362](#330362) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330362 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")* was created by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")*

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.14

Hello

Some of our product categories have not any products for sale yet.

Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?

Something like.. "Currently there are no products in this category..."

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

5 years 7 months ago [\#330369](#330369) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330369 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hi,

Could you provide more information on the situation ?
I checked on your link and tried to select about 15 different categories and they all had products in them.
So I also used the text search to reduce the results to 0 and I did get a "no products found" message:
[ i.imgur.com/BGiGqlJ.png](https://i.imgur.com/BGiGqlJ.png)
So if you just want to change that text, you could use a translation override, but I suspect that you're talking about something else...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago -  5 years 7 months ago [\#330374](#330374) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330374 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

The screenshot that you send me shows the filter results page. This shows the message fine but we are talking about something else.

Please foollow the bellow link:
OUR_SITE.com/hikashop-menu-for-categories-listing

Now select category Deck / Ropes (third from the bottom to the top)

When you open this category to view the products in it, it shows absolutely nothing. We want to show the message when someone goes there through the categories list.

Thank you.

Last edit: 5 years 7 months ago by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile"). Reason: Edited the link so that the domain will not be visible.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 7 months ago -  5 years 7 months ago [\#330390](#330390) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330390 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello,

First you have to understand how to customize your view file, via the HikaShop Override system, and so have a look on **[ this documentation](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)**.

Then, we will guide you to perform this override, first you have to create an override view from the view **Category**/**listing**.
Around line **100**, you will see this : Code:

... $html = $this-&gt;loadTemplate($layout_type); if(!empty($html)) echo '&lt;div class="hikashop_subcategories_listing"&gt;'.$html.'&lt;/div&gt;'; if(!$this-&gt;module) ...

Add this kind of element for display your required message, only if there are nothing to display, and you will have this : Code:

... $html = $this-&gt;loadTemplate($layout_type); if(!empty($html)) echo '&lt;div class="hikashop_subcategories_listing"&gt;'.$html.'&lt;/div&gt;'; else echo '&lt;div class="hikashop_no_subcategories_listing"&gt;NO PRODUCT AVAILABLE&lt;/div&gt;'; if(!$this-&gt;module) ...

Hope this will help you to achieve what your requested.
Regards

Last edit: 5 years 7 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago -  5 years 7 months ago [\#330409](#330409) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330409 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

The message works Philip but...

Can we make it not show in the Brands categories?

Example...
When user is in a product details page, he sees the Manufacturer link. When clicking the manufacturer link he is transfered to a page that shows all the products from this manufacturer correctly, but right above the products it shows this message that is created by the modification you previously gave me.

Thank you

Last edit: 5 years 7 months ago by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile"). Reason: Just discovered a small problem with the solution provided

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 7 months ago -  5 years 7 months ago [\#330451](#330451) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330451 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello,

In order to refine our advice can you provide us with the following elements :
- An **url to the context** where the message is displayed when this isn't desired.
**=&gt;** No need to have the current custom message display.
- A **screenshot** of this same context but with the **Display view files** option activate on **Front-end**
**=&gt;** You will find this option from **Main HikaShop Configuration** =&gt; **Advanced** tab, first displayed option.

Awaiting your element to better answer you.
Regards

Last edit: 5 years 7 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago -  5 years 7 months ago [\#330462](#330462) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330462 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

(Removed from post owner) (here we do not want the "**NO PRODUCTS AVAILABLE**" message to how because as you can see there are products in this category.)

We need to show this message to all lowest level categories that do not have any products, no matter if you visit these categories by menu item or any other way.

- [ ![empty-category&#95;01.png](/forum/attachment/52214) ](/forum/attachment/52214 "...ategory&#95;01.png") [ ](/forum/attachment/52214?download=1 "...ategory&#95;01.png")

Last edit: 5 years 7 months ago by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 7 months ago -  5 years 7 months ago [\#330468](#330468) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330468 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello,

Thanks for your elements, these allow us to progress on your subject, and so can you try this code :
Previously, I suggest you this : Code:

... $html = $this-&gt;loadTemplate($layout_type); if(!empty($html)) echo '&lt;div class="hikashop_subcategories_listing"&gt;'.$html.'&lt;/div&gt;'; else echo '&lt;div class="hikashop_no_subcategories_listing"&gt;NO PRODUCT AVAILABLE&lt;/div&gt;'; if(!$this-&gt;module) ...

Try this to see if that works better : Code:

... $html = $this-&gt;loadTemplate($layout_type); if(!empty($html)) echo '&lt;div class="hikashop_subcategories_listing"&gt;'.$html.'&lt;/div&gt;'; if ((empty($html)) &amp;&amp; (empty(!$this-&gt;module))) { echo '&lt;div class="hikashop_no_subcategories_listing"&gt;NO PRODUCT AVAILABLE&lt;/div&gt;'; } if(!$this-&gt;module) ...

Hope this meet your expectations.
Regards

Last edit: 5 years 7 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago [\#330500](#330500) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330500 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Thank you for your reply Philip, but i could not test your patch.
When i apply it in the script, the category listing page gives a page with the message... "0 syntax error, unexpected '}', expecting end of file".
I am not a coder, so is it possible to check?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 7 months ago -  5 years 7 months ago [\#330518](#330518) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330518 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello,

We check the code that we provide but it seems that our code didn't have any mistake or typo, from this and your reported error message it seems that you have forget an "**;**".

To be sure, go back to the default file, **without modifications** and just pasted this code (in the same line): Code:

if ((empty($html)) &amp;&amp; (empty(!$this-&gt;module))) { echo '&lt;div class="hikashop_no_subcategories_listing"&gt;NO PRODUCT AVAILABLE&lt;/div&gt;'; }

To have this, the addition of code is here in red :
**...
if(!empty($html)) echo '&lt;div class="hikashop\_subcategories\_listing"&gt;'.$html.'&lt;/div&gt;';

if ((empty($html)) &amp;&amp; (empty(!$this-&gt;module))) {
echo '&lt;div class="hikashop\_no\_subcategories\_listing"&gt;NO PRODUCT AVAILABLE&lt;/div&gt;';
}

if(!$this-&gt;module){
...**

We can highly recommend you to use a code editor, because this tool will spot this kind of little error.
Hope this will help you to progress.
Regards

Last edit: 5 years 7 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago -  5 years 7 months ago [\#330643](#330643) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330643 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Thank you Philip for taking the time to help me. I appreciate it. You are right it was my mistake that was giving the error.

Unfortunately with the new code the message does not show at all...

Here is the code as it has been entered to listing.php
[ ![empty&#95;categories&#95;message.png](/forum/attachment/52250) ](/forum/attachment/52250 "...es&#95;message.png")

Let me try to explain better what we need.

We have a multi level category tree and only the bottom level categories contain products.
Example:
Category1
- Subcategory1
- Sub-Subcategory1
- Sub-Subcategory2
- Sub-Subcategory3
- ...
Only Sub-Subcategories contain products

Visitors can access these Sub-Subcategories 2 ways.

1. By clicking on a menu item that links directly to the Sub-Subcategory
2. By following the categories list menu item, and reach the Sub-Subcategory step by step

Example:
**Menu item link to Sub-Subcategory:** There is no message at all. The page shows nothing!

**Step by step following the categories till we reach the bottom level category:** There is no message at all. The page shows nothing!

Thank you

- [ ![empty&#95;categories&#95;message.png](/forum/attachment/52250) ](/forum/attachment/52250 "...es&#95;message.png") [ ](/forum/attachment/52250?download=1 "...es&#95;message.png")
- [ ![no&#95;message2.png](/forum/attachment/52251) ](/forum/attachment/52251 "no&#95;message2.png") [ ](/forum/attachment/52251?download=1 "no&#95;message2.png")
- [ ![no&#95;message1.png](/forum/attachment/52252) ](/forum/attachment/52252 "no&#95;message1.png") [ ](/forum/attachment/52252?download=1 "no&#95;message1.png")

Last edit: 5 years 7 months ago by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

5 years 7 months ago -  5 years 7 months ago [\#330663](#330663) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330663 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello,

Sorry for this but I have made a mistake, really sorry for this, I analyze deeper the solution let's restart from scratch, follow me step by step :
- First don't use **category**/**Listing** view but rather the **product**/**Listing**
- Go around **line 270**, find this code : Code:

} elseif(( !$this-&gt;module &#124;&#124; hikaInput::get()-&gt;getVar('hikashop_front_end_main',0) ) &amp;&amp; ($ctrl == 'product' &#124;&#124; $ctrl == 'category') &amp;&amp; $task == 'listing' &amp;&amp; !empty($this-&gt;filters) &amp;&amp; is_array($this-&gt;filters) &amp;&amp; count($this-&gt;filters) &amp;&amp; !empty($this-&gt;filter_set)) {

Code view :
[ ![alt](https://i.postimg.cc/MK3nHtRC/cf-listing.png) ](https://i.postimg.cc/MK3nHtRC/cf-listing.png "alt")

The part underlined in red is the one that must be deleted.

- Remove the part after the "**...*\|\| $ctrl == 'category') &amp;&amp; $task == 'listing'*** ", to have this : Code:

} elseif(( !$this-&gt;module &#124;&#124; hikaInput::get()-&gt;getVar('hikashop_front_end_main',0) ) &amp;&amp; ($ctrl == 'product' &#124;&#124; $ctrl == 'category') &amp;&amp; $task == 'listing') {

This solution is a little tricky but must better fit your needs, and will display automatically a message thanks to this code : Code:

echo '&lt;div class="hk-well hika_no_products"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt; ' . JText::_('HIKASHOP_NO_RESULT') . '&lt;/div&gt;';

Hope this will fit your needs.
Regards

Last edit: 5 years 7 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

The following user(s) said Thank You: [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")**
- [![liaskas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59465-liaskas "View liaskas's Profile") Topic Author
- [ Offline](/forum/user/59465-liaskas)

Less More

- Posts: 205
- Thank you received: 12
-
-

5 years 7 months ago [\#330694](#330694) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#330694 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

PERFECT....
Thank you! Everything is Ok now and no worries. What matters is that you have the will to help.
Thank you again.

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")**
- [![ilyaminsk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")
- [ Offline](/forum/user/59355-ilyaminsk)

Less More

- Posts: 220
- Thank you received: 10
-
-

4 years 9 months ago -  4 years 9 months ago [\#338565](#338565) by [ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")  Replied by *[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338565 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello.

1. Did as you wrote. Code:

"} elseif(( !$this-&gt;module &#124;&#124; hikaInput::get()-&gt;getVar('hikashop_front_end_main',0) ) &amp;&amp; ($ctrl == 'product' &#124;&#124; $ctrl == 'category') &amp;&amp; $task == 'listing') {"

[ ![2022-01-13&#95;162803.jpg](/forum/attachment/54188) ](/forum/attachment/54188 "...-13&#95;162803.jpg")

But for some reason it does not show correctly.

This message contains confidential information

[ ![2022-01-13&#95;162927.jpg](/forum/attachment/54189) ](/forum/attachment/54189 "...-13&#95;162927.jpg")

For some reason, the text does not say that there is no such product.
____________________________________________________

2. How to make sure that by entering these two searches, if the product is written incorrectly, it will be written: "There is no such product in this category"?

- [ ![2022-01-13&#95;162803.jpg](/forum/attachment/54188) ](/forum/attachment/54188 "...-13&#95;162803.jpg") [ ](/forum/attachment/54188?download=1 "...-13&#95;162803.jpg")
- [ ![2022-01-13&#95;162927.jpg](/forum/attachment/54189) ](/forum/attachment/54189 "...-13&#95;162927.jpg") [ ](/forum/attachment/54189?download=1 "...-13&#95;162927.jpg")

Last edit: 4 years 9 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

4 years 9 months ago [\#338566](#338566) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338566 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hi,

You have a translation issue.
The icon there will only display if there are no results and in that case, it will display the text for the translation key HIKASHOP_NO_RESULT next to it.
So that means that in your HikaShop translation file, you have the line:
HIKASHOP_NO_RESULT=""
which results in no message displayed.
But in the HikaShop English translation file (the main one), we have this:
HIKASHOP_NO_RESULT="No products found."
So you need to check your translations under the tab "Languages" of the HikaShop configuration and search for that translation key.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")**
- [![ilyaminsk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")
- [ Offline](/forum/user/59355-ilyaminsk)

Less More

- Posts: 220
- Thank you received: 10
-
-

4 years 9 months ago [\#338588](#338588) by [ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")  Replied by *[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338588 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello. Thanks. Helped. But another problem arose. When I open a subcategory in which there are other subcategories, it says that the product was not found. Example: This message contains confidential information

I would like such a message to appear only for the search, when the product is not found. Is it possible to do it this way?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

4 years 9 months ago -  4 years 9 months ago [\#338596](#338596) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338596 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello,

You can try **2** differents solutions :
**1.** First in the relative Item Menu (with the Id 2723), go to Categories options tab, and in Category data display
**=&gt;** Define the "**Only with products**" on "**Yes**"
Il the previous solution didn't work :
**2.** A custom css command to directl hide this part for required context.
**Example :**
**.required\_context\_id1 .hikashop\_submodules,
.required\_context\_id2 .hikashop\_submodules {
// To hide unwanted "no product found" message
display: none;
}**

Hope this will you to achieved what you need.
Regards

Last edit: 4 years 9 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")**
- [![ilyaminsk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")
- [ Offline](/forum/user/59355-ilyaminsk)

Less More

- Posts: 220
- Thank you received: 10
-
-

4 years 9 months ago [\#338622](#338622) by [ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")  Replied by *[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338622 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hello. 2. Need to add to custom.css in Hikashop configurations? Added something not working.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")**
- [![ilyaminsk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")
- [ Offline](/forum/user/59355-ilyaminsk)

Less More

- Posts: 220
- Thank you received: 10
-
-

4 years 9 months ago [\#338623](#338623) by [ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")  Replied by *[ilyaminsk](/forum/user/59355-ilyaminsk "View ilyaminsk's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338623 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

1. Did not help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

4 years 9 months ago [\#338650](#338650) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Empty categories message](/forum/4-how-to/902090-empty-categories-message#338650 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.14  Hello  Some of our product categories have not any products for sale yet.  Is there a way to show a message to visitors of these categories to inform them that there are no products in the parent category for the moment?  Something like.. &quot;Currently there are no products in this category...&quot;  Thank you")*

Hi,

I think it comes from the code in product / listing.php
By default you should now have: Code:

} elseif(( !$this-&gt;module &#124;&#124; hikaInput::get()-&gt;getVar('hikashop_front_end_main',0) ) &amp;&amp; ($ctrl == 'product' &#124;&#124; $ctrl == 'category') &amp;&amp; $task == 'listing' &amp;&amp; !empty($this-&gt;filters) &amp;&amp; is_array($this-&gt;filters) &amp;&amp; count($this-&gt;filters) &amp;&amp; !empty($this-&gt;filter_set)) {

You're basically missing the part Code:

&amp;&amp; !empty($this-&gt;filters) &amp;&amp; is_array($this-&gt;filters) &amp;&amp; count($this-&gt;filters) &amp;&amp; !empty($this-&gt;filter_set)

which says "only when filters are there and used".

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwMjA5MC1lbXB0eS1jYXRlZ29yaWVzLW1lc3NhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.193 seconds

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