Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

show quanity


sidram

Recommended Posts

I seem to be having a problem showing the quanity of a product on the product page. quanity shows on the search results page but not on the indvidual product page. I am running 2.2 M1.

 

Any help would be great.

 

Thanks

 

Sidram

Link to comment
Share on other sites

You can add this to the product_info.php to pull the qty.

 

<?php

// BOF: WebMakers.com Added: Shoppe Enhancement Controller

// show product in stock qty

if (SHOW_PRODUCTS_INFO_INSTOCK=='1') {

?>

     <tr>

       <td colspan="2" class="main" align="right">In Stock: <?php echo tep_get_products_stock((int)$HTTP_GET_VARS['products_id']); ?></td>

     </tr>

<?php

}

// BOF: WebMakers.com Added: Shoppe Enhancement Controller

?>

 

To use that, I have a define('SHOW_PRODUCTS_INFO_INSTOCK','1') in my language file. Either add that or remove the IF portion and just use the rows.

 

To use that on other pages, you need to just replace the (int)$HTTP_GET_VARS['products_id'] with the proper products_id to look up.

Link to comment
Share on other sites

Glad that worked for you.

 

You might also want to peek at the Wiki site http://wiki.oscommerce.com and the Wiki Forum as well as Tips and Tricks Forum.

 

Also, try out the Search function on many questions ... you can learn a lot flipping though questions related to your issues.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...