Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

hi Guys

 

can anyone tell me if there is a mod to add an extra field in the product listing

 

below picture is an example of what i need

oscommerce.jpg

 

i need to add below each product, to show in stock or out of stock

 

can anyone advise

Posted

hi Guys

 

can anyone tell me if there is a mod to add an extra field in the product listing

 

below picture is an example of what i need

oscommerce.jpg

 

i need to add below each product, to show in stock or out of stock

 

can anyone advise

 

Hi,

 

You have Products Extra Fields and also Availability to solve your issues!

 

 

Barbara

Posted

If you are not using the inventory control Product Extra Fields would be the way to go, but if you are using the stock control it might be easiest just to add some logic to the product display page. Something like

 

<span>

<?php

if (retrieve stock level) > 0

echo 'Product is in stock'

else

echo 'Product is out of stock'

?>

</span>

 

I'm a newbie too so that's just pseudocode obviously but an idea.

--------------------------------

Justin

 

osC is awesome. Thanks everyone.

Posted

I just played with this since I might want it too...

 

Try this, with "Display Product Quantity" set to 5 (Admin-> Configuration-> Product Listing), change the following in catalog/includes/modules/product_listing.php starting at line 115

 

case 'PRODUCT_LIST_QUANTITY':

$lc_align = 'right';

$lc_text = ' ' . $listing['products_quantity'] . ' ';

break;

 

to

 

case 'PRODUCT_LIST_QUANTITY':

$lc_align = 'right';

if ($listing['products_quantity'] > 0) {

$lc_text = 'Currently In Stock';}

else {

$lc_text = 'Out of Stock';}

break;

 

Then you can play with formatting later obviously.

--------------------------------

Justin

 

osC is awesome. Thanks everyone.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...