Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

QTY in product_info


sjd256

Recommended Posts

Posted

Hi all,

 

I have searched the forums and the contribs for this one

and cannot find anything on it.

 

That could be because it's amazingly simple and i've completely

missed it :unsure:

 

 

How do I display the Qty in stock on the product_info page??

 

I have been able to use admin to add it to another page but there

doesn't seem to be any settings for the product_info page.

 

Many thanks in advance for any assistance.

 

Cheers

 

 

Steve

Posted

Thanks for the reply do you mean in the:

Configuration>Product Listing Page

 

This only seems to display the QTY on one of the other

pages but not on the product_info.php page.

 

All I want is for every product to display the qty in stock

on the product_info.php page.

 

Hopefully I don't have to individually set an option for every

product.

 

Cheers again

 

 

Steve

Posted

Hi,

 

Does anyone have the Stock Quantity displayed on their

product_info.php page??

 

Cheers

 

 

Steve

Posted

Finally found it at last - after two days of searching the forums!!

 

I don't like asking questions if I can help it and prefer to find

the solution first * but * the search part of the forums and

contributions is very frustrating. I am sure half the questions

wouldn't be asked if the answers (which are usually there) could

be found using the search.

 

Anyway in case anyone is looking for a solution to my original problem

here it is:

 

Add the following to the file: /catalog/product_info.php

 

<?php echo 'Quantity in Sock: ' . $product_info['products_quantity']; ?>

 

Thanks to Aalst for the above snippet.

 

Original thread with more info on this can be found Here

 

I have changed the snippet slightly to make it look a bit better and now

it shows the stock figure in a read only input box - I have copied it below

in case it's any use:

 

 <tr>
<td align="center" class="SmallText"><br>
<input type="text" name="quantity" value=" <?php echo $product_info['products_quantity']; ?>" maxlength="5" size="3" readonly><br>
Qty In Stock
</td>
</tr>

 

 

Hope that the above is helpful.

 

 

Cheers

 

 

Steve

Archived

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

×
×
  • Create New...