alwaysme Posted December 12, 2007 Share Posted December 12, 2007 i try to edit a script but i cannot seem to figure. Basically the line below display the PRICE, and if the user chose to have EBAY LISTING, the price will not display and instead an image will SHOW with a link. What i want is, THE PRICE TO SHOW even if there is an ebay listing, and the image to appear below it or above (it doesnt really matter). The script works fine with display the price until the account holder chooses to have ebay listing which will appear as an image instead of the numbers (price). hope u understand me // price, availability, condition echo "<div class='price'>"; echo "Price: "; if($row[ebay_url]) echo "<a href='$row[ebay_url]' target='_blank'><img class='none' src='comn/ebaymotors.gif'/></a>"; elseif($row[price]) echo $conf[currency].number_format($row[price]); elseif($row[price_alt]) echo $row[price_alt]; else echo "Call for Price"; if($row[sale]) echo "<br/><span>New Price: <strong>".$conf[currency].number_format($row[sale])."</span>"; echo "</strong><br/>"; Quote Link to comment Share on other sites More sharing options...
sureshp Posted December 12, 2007 Share Posted December 12, 2007 Try like this ======= // price, availability, condition echo "<div class='price'>"; echo "Price: "; if($row[price]) echo $conf[currency].number_format($row[price]); elseif($row[price_alt]) echo $row[price_alt]; else echo "Call for Price"; if($row[ebay_url]) echo "<BR><a href='$row[ebay_url]' target='_blank'><img class='none' src='comn/ebaymotors.gif'/></a>"; if($row[sale]) echo "<br/><span>New Price: <strong>".$conf[currency].number_format($row[sale])."</span>"; echo "</strong><br/>"; Quote Link to comment Share on other sites More sharing options...
jvrothjr Posted December 12, 2007 Share Posted December 12, 2007 its your if statment it hits the first if {if($row[ebay_url])} and does not do the elseif echo "Price: "; if($row[ebay_url]) echo "<a href='$row[ebay_url]' target='_blank'><img class='none' src='comn/ebaymotors.gif'/></a>"; if($row[price]) echo $conf[currency].number_format($row[price]); elseif($row[price_alt]) echo $row[price_alt]; else echo "Call for Price"; if($row[sale]) echo "<br/><span>New Price: <strong>".$conf[currency].number_format($row[sale])."</span>"; echo "</strong><br/>"; Quote Link to comment Share on other sites More sharing options...
alwaysme Posted December 12, 2007 Author Share Posted December 12, 2007 wow only rearranging the statement!! hehe! thanks guys so helpful and so quickly Quote Link to comment Share on other sites More sharing options...
revraz Posted December 12, 2007 Share Posted December 12, 2007 Logic is a pain huh? wow only rearranging the statement!! hehe! thanks guys so helpful and so quickly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.