Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing "Buy Now" button to "Sold Out" Text.


Priest

Recommended Posts

Ok, I am hoping this would not be too hard. What I would like to do is on the Product Listing Page (not the product details page) if the stock for a certain product is 0, then instead of showing the "Buy Now" button, it displays the text "Sold Out."

 

I am trying to make this as simple as possible but it is something I greatly need.

 

Thanks,

Priest

Link to comment
Share on other sites

yeah nore could I, anyone has any suggestions... I wish we had 2 or 3 modules to choose from for "call for a quote". Linda makes a great effort but newbies like me can't work out what is required to actually install the Call Free, V3 or V4....

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

I have the free call for price but as yet have not gotten around to installing it.

there are update patches for it and the readme says this

Please read carefully and backup your programs before adding this add-on.

 

This has been written for the current 2.2 and is up to date through snapshot 6-30-2002

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

You can do something similar to what I've done. I turned the Quantity column into an "In Stock - Yes/No" column as follows (in product_listing.php)

 

          case 'PRODUCT_LIST_QUANTITY':
           $lc_align = 'right';
           if ($listing['products_quantity'] > 0) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 

                  'products_id=' . $listing['products_id']) . '">' . 'Yes</a>   ';
} else {
$lc_text = 'No   ';
}
           break;

You could edit the Buy Now code in a similar fashion.

Link to comment
Share on other sites

Thanks but I don't really want to have In stock on the products which are available, just out of stock on the products which are not available.

 

Any other suggestions?

Link to comment
Share on other sites

Millsy,

 

I agree completely. I would like it to show either "Buy Now" or Sold Out. How about if instead of the button, we just change it all to text. So the (clickable) text reads either "Buy Now" or "Sold Out."

 

It would be even better if the "Sold Out" text became un-clickable, and/or red but let's just deal with one that at a time.

 

-p-

Link to comment
Share on other sites

I did not suggest you use my code exactly - instead, I suggested you use it as a pointer for how to modify the Buy Now column code to be what you want. It is quite straightforward.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...