Okay, I almost got this. I am using the following... ( I tried using } else { echo '<li>' . TEXT_IN_STOCK . '</li>';}} as you suggested but couldn't get it to work correctly)
<?php
if ($products_quantity == 1) {
echo '<li>' . TEXT_ONE_LEFT . '</li>';
} else {
if ($products_quantity == 2) {
echo '<li>' . TEXT_TWO_LEFT . '</li>';
} else { echo '<li>In Stock</li>';}}
?>
and
define('TEXT_ONE_LEFT', '<span style="color:red">ONLY ONE COPY LEFT!</span>');
define('TEXT_TWO_LEFT', '<span style="color:yellow">LOW STOCK</span>');
define('TEXT_IN_STOCK', '<span style="color: green">In stock</span>');
I use product: General and product: Music. I have
<?php
if ($products_quantity == 1) {
echo '<li>' . TEXT_ONE_LEFT . '</li>';
} else {
if ($products_quantity == 2) {
echo '<li>' . TEXT_TWO_LEFT . '</li>';
} else { echo '<li>In Stock</li>';}}
?>
in both /includes/templates/mostlygrey/templates/tpl_product_info_display.php and /includes/templates/mostlygrey/templates/tpl_product_music_info_display.php
On the general pages everything is working great except the words "In Stock" did not change to green for some reason (One left and low stock both have changed to yellow and red)
On the music pages I get TEXT_ONE_LEFT, TEXT_TWO_LEFT instead of "One left" or "Low stock". The words "In Stock" do show up though if I list more than two in stock. None have changed color.
Sorry if this is simple stuff, I'm not too knowledgeable with code and such.
Your help is mucho appreciated!
Bookmarks