Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Do not display out of stock items


MetalAges

Recommended Posts

Posted

Hey there everyone.

 

I've been scouring the forum/contributions for hours and can't seem to find my answer so here I am posting.

 

I simply want all out of stock items (0 quantity) to not display on my store. I am having a huge blowout sale and most of the items I will not be stocking again. I also don't want people misled to think they are buying it only to be told on checkout it isn't in stock.

 

Any help/guidance would be greatly appreciated!

Posted
Hey there everyone.

 

I've been scouring the forum/contributions for hours and can't seem to find my answer so here I am posting.

 

I simply want all out of stock items (0 quantity) to not display on my store. I am having a huge blowout sale and most of the items I will not be stocking again. I also don't want people misled to think they are buying it only to be told on checkout it isn't in stock.

 

Any help/guidance would be greatly appreciated!

 

in most queries for products you will see the where condition :

 

products_status = 1

 

You might add the condition :

 

products_quantity > 0

 

so :

 

select xxxxxxxx

where products_status = 1 and

products_quantity > 0 and

etc....

Treasurer MFC

Posted
in most queries for products you will see the where condition :

 

products_status = 1

 

You might add the condition :

 

products_quantity > 0

 

so :

 

select xxxxxxxx

where products_status = 1 and

          products_quantity > 0 and

          etc....

 

So far I can get it not to display the info for an out of stock item but only once the item is clicked. If I click on my categories, then on the particular letter of the item, then the item shows, still by clicking on the category navigation. Shows up if using search as well. I have edited so far:

index_products.tpl.php

product_info.tpl.php

products_new.tpl.php

as well as the index.php in the english directory. Do you/anyone know which particular file I need to edit to make it so it doesn't show using the category nav or search? I am still not familiar enough with OsCommerce to know where to find the individual little critters.

 

I should also add that I am using the template system BTS v1.4 in case that applies. I edited the above 3 tpl files within my own theme.

Posted
HAH! I think I got it, I missed the index.php in root which had some calls in there. Thanks for the guidance!

 

For the archives, I also had to edit the file advanced_search_result.tpl.php (also within my template>content folder).

Posted
For the archives, I also had to edit the file advanced_search_result.tpl.php (also within my template>content folder).

 

normally when somebody orders a product and you have set the subtract stock to true and the new stock goes to 0, osc automatically sets products_status to 0 and the product will not show. This until you set the status back to 1 in admin, so you can show soldout products if you so desire.

Treasurer MFC

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...