New Products Icon
for osCommerce Online Merchant v2.2
New Products Icon 1.0
Dec 04, 2004
Authors: Jared Call, Bobby
Credit to Chemo (Bobby) for showing me how to condense some of this code
What this contrib does:
=========================
In both the New Products listing and the regular catalog listing, this contribution adds a "new" icon next to the product's name if the product was added to your store within the past 30 days.
Disclaimer: This contrib has been designed for and tested with osCommerce 2.2 MS2. While it should easily work, perhaps with minor modifications, with other versions of osCommerce, it has not been tested as such.
Support thread: http://forums.oscommerce.com/index.php?showtopic=124459
Legend: 
Download

Report
In the top of file find the following code:
<?php
immediately after that code, add the following:
// added for New Product Icon contribution
$today_time = time();
// end addition for New Product Icon contribution
find the following code:
$star_products = tep_db_fetch_array($star_products_query);
$star_products['products_name'] = tep_get_products_name($star_products['products_id']);
Add the following afterwards:
// added for New Product Icon contribution
// 2592000 = 30 days in the unix timestamp format
if ( ($today_time - strtotime($star_products['products_date_added'])) < 2592000) {
$star_products['products_name'] .= ' <br>' . tep_image_button('icon_newarrival.gif', TEXT_ICON_NEW_PRODUCT);
}
// end addition
My english is not so good, but I wait understand this lines.
Saludos y suerte.
There was a small error in the product_listing.php file in the package for the new installation.
Have made the necessary changes and uploading full package.
correction of bug
1054 - Unknown column 'p.products_id' in 'on clause'
select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '16'
To many error coding in the last version
-----------------------
and product-info.php indstead of prodcuts-info.php
-----------------------
there is to time in product listing.php
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_text = TABLE_HEADING_MODEL;
$lc_align = '';
break;
case 'PRODUCT_LIST_NAME':
---------------------
and the
$lc_text = . $img_new_product' <a href="' . tep_href_link(FILEN
would never work in this coding
---------------------
never found in product-info.php something look like that and I try on stock OSC 2.2 MS2
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading" valign="top"><?php echo $img_new_product . $products_name; ?></td>
<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
</tr>
</table></td>
</tr>
<tr>
--------------------
the old version would perhaps work on don't try it sorry.
sorry for my english I'm not american
Feb 02, 2007
1.4 - Sylvain Grosset
- added icon in product description
- changed var $listing and product name to $img_new_product
- added an icon folder in languages/images
- put the icon before the product name
- added ": product name" after "new" on mouse_over
- modified icon_newarrival.gif for blinking icon
added GPL license.
No other changes.
Full package.
changelog:
1.3 - Jared Call
- cleaned up readme
- re-added files that were missing from 1.2 release
- gave transparent background to English and Dutch icons
- removed unnecessary condition from if-else statement when adding icon after time check
- added icon to "New Products for <month>" box on index.php
Fixed bug where customer searches for a product and all of the results are displayed as new.
Demo (Live Site)
www.linemanhut.co.uk
The readme in the posted file did contain the modifications but some of the files didn't.
Please use this file!!
Added multi language support. Now each language can have its own icon and alttext. Included are English and Dutch.
Added multi language support. Now each language can have its own icon and alttext. Included are English and Dutch.
New Products Icon 1.0
Dec 04, 2004
Authors: Jared Call, Bobby
Credit to Chemo (Bobby) for showing me how to condense some of this code
What this contrib does:
=========================
In both the New Products listing and the regular catalog listing, this contribution adds a "new" icon next to the product's name if the product was added to your store within the past 30 days.
Disclaimer: This contrib has been designed for and tested with osCommerce 2.2 MS2. While it should easily work, perhaps with minor modifications, with other versions of osCommerce, it has not been tested as such.
Support thread: http://forums.oscommerce.com/index.php?showtopic=124459