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

#   Hide products from search for public users

##

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

2 years 9 months ago [\#359113](#359113) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359113 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 4.7.1
-- Joomla version -- : 3.10.12

Hi,

I have a category accessed only by registered users but if i search a product from that category as a public user i see the product.
So how can i hide all products from this category from public users?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc3NTktaGlkZS1wcm9kdWN0cy1mcm9tLXNlYXJjaC1mb3ItcHVibGljLXVzZXJzP3RtcGw9bWFya2Rvd24=) 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
-
-

2 years 9 months ago [\#359117](#359117) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359117 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

Hi,

So I understand you're using the filter system of HikaShop for your search. And thus you're using with it a menu item configured to display all the products, upon which the filtering is done. I think that's where the issue. When the system loads the sub categories of the menu item, in order to then load the products of these categories, it doesn't add a check on the access level of those categories.
Try changing the line: Code:

$children = $categoryClass-&gt;getChildren($pageInfo-&gt;filter-&gt;cid,true,array(),'',0,0);

to: Code:

$categoryFilters = array('a.category_published=1'); hikashop_addACLFilters($categoryFilters,'category_access', 'a'); $children = $categoryClass-&gt;getChildren($pageInfo-&gt;filter-&gt;cid,true, $categoryFilters,'',0,0);

in the file components/com_hikashop/views/product/view.html.php and it should then take the access level of the sub categories into account.
Please let us know how it goes so that we can include the change for the next release of HikaShop.

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

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

2 years 9 months ago [\#359131](#359131) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359131 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

Hi!

It didn't work i still see the product.
I could give you access if you want?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc3NTktaGlkZS1wcm9kdWN0cy1mcm9tLXNlYXJjaC1mb3ItcHVibGljLXVzZXJzP3RtcGw9bWFya2Rvd24=) 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
-
-

2 years 9 months ago [\#359134](#359134) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359134 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

Hi,

Yes, please provide a backend and a FTP access.

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

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

2 years 9 months ago [\#359162](#359162) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359162 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

I did.

Thank you!

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

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

Less More

- Posts: 611
- Thank you received: 13
-

2 years 9 months ago [\#359164](#359164) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359164 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

Hi, I have a similar issue.

Category set to access by Administrator and Super Users only.

It is used for expired products that still need to be accessed for reference and when products come back into stock.

By using the search (smart search) it will still show the product but you get a 404 error? biggest issue with this is the bots are crawling these links and giving me loads of error notices?

Tried blocking the category to the bots with no joy?

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc3NTktaGlkZS1wcm9kdWN0cy1mcm9tLXNlYXJjaC1mb3ItcHVibGljLXVzZXJzP3RtcGw9bWFya2Rvd24=) 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
-
-

2 years 9 months ago [\#359175](#359175) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359175 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

Hi,

@verzevoul
Thanks for your access, however I don't see the problem on your website.
You provided the example of the product on the page /en/searching-results/product/lavens-straps-rubber-strap-straight-18-20-22mm
If I look for this product in your backend, I can see that it is linked to the category "Λουράκια Σιλικόνης - PVC - PU"
This category is published and its access level is set to "all".
So it is normal that it shows up in the search results.
If I unpublish this category, or if I change its access level to a specific user group, then the product doesn't appear on the result page:
/en/searching-results/product/listing?filter__1=LaVens+Straps+Rubber+Strap+Straight+18-20-22mm
So it seems to be working as expected.

@mohairbears
Without more precise information I can't say much. Can you provide the URL of the search page ? Can you provide an example of product with the issue ? Can you provide a screenshot of its settings ?
Please open a new thread so that we can discuss this separately.

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

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

2 years 9 months ago [\#359177](#359177) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Hide products from search for public users](/forum/26-product-category-display/907759-hide-products-from-search-for-public-users#359177 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10.12  Hi,  I have a category accessed only by registered users but if i search a product from that category as a public user i see the product. So how can i hide all products from this category from public users?  Thank you")*

Hi!

Ah i didn't know i could change the category's access level!

It works yes.

Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc3NTktaGlkZS1wcm9kdWN0cy1mcm9tLXNlYXJjaC1mb3ItcHVibGljLXVzZXJzP3RtcGw9bWFya2Rvd24=) 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.053 seconds

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