Skip to Content
Menu
This question has been flagged
1 Reply
7245 Views

Hello,
I would like to ask if there is any good solution to filter/hide some of the products seen in shop. Right now I use something like this: I added some boolean fields to the product.template model, next I edited the code when Im in the shop via html editor (for example when there is foreach loop I added one condition: if product.delivery4(created boolean field) then show the product. My problem is that it doesnt show all products when I refresh the shop after editing code. I can find them via search, but I cant find them looking through /shop. Any ideas?
Thanks in advance.

Avatar
Discard
Best Answer

The products in the /shop are only displayed when they has been published to the website. Find those products that you want to hide and in the tab Sales of the product form put it to non published

Avatar
Discard
Author

But is there a way to hide some items on a condition? My main goal was to hide products for users that have zip code which is unsupported.

Yes but you need to tweak the product template of the website_sale by inheritance or just create a new template for displaying the products in another page or where you like.

Related Posts Replies Views Activity
0
Aug 24
181
1
Jun 23
2342
0
Jun 23
696
0
May 22
1367
2
May 22
2205