Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What is wrong here?


steliart

Recommended Posts

I am trying so much here to make the model number displayed on the "New Products of the month" in the center index page, NOT the "Whats New" on the left.

 

I manage to get the following

TEXT_PRODUCTS_MODEL

to appear on the products with a working link to the product info, but the model number is not there only that text.

 

Here is my code of the /catalog/includes/modules/new-products.php page

 

PLEASE ANYONE HELP ME

 

Thanks

 

 

 

<?php

/*

$Id: new_products.php,v 1.0 2004/01/09 22:49:58 hpdl Exp $

*/

?>

 

 

<div align="center">

<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table1" bgcolor="#364A53">

<tr>

<td bordercolor="#96A4AA" style="border-style: solid; border-width: 1px">

<p align="center">

<img border="0" src="/catalog/images/banners/460x125.gif"></td>

</tr>

<tr>

<td style="border-top-style: solid; border-top-width: 1px">

<p align="center">

<img border="0" src="/catalog/images/3px.gif" width="3" height="3"></td>

</tr>

</table>

</div>

 

 

<!-- new_products //-->

 

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => ('Featured Products'));

 

new contentBoxHeading($info_box_contents, "Center");

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_model, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

} else {

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_model, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

}

 

$row = 0;

$col = 0;

$info_box_contents = array();

while ($new_products = tep_db_fetch_array($new_products_query)) {

$product_query = tep_db_query("select products_name, products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

#PR Build product information box

$product_info_str = '';

$product_info_str = '<table border="0" width="100%" align="center" cellspacing="0" cellpadding="0" class="productBoxHeading_tb"><tr>';

$product_info_str .= '<td height="14" class="productBoxHeadingLcorner"></td>';

$product_info_str .= '<td height="14" class="productBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $product['products_name'] . '</a> </td>';

$product_info_str .= '<td height="14" class="productBoxHeadingRcorner"></td>';

$product_info_str .= '</tr></table>';

$product_info_str .= '<table border="0" width="100%" align="center" cellspacing="0" cellpadding="0" class="productBoxOuter"><tr>';

$product_info_str .= '<td class="productBoxLSide"></td>';

$product_info_str .= '<td valign="top" class="productBoxMSide">';

$product_info_str .= '<table border="0" cellspacing="0" cellpadding="0" class="productBox" valign="top">';

$product_info_str .= '<tr><td width="50%">';

$product_info_str .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

$product_info_str .= '</td><td width="50%">';

$product_info_str .= '<table border="0" width="100%" cellspacing="0" cellpadding="0">';

$product_info_str .= '<tr><td align="center">';

$product_info_str .= '';

$product_info_str .= '</td></tr><tr><td align="center" class="az_main_price">';

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

$product_info_str .= '</td></tr><tr><td align="center" class="main"><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a><br><br>';

 

 

$product_info_str .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . TEXT_PRODUCTS_MODEL . ' <b> ' . $products_new['products_model'] . '</a></td>';

 

 

 

 

 

$product_info_str .= '</td></tr></table>';

$product_info_str .= '</td></tr></table>';

if ($col == 0)

{

$product_info_str .= '</td><td class="productBoxRSide_l">'. tep_draw_separator('pixel_trans.gif', '1', '1') .'</td></tr></table>';

}

else

{

$product_info_str .= '</td><td class="productBoxRSide"> </td></tr></table>';

}

$product_info_str .= '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>';

$product_info_str .= '<td class="productBoxLBottom"></td>';

$product_info_str .= '<td class="productBoxMBottom"><table width="100%" class="expender_tb"><tr><td></td></tr></table></td>';

$product_info_str .= '<td class="productBoxRBottom"></td></tr></table>';

 

$info_box_contents[$row][$col] = array('align' => 'left',

'params' => 'class="smallText" width="50%" valign="top"',

'text' => $product_info_str);

 

$col ++;

if ($col > 1) {

$col = 0;

$row ++;

}

}

 

new newProductsBox($info_box_contents, true, "Center");

?>

<!-- new_products_eof //-->

 

<tr>

<td>

<p align="center">

<a href="http://www.studio69cy.com/catalog/index.php?cPath=69&osCsid=e0c0855b1d8764bc568806373e8bbadd">

<img src="images/softline.gif" width="460" height="206" border="0"></a>

</td>

</tr>

Love & Light

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...