<?php if (!defined('IN_CONTEXT')) die('access violation error!'); ?>

<div class="art_list">
	<div class="art_list_title"><?php echo $category->name; ?></div>
	<div class="art_list_search"><?php include_once(dirname(__FILE__).'/_search.php'); ?></div>
	<div class="prod_list_con">
        <?php
        if (sizeof($products) > 0) {
            $row_idx = 0;
            foreach ($products as $product) {
                $product->loadRelatedObjects(REL_PARENT, array('ProductCategory'));
        ?>
			<div class="prod_list_list">
				<div class="prod_list_pic"><a href="<?php echo Html::uriquery('mod_product', 'view', array('p_id' => $product->id)); ?>" title="<?php echo $product->name; ?>"><img name="picautozoom" src="<?php echo $product->feature_smallimg; ?>" border="0" /></a></div>
				<div class="prod_list_name"><a href="<?php echo Html::uriquery('mod_product', 'view', array('p_id' => $product->id)); ?>" title="<?php echo $product->name; ?>"><?php echo $product->name; ?></a></div>
				<div class="prod_list_type"><?php _e('Category'); ?>: <a href="<?php echo Html::uriquery('mod_product', 'prdlist', array('cap_id' => $product->masters['ProductCategory']->id)); ?>"><?php echo $product->masters['ProductCategory']->name; ?></a></div>
				<div class="prod_list_intr"><?php echo Toolkit::substr_MB(strip_tags($product->description), 0, 72).((Toolkit::strlen_MB(strip_tags($product->description))>72)?'...':''); ?></div>
			</div>
			<?php
                $row_idx = 1 - $row_idx;
            }
        } else {
        ?>
		<div class="norecords"><?php _e('No Records!'); ?></div>
		<?php } ?>
	</div>
	<?php include_once(P_TPL_VIEW.'/view/common/pager.php'); ?>
</div>
