Jump to content

mAdMaCCa

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mAdMaCCa's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Obviously U were right, I was testing the wrong field, however, it still doesn't work... The result has changed though...now it's always "Yes" regardless of how much stock there is n :P Any chance you can point me in the right direction??? Cheers mAdMaCCa
  2. Aaaaah, see wot U mean...wot a muppet! I'll have a play, thanx!
  3. Just the way the script works...it doesn;t display the stock level at all if the price is zero. Any price over zero and it displays!
  4. :-[ Hi, i'm a noob to php and have a sort of OSCommerce version of an ecommerce site. I want to be able to replace the current displayed stock level with a text description based on how much stock there is. I've spent hours here and on various other php sites trying to find the answer, and thought I had...however, regardless of the stock level it always displays the same result! Anyway, here is the CASE code I have worked out and I can't seem to see what is wrong with it...can anyone help please??? [code]   <?php   $txtQuantity = "";     switch (true){     case $product_info['products_price'] <= 0:     $txtQuantity = "More In Soon";     break;     case $product_info['products_price'] <= 10:     $txtQuantity = "Last Few Remaining!";     break;     case $product_info['products_price'] > 10:     $txtQuantity = "Yes";     break;     }      ?> [/code] The result, as I guess most of your are aware, is always [color=red]"Last Few Remaining!"[/color] The line that follows is: [code]<td class="boxtext" align="center"><?php echo '' . (($product_info['products_price'] > 0) ?  '' . TEXT_QUANTITYSTOCK . ' '  . $txtQuantity  : ''); ?></td>[/code] but i've only put it here so you can see how I display it, i'm pretty sure it's got nothing to do with it not working  ??? Please HELP!!! Thanks in advance, mAdMaCCa
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.