Forums / General Questions / Filter Out of Stock Products from Listings

Filter Out of Stock Products from Listings

Locked

Started by philip937 on 4 Oct 2010, 3:07 PM · Views: 581

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
4 Oct 2010, 3:07 PM
#1
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Filter Out of Stock Products from Listings

Hi all,

I want to know if anyone knows how I can modify something so that all products with stock level = 0 do not show in the listings?

I know that if I switch the status to off this does it, however it has an undesirable affect as it stops google from still being able to crawl the pages.

So in summary, I need to not show out of stock products, but the product urls still crawlable.

Many Thanks

Phil

Phil Rogers
A problem shared is a problem solved.

4 Oct 2010, 3:28 PM
#2
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Filter Out of Stock Products from Listings

for some reason it always takes for me to post a question here and then suddenly I work out a solution for my self.

it was easy, I simply added

and p.products_quantity >= 1

below every

where p.products_status = 1

in the includes/index_filters/default_filter.php file

let me know if anyone see why this might cause any issues, as of now seem to do the trick perfectly :o)

Phil

Phil Rogers
A problem shared is a problem solved.