mobile version of my website

Hi

I am doing a mobile version of my website www.irhtoys.co.uk/mobile-index.php

it is all ok apart from I am changing one of the tabs that was Reviews to New Products

I have copied the coding from my products_new.php page and is displaying the products and the prices but the prices are displaying as £0.00

Can any one help please

The coding below is from my mobile-index.php

[php]


New Products


<?php
	 $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";

$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);
$row = 0;
$products_new_query = tep_db_query($products_new_split->sql_query);
while ($products_new = tep_db_fetch_array($products_new_query)) {
if ($new_price = tep_get_products_special_price($products_new[‘products_id’])) {
$products_price = ‘’ . $currencies->display_price($products_new[‘products_price’], tep_get_tax_rate($products_new[‘products_tax_class_id’])) . ’ ’ . $currencies->display_price($new_price, tep_get_tax_rate($products_new[‘products_tax_class_id’])) . ‘’;
} else {
$products_price = $currencies->display_price($products_new[‘products_price’], tep_get_tax_rate($products_new[‘products_tax_class_id’]));
}
echo ’





'. $currencies->display_price($new_price[‘products_price’], tep_get_tax_rate($products_new[‘products_tax_class_id’])) . ’

’ . “\n”;
if ((($row / 3) == floor($row / 3))) {
}
}
?>
[/php]

The code below is from my products_new.php page if it helps

[php]<?php

$products_new_query = tep_db_query($products_new_split->sql_query);
while ($products_new = tep_db_fetch_array($products_new_query)) {
  if ($new_price = tep_get_products_special_price($products_new['products_id'])) {
    $products_price = '<del>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>';
  } else {
    $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id']));
  }

?>

  <tr>
    <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td>
    <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><strong><u>' . $products_new['products_name'] . '</u></strong></a><br />' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br />' . TEXT_PRICE . ' ' . $products_price; ?><?php echo tep_draw_separator('pixel_trans.gif', '10', '50'); ?></td>
    <td align="right" valign="middle" class="smallText"><?php echo tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id'])); ?></td>
  </tr>
<?php } ?>[/php]

Hi, the variable ‘$currencies’ is an array that contains your pricing. Your code does not show how this array is constructed. There is probably a flag to test what currency is to be used depending on the users location. Most likely your problem is elsewhere and not the code you’ve shown.

Now, if your pulling this info from another website, that happens to be in Great Britain, you going to get the price in pounds most likely.

Hi aztech4mac

Thank you for the reply

I will try and have a look and fix it

I did find out that it is the currencies part causing the problem so will see what I can do with that

Sponsor our Newsletter | Privacy Policy | Terms of Service