Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new product feature no longer working


Guest

Recommended Posts

Posted

Hi Guys,

 

Any ideas why the new products module, which displays the most recent item added to our site in the middle of the page has changed. It wont update itself any longer?

I believe its a file called _new_one.php to blame if this helps??? ANy ideas or solutions would be great!

 

 

<?

$products_new1_array = array();

$products_new1_query_raw = "select p.products_id, pd.products_name, pd.products_description, 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_new1_query = tep_db_query($products_new1_query_raw);

 

 

 

 

while (($products_new1 = tep_db_fetch_array($products_new1_query)) && (++$n <= 1)):

 

if ($new1_price = tep_get_products_special_price($products_new1['products_id']))

$products_price = $currencies->display_price($new1_price, tep_get_tax_rate($products_new1['products_tax_class_id']));

else

$products_price = $currencies->display_price($products_new1['products_price'], tep_get_tax_rate($products_new1['products_tax_class_id']));

 

if (tep_not_null($products_new1['specials_new1_products_price']))

{

$lc_text = ' <s>' . $currencies->display_price($products_new1['products_price'], tep_get_tax_rate($products_new1['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($products_new1['specials_new1_products_price'], tep_get_tax_rate($products_new1['products_tax_class_id'])) . '</span> ';

}

else

{

$lc_text = ' ' . $currencies->display_price($products_new1['products_price'], tep_get_tax_rate($products_new1['products_tax_class_id'])) . ' ';

}

 

$image = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new1['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new1['products_image'], $products_new1['products_name'],'366','','border=0') . '</a>';

$name = $products_new1['products_name'];

$price = $lc_text;

$text = $products_new1['products_description'];

 

?>

<table cellspacing=0 cellpadding=1 border=0>

<tr bgcolor=c3c3c3>

<td>

 

<table width=10% cellspacing=0 cellpadding=0>

<tr bgcolor=EBEAEA>

<td><? echo $image; ?></td>

</tr>

<tr bgcolor=EBEAEA>

<td>

 

<table width=100% cellpadding=5>

<tr>

<td class=boxtext colspan=2>

<a class=head><? echo $name; ?></a>

<br>

<p><? echo $text; ?></p>

</td>

</tr>

<tr>

<td><a class=head><? echo $price; ?></a></td>

<td align=right><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new1['products_id']) . '"><img border="0" src=ch/product_moreinfo.gif></a>'; ?></td>

</tr>

</table>

 

</td>

</tr>

</table>

 

</td>

</tr>

</table>

<?

 

endwhile;

 

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...