Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Who knows the answer to this!


steliart

Recommended Posts

In the index page at the center and under the welcome message I have the "New Products of the month" displayed, each in a frame with:

 

- Product Title

- The Image of the product

- The Price

- A Buy Now button

 

- Model Number "WANTED"

 

Does anyone know how can I add the product's model number also

 

Need code, where to put it and in which page it goes.

 

Any help will be very much appreciated

 

Thank you

 

Stelios

Love & Light

Link to comment
Share on other sites

It is generated from \includes\boxes\whats_new.php

 

You ought to modify SQL to fetch model no. from appropirate table, populate array and display.

 

Thanks for the reply.

Sounds too much for my abilities.

Are you interested to guide me through with the codes?

 

If not, at least I know from where to start from.

 

thanks anyway

Stelios

Love & Light

Link to comment
Share on other sites

It is generated in the includes/modules/new_products.php.

 

The part pubdomains.com was referring to is the what's new box on the left.

 

You might check your database tables in which field the product number is stored, then add the field name to the two SELECT statements on top of the file, then add the field to the info_box_contents part and you're done.

Link to comment
Share on other sites

It is generated in the includes/modules/new_products.php.

 

The part pubdomains.com was referring to is the what's new box on the left.

 

You might check your database tables in which field the product number is stored, then add the field name to the two SELECT statements on top of the file, then add the field to the info_box_contents part and you're done.

 

 

many many thanks

Stelios

Love & Light

Link to comment
Share on other sites

It is generated in the includes/modules/new_products.php.

 

The part pubdomains.com was referring to is the what's new box on the left.

 

You might check your database tables in which field the product number is stored, then add the field name to the two SELECT statements on top of the file, then add the field to the info_box_contents part and you're done.

 

Hi

I have tryed for a long time now and i dont get it right.

If i give you the code can you correct it for me?

 

thanks

Love & Light

Link to comment
Share on other sites

HERE IS MY CODE AND THE PRODUCTS MODEL (NUMBER) IS STORED IN THE PRODUCTS FIELD

 

 

<?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_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_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>';

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