Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need to change what happens to sold-out products


Guest

Recommended Posts

Posted

I would like to set things up so that when a product's stock hits zero, it still appears on the product list, but without the "Buy Now" button. It would also be nice if the product's quantity read "SOLD OUT" instead of "0", but that's not too important.

 

(Right now, when a product is sold out it disappears from the list completely.)

 

Any help is appreciated, thanks!

 

-Conor

Posted

Hey, I added your "sold out" contrib and now I get the following error message:

 

 

 

1054 - Unknown column 'products_sold' in 'field list'

 

select products_sold, products_quantity from products where products_id = '28'

 

[TEP STOP]

 

 

 

(That middle line is a line from the first change I made to includes/modules/product_listing.)

Posted

Update:

I was messing around with the code and I somehow managed to fix it. :) I changed

 

$productsold_query = tep_db_query("select products_sold, products_quantity from products where products_id = '" . $listing['products_id'] . "'");

 

To:

 

$productsold_query = tep_db_query("select products_quantity from products where products_id = '" . $listing['products_id'] . "'");

 

 

Any comments are appreciated, as I have no idea whether I stumbled onto a real solution for the problem, or whether this is just a temporary fix that might cause problems in other areas...

Posted

i think i messed up - which page did that error appear on ?

Your online success is Paramount.

Posted

yep you are correct - taking it out is fine - my bad.

 

contrib updated:

Your online success is Paramount.

  • 10 months later...
Posted
try the contrib in my sig.

 

I tried this contib, but when you try to add an IN STOCK item to the shopping cart, I get

 

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/zensicallife.com/httpdocs/catalog/includes/application_top.php:654) in /home/httpd/vhosts/zensicallife.com/httpdocs/catalog/includes/functions/general.php on line 29

 

I've checked the files for whitespace, and I don't see any. There are other contribs that a former owner of the site did (gift registry, etc.) and I'm a php n00b, so I have no idea what to try.

 

Any ideas?

Posted

This contrib does not touch the app_top file.

 

Re-check the install.

Your online success is Paramount.

Posted
This contrib does not touch the app_top file.

 

Re-check the install.

 

 

I didn't make any changes to the app_top file. i only made changes to product_info and that's the error I get.

Archived

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

×
×
  • Create New...