PDA

View Full Version : Display Quanity in stock


headguy
November 24th, 2004, 12:03 AM
Hi again,

We need to display the quanity in stock of the items and in ver 1.4 I just used the variable $Number_in_Stock and placed the code in the show_product.php file.

Now I'm trying to do the same thing in ver 1.5 but since it now supports warehouses the variable in now $Stock and it's being pulled from the REL_Products__Warehouses table.

Is there an easy way to do this in ver 1.5?

Thanks,

george

headguy
November 24th, 2004, 01:47 AM
I added the following php code to show_product.php

<font color="red"><?=$product['Number_in_Stock']?> In Stock</font><br>

and the correct product quantities are displayed however when an item is added to the cart the number is not reduced.

Note: We have added this code in show_product.php and removed the detail link as we don't need a detailed description:

<input type="text" name="quantity" size="3" value="1">
<?=$Add_to_Cart?><br>

Hope that helps.

Thanks,
george