Jump to content

How to hide products from main category with PS1.7?


stevencage

Recommended Posts

I have search everywhere with no success. The problem is I want to hide product list from my main category. I have lots products in the sub categories but the main category is showing all the products from my sub categories which make my main category loading very slow. This is with PS1.7. I found some topics with older versions but the codes are different. Anyone can help? Thanks a lot.

Link to comment
Share on other sites

3 hours ago, Sofia Marques said:

Hi :)

In the product you can select the categories you want it to appear. Have you tried taking the category selection where you don't want it to appear?

yes, that's the first thing I have done. The products only have sub categories select, not the main category. so basically main category have no product yet it still show the products from subcategories. 

Link to comment
Share on other sites

1 hour ago, ndiaga said:

Hi,

You can hide  the  products  from the main category   and  show  only  products from subcategories  that you can list by subccategory  for better performance with this module:

 

thank you for the offer but I'm at learning stage, would rather sort it out by coding instead of using Module.

Link to comment
Share on other sites

6 minutes ago, stevencage said:

yes, that's the first thing I have done. The products only have sub categories select, not the main category. so basically main category have no product yet it still show the products from subcategories. 

Can you give us the link to see the site and check how it appears, please?

Link to comment
Share on other sites

If you already removed the products from main category, have you cleared smarty and browser cache as well ? Perhaps you are seeing old cached page ?

A link to your site would be appreciated in this case, for to inspect onsite the problem you are having, perhaps the slowness it is a module you are using and not the products itself.

Link to comment
Share on other sites

I have made a new website ruby81.ml which is fresh install of PS1.7.6.1 without any added module. I changed all demo products into only one subcategory selected yet it still shows in the main category. I also create 2 test item that only have subcategory selected, it's still the same. Every caches has been cleared. Try to edit the category.tpl by adding {if $category->id == '#'} but PS1.7 is not like PS1.6. this method is not working. Any 1 have any solutions beside a module which I think is a bit overkill. Thanks.

Link to comment
Share on other sites

6 hours ago, stevencage said:

ruby81.ml

If you have enabled the module featured products, then it has applied what you did. I cannot see any product on main site. The purpose to link the products to "root" is for to have them linked to the module "featured products".

Pay attention that one category must be a main category ! You cannot link products only to sub-categories. If you add a product only to a sub-category it will be not shown everywhere ! Just made a test on fresh installed 1.7.6.

Added the product "cushion sub-ctegory" only to a sub-category:

grafik.thumb.png.e4eb1c55017ec715c6e260dd2917bd7a.png

grafik.png.a574c152875e6d9937dc693ff57ccf71.png

It is not visible as you can see:

grafik.thumb.png.1f1758861ba68ee70b04c1a646a4772a.png

It is also not searchable: grafik.thumb.png.88f548f753dcb00a4b1f41bbf0898093.png

Perhaps you are using on your PS 1.6. an adapted non-native theme working by this way, but it's not Prestashop native code.

If your problem is with filter (facetted search, or what?) If yes you should reset it and re add all filters.

grafik.thumb.png.a0318ec6e0fe4033c2b154ff7f85acf8.png

Link to comment
Share on other sites

no, the problem is nothing about feature products module, it's the product that has only one category selected showing on the other category. like below for example, I only want test1 shows only on the Men category not the Clothes category.

In fact, the CLOTHES category should have nothing as every products shows here are under MEN and WOMEN category, I don't know if this is how the PS should work this way or it's a bug. 

tt.jpg

rr.jpg

Edited by stevencage (see edit history)
Link to comment
Share on other sites

19 hours ago, Daresh said:

The products from subcategories show probably because of the faceted search module, you can configure it not to shop products from subcategories.

you are the man! problem solved. that's so simple without even coding. Thank you so much.

Link to comment
Share on other sites

  • 4 months later...
On 1/23/2020 at 7:40 AM, Daresh said:

The products from subcategories show probably because of the faceted search module, you can configure it not to shop products from subcategories.

Thank you!! was so easy that I feel stupid :)

Do you know a way to remove the SORRY message that appears if there is no products on the category?

PS: I am already displaying my subcategories there but that message below look really annoying.

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...