Jump to content

Dollar Price Not Showing Up. Please Help!


toda

Recommended Posts

Sorry to say I am a complete beginner in php. The dollar price in the stock details page not showing. Could anyone please help on this issue? The code, at least to my understanding is as follows.

 

 

  <tr>
                      <td><table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top:8px;">
                        <tr class="vehicle_name_price_text">
                          <td width="572" style="padding-left:30px;"><h2><?php echo $rowmake['name'];?> <?php echo $row['name'];?> - FOB Price: 
                          <?php 
                      if($row['dis_price']){
                      echo '<span class="old-price">US $'.number_format($row['price']).'</span> ';
 echo '<span class="price"> US $' .number_format($row['dis_price']).'</span>';
                      
                      }else {
                       echo 'US $'. number_format($row['price']);
                       }
                      
                      ?>
                          </h2></td>
                          
                          <td width="185"> </td>
                        </tr>
                      </table></td>
                    </tr>
 
Thanks and regards

 

Link to comment
Share on other sites

Can you add the line

print_r($row) ; echo '<br />';

immediately after the <?php

This will allow you to see what is in the row to see if there is a price there. I suspect it is blank.

Does the price show elsewhere in your system? Did this ever work?

 

Thanks,

David

Link to comment
Share on other sites

David,

 

Thanks for the help . I added the line as you said and the result is total loss of what I previously had.  Now it is giving the following 

Toyota T/LANDCRUISER PRADO - FOB Price: Array ( [0] => 19 [id] => 19 [1] => 1 [maker] => 1 [2] => 0019 [refno] => 0019 [3] => Wagon [type] => Wagon [4] => TRJ150-XXXXX70 [chassisno] => TRJ150-XXXXX70 [5] => T/LANDCRUISER PRADO [name] => T/LANDCRUISER PRADO [6] => 2009 [model] => 2009 [7] => Right Hand [drive] => Right Hand [8] => 4 [grade] => 4 [9] => 4/A [auction_grade] => 4/A [10] => 2009 [year] => 2009 [11] => December [month] => December [12] => Gasoline/Petrol [fuel] => Gasoline/Petrol [13] => Automatic [transmission] => Automatic [14] => Other => Other [15] => 7 [seats] => 7 [16] => 4 [doors] => 4 [17] => 18500 [km] => 18500 [18] => 2690 [cc] => 2690 [19] => Available [status] => Available [20] => Stock List [stock_location] => Stock List [21] => 0 [price] => 0 [22] => [dis_price] => [23] => Anti-Lock Brakes,Driver Airbag,Passenger Airbag,Side Airbag,A/C: Front,A/C: Rear,Cruise Control,Navigation System,Power Steering,Remote Keyless Entry,Child Seat,Power Seats,Power Windows,Rear Window Defroster,Rear Window Wiper,AM/FM Radio,AM/FM Stereo,Premium Sound,Satellite Radio,DVD,Alloy Wheels,Power Door Locks,Power Mirrors,Sunroof,Power Slide Door,Custom Wheels,Fully Loaded,Maintenance Records [options] => Anti-Lock Brakes,Driver Airbag,Passenger Airbag,Side Airbag,A/C: Front,A/C: Rear,Cruise Control,Navigation System,Power Steering,Remote Keyless Entry,Child Seat,Power Seats,Power Windows,Rear Window Defroster,Rear Window Wiper,AM/FM Radio,AM/FM Stereo,Premium Sound,Satellite Radio,DVD,Alloy Wheels,Power Door Locks,Power Mirrors,Sunroof,Power Slide Door,Custom Wheels,Fully Loaded,Maintenance Records [24] => [comments] => ) 
US $0
Link to comment
Share on other sites

The code David gave you has verified what Jessica has just said, that the price is 0 in your data. Problem solved.

 

 

[21] => 0 [price] => 0

 

If this is you opinion of debugging

 

and the result is total loss of what I previously had

you should probably consider taking up something other than programming.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

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.