<?php
/**
 *\licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
 *\portion code Copyright (c) 2002 osCommerce
 *\package osCSS-2 <www http://www.oscss.org>
 *\version 2.1.0
 *\date  28/11/10, 08:18
 *\author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
 *\encode UTF-8
 *\group boxes
 *\file includes/boxes/categories.php
 *\brief display process calcul category, and retrun array
*/
// require_once(DIR_WS_CLASSES . 'category_tree.php');
$CategoryTree = new category_tree;
$osCSS_Cache=new osCSS_Cache;
$cPath=$page->the_var('cPath');
$language=$page->the_var('language');
$tableau='';
global $tableau;
 if (($osCSS_Cache->read('categoriesBox-' . $language .'-cpath-'.$cPath.'-type', 720) === false) ) {

    $CategoryTree->setSpacerString('', 2);
    $CategoryTree->setCategoryProductCountString('(',')');

    $tableau = $CategoryTree->getTree() ;

    $s=tep_get_include_contents('box.categories');

    $osCSS_Cache->writeBuffer($s);
  }
  else $s= $osCSS_Cache->getCache();
  $array=array('title'=>__('categories menu'),'content'=>tep_output_string_protected($s,false,true));
?>