<?php
  /**
   * Bestsellers
   *
   * @package Digital Downloads Pro
   * @author wojoscripts.com
   * @copyright 2010
   * @version $Id: bestseller.php, v2.00 2011-07-10 10:12:05 gewa Exp $
   */
  if (!defined("_VALID_PHP"))
      die('. دسترسی مستقیم به این محل مجاز نمی باشد');
	  
  $sellerrow = $item->mostSold();
?>
<?php if($sellerrow):?>
<!-- Start Bestseller-->
  <div class="sidebar">
    <div class="inner">
      <h4><img src="<?php echo SITEURL; ?>/images/bestseller-icon.png" alt=""  />پـر فـروش تـریـن هـا</h4>
      <div class="content">
      <ul class="alt-li">
      <?php foreach ($sellerrow as $bsrow):?>
      <?php $url = ($core->seo) ? $core->site_url . '/view-item/' . intval($bsrow['pid']) . '/' . sanitize($bsrow['slug']) . '.html' : $core->site_url . '/item.php?pid=' . intval($bsrow['pid']);?>
      <li><a href="<?php echo $url;?>"><?php echo $bsrow['title'];?></a></li>
      <?php endforeach;?>
      </ul>
      </div>
    </div>
  </div>
<?php endif;?>  
<!-- End Bestseller/--> 