Is it possible to Hide Products with no images?

Open to all! Ask other shopowners for help.
Post Reply
lecarlb
Contributor
Posts: 316
Joined: Mon Oct 26, 2020 5:26 pm
Phoenix Version:
Has thanked: 48 times
Been thanked: 9 times

Is it possible to Hide Products with no images?

Post by lecarlb »

Hello,

As the subject suggests, I would like to hide products with no image or products with a placeholder image such as no_image.gif. I think it'll be good for both SEO and UX.

I'm aware that I could make those products inactive but it will be tedious with many products.

Thanks in advance.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4561
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 413 times

Re: Is it possible to Hide Products with no images?

Post by burt »

update products set products_status = 0 where products_image = 'no_image.gif'
lecarlb
Contributor
Posts: 316
Joined: Mon Oct 26, 2020 5:26 pm
Phoenix Version:
Has thanked: 48 times
Been thanked: 9 times

Re: Is it possible to Hide Products with no images?

Post by lecarlb »

burt wrote: Fri Oct 27, 2023 9:46 am update products set products_status = 0 where products_image = 'no_image.gif'
@burt where would that line be placed? Or is it a hook?

Thanks.
Dan Cole
Senior Contributor
Posts: 499
Joined: Fri Oct 25, 2019 2:14 pm
Phoenix Version: 1.0.8.21
Has thanked: 67 times
Been thanked: 61 times

Re: Is it possible to Hide Products with no images?

Post by Dan Cole »

I think he means for you to run it against your database using phpMyAdmin.

Dan
lecarlb
Contributor
Posts: 316
Joined: Mon Oct 26, 2020 5:26 pm
Phoenix Version:
Has thanked: 48 times
Been thanked: 9 times

Re: Is it possible to Hide Products with no images?

Post by lecarlb »

Dan Cole wrote: Mon Oct 30, 2023 12:28 pm I think he means for you to run it against your database using phpMyAdmin.

Dan
Thanks, I didn't think of that.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply