Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Anyone working on a product availability contribution?


GFW

Recommended Posts

Hi,

 

is anyone working on a product availability contribution to display f.e. red/yellow/green depending on the stock?

 

I found a few threads on this issue but now one right now who is working on this.

 

many thx

Link to comment
Share on other sites

found this contribution:

 

<?php

$prod_quantity = tep_get_products_stock($products_id);

switch ($prod_quantity) {

case 0:

print "Test";

break;

case 1:

print "Almost Gone";

break;

case 3:

print "Low";

break;

case 4:

print "Limited";

break;

default:

print "test";

}

?>

 

 

it works fine with text, but when i try to use

 

print "<img src="test.gif" border="0">"; instead of limited, low or whatever i get an error..

 

any comments?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...