Community Add-Ons

Add file to this package
Top » Images

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
Expand All / Collapse All
Installation in contribution Star Product v1.0 vigux 18 Jun 2008  

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.

Bug in new packaged file moiz4got 6 Feb 2008  
Correction Bug hannibal82_ 4 Feb 2008  
Error goyosa 7 Nov 2007  
New Products Icon 1.4 nexius2 2 Feb 2007  
1.3a jcall 30 Dec 2005  
1.3 update Jared Call 15 Feb 2005  
Bug Fix David Hanwell 24 Jan 2005  
New Products Icon 1.1 UPDATE Michiel Heeringa 23 Jan 2005  
New Products Icon 1.1 Michiel Heeringa 23 Jan 2005  
New Products Icon Jared Call 4 Dec 2004