<?php
/*
  osCommerce, Open Source E-Commerce Solutions 
http://www.oscommerce.com 

Copyright (c) 2003 osCommerce 

osCommRes, Services Oline 
http://www.oscommres.com 
Copyright (c) 2005 osCommRes 

Freeway eCommerce 
http://www.zac-ware.com/freeway 
Copyright (c) 2007 ZacWare 

Released under the GNU General Public License
*/

// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();


if ($random_product = tep_random_select("select products_id, products_image_1,products_title_1,products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status='1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW))
{
  $random_product['products_name'] = tep_get_products_name($random_product['products_id']);
  $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
    

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

  if ($random_product['specials_new_products_price'])
    {

      $whats_new_price_special = $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
    }

}

print '    <item>' . "\n";

print '      <title>' . htmlspecialchars($random_product['products_name']) . '</title>'. "\n";

print '      <price>' . $whats_new_price . '</price>'. "\n";

if ($random_product['specials_new_products_price'])
{
  print '      <specialprice>' . $whats_new_price_special . '</specialprice>' . "\n";
}

print '      <link>' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'], NONSSL) . '</link>' . "\n";

print '      <img>' . HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES . "small/" . $random_product['products_image_1'] . '</img>' . "\n";
			  

print '    </item>' . "\n";

?>


<?php
/*

	osCommerce, Open Source E-Commerce Solutions ---- http://www.oscommerce.com
	Copyright (c) 2002 osCommerce
	Released under the GNU General Public License

	IMPORTANT NOTE:

	This script is not part of the official osC distribution but an add-on contributed to the osC community.
	Please read the NOTE and INSTALL documents that are provided with this file for further information and installation notes.

	script name:	FaqDesk
	version:		1.2.5
	date:			2003-09-01
	author:			Carsten aka moyashi
	web site:		www..com

*/
?>