Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display stock level on product_info page


Guest

Recommended Posts

I've searched around and can't quite find what I'm looking for.

 

Is it possible to show the number of items in stock on the product_info page, along with description, etc. It shows on my category pages (e.g. index.php/cPath/21_23), but not on product_info.

Link to comment
Share on other sites

Figured it out myself from pasting together different suggestions that hadn't previously worked:

 

<?php

if ($product_info['products_quantity'] > 0)

{

echo $product_info['products_quantity'];

}

else

{

echo "Out of Stock";

}

;?>

Link to comment
Share on other sites

  • 3 weeks later...
Figured it out myself from pasting together different suggestions that hadn't previously worked:

 

<?php

if ($product_info['products_quantity'] > 0)

{

echo $product_info['products_quantity'];

}

else

{

echo "Out of Stock";

}

;?>

 

Hi there,

 

Thanks for posting your solution, but im wondering if you can help a complete php novice.

 

I have put your code into the catalog/product_info.php file. The problem is all i get is a number in the middle of the page showing the amount of stock.

For example, the 1 on this page

http://www.chapelradiocontrol.com/shop/pro...products_id=705

 

How can i get it to display text before that number 1, e.g. Number in stock

 

Like i said, im a noob at this so sorry if it's so simple.

 

The out of stock part works great.

 

Cheers

 

Daz

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...