<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<div class="content_toolbar">
<?php
include_once(dirname(__FILE__).'/_search.php');
?>
</div>
<div class="air"></div>
<?php
if (sizeof($products) > 0) {
	$row_idx = 0;
	foreach ($products as $product) {
		$product->loadRelatedObjects(REL_PARENT, array('ProductCategory'));
?>
<div class="list_table" id="full_product_list">
	<div class="l">
    	<a href="<?php echo $product->feature_img; ?>" target="_blank" title="<?php _e('Click to view large image!'); ?>">
        <img src="<?php echo $product->feature_smallimg; ?>" class="prdlist_thumb" /></a>
    </div>
	<div class="r">
        <p class="prd_shortdesc">
            <a href="index.php?<?php echo Html::xuriquery('mod_product', 'view', array('p_id' => $product->id)); ?>" title="<?php echo $product->name; ?>">
                <h3><?php echo $product->name; ?></h3></a>
            <?php echo Toolkit::substr_MB(strip_tags($product->description), 0, 120).'...'; ?>
            &nbsp;
            <a href="index.php?<?php echo Html::xuriquery('mod_product', 'view', array('p_id' => $product->id)); ?>" title="<?php _e('more'); ?>"><?php _e('more'); ?> &raquo;</a>
        </p>
        <p class="prd_info">
            <?php _e('Category'); ?>: <?php echo $product->masters['ProductCategory']->name; ?>
        </p>
   	</div>
    <div class="clear"></div>
</div>
<div class="air"></div>
<?php
		$row_idx = 1 - $row_idx;
	}
} else {
?>

<center><?php _e('No Records!'); ?></center>

<?php
}
?>

<?php
include_once(P_TPL.'/common/pager.php');
?>