Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show product quantity


Guest

Recommended Posts

Posted

You will need to add the code that checks and displays the particular product's stock quantity to the product info page.

 

As a side note, to improve the performance of your site set Admin > Configuration > My Store > Display category counts to false. ;)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted
You will need to add the code that checks and displays the particular product's stock quantity to the product info page.

 

As a side note, to improve the performance of your site set Admin > Configuration > My Store > Display category counts to false. ;)

 

 

ok thanks, hopefully someone can tell me the code. I have also made that change to false what does it do exactly?

Posted

Setting the "Show Category Counts" to false removes the number in parentheses from each category that you have, which is a lot of unnecessary queries.

 

There are 2 ways to implement what you want to do.

 

The first is to simply display the quantity in stock near the model number in which the proper code to add to your product_info.php page around line 100 is to add:

	  <tr>
	<td class="main"><?php echo $product_info['products_quantity']; ?></td>
  </tr>

you can put this wherever you want the display to occur.

 

Otherwise you can set Admin > Configuration > Stock > Allow Checkout to false, which will prevent someone from being able to order a product which you do not have sufficient stock of.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted
Setting the "Show Category Counts" to false removes the number in parentheses from each category that you have, which is a lot of unnecessary queries.

 

There are 2 ways to implement what you want to do.

 

The first is to simply display the quantity in stock near the model number in which the proper code to add to your product_info.php page around line 100 is to add:

	  <tr>
	<td class="main"><?php echo $product_info['products_quantity']; ?></td>
  </tr>

you can put this wherever you want the display to occur.

 

Otherwise you can set Admin > Configuration > Stock > Allow Checkout to false, which will prevent someone from being able to order a product which you do not have sufficient stock of.

 

OK how would i do it so it reads QUANTITY: 4 , because it just shows a number sitting there it could mean anything.

 

Thanks again,

 

Kirsten

Posted

Edit youR includes/languages/[language].php file to add:

define('TEXT_QUANTITY', 'Quantity:');

then modify the code presented above to be:

	  <tr>
	<td class="main"><?php echo TEXT_QUANTITY . $product_info['products_quantity']; ?></td>
  </tr>

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted
Edit youR includes/languages/[language].php file to add:

define('TEXT_QUANTITY', 'Quantity:');

then modify the code presented above to be:

	  <tr>
	<td class="main"><?php echo TEXT_QUANTITY . $product_info['products_quantity']; ?></td>
  </tr>

 

 

Thanks that's much better: http://www.keepnthememories.com.au/catalog/

 

Kirsten

Archived

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

×
×
  • Create New...