<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @package osCSS-2 <www http://www.oscss.org>
  @version 2.0.9
  @date  20/05/10, 11:41
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
*/

Class feeds {

  var $leflux;


  function feeds(){
    $this->title=CL_TITLE_FEEDS;
    $this->description=CL_DESC_FEEDS;
    $this->link=tep_href_link(FILENAME_DEFAULT);
    $this->leflux=array();
  }

  function feed(){

    global $page,$languages_id,$currencies;

    $option=array('orderby'=>'p.products_date_added DESC, pd.products_name',
		  'limit'=>'20',
		  );
    $array=product::get_query('','','',$option);

    foreach($array as $products_new){
      $list['title']=htmlspecialchars($products_new->products_name) ;
      $list['link']=tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new->products_id, 'NONSSL') ;
      $list['image']=htmlspecialchars(tep_image(DIR_WS_IMAGES . $products_new->products_image, $products_new->products_name, $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')));
      $list['description']=htmlspecialchars($products_new->products_description);

      $this->leflux[]=new objectInfo($list);
    }

    return $this->leflux;
  }

}
?>