<?php
  /**
   * Home Grid
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2017
   * @version $Id: homeGrid.tpl.php, v1.00 2017-05-05 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
?>
<?php if($this->featured):?>
<div class="overflow">
  <div class="row divided phone-block-1 mobile-block-2 tablet-block-3 screen-block-4">
    <?php foreach($this->featured as $row):?>
    <div class="column" id="item_<?php echo $row->id;?>">
      <div class="wDimmer dimmable">
        <div class="wojo inverted dimmer">
          <div class="content">
            <div class="center half-padding">
              <p class="wojo semi text vertical-margin">
                <a href="<?php echo Url::url('/product', $row->slug);?>" class="white"><?php echo $row->title;?></a>
              </p>
              <p><?php echo Lang::$word->IN;?>
                <a href="<?php echo Url::url('/category', $row->cslug);?>" class="wojo white soft dimmed text"><?php echo $row->name;?></a>
              </p>
              <div class="wojo space inverted divider"></div>
              <div class="vertical-margin">
                <?php include(THEMEBASE . '/snippets/gridButton.tpl.php');?>
                <a data-tooltip="<?php echo Lang::$word->WISHLIST;?>" data-layout="grid" data-id="<?php echo $row->id;?>" class="wishlist wojo transparent circular icon button"><i class="icon heart"></i></a>
                <a data-tooltip="<?php echo Lang::$word->COMPARE;?>" data-layout="grid" data-id="<?php echo $row->id;?>" class="compare wojo transparent circular icon button"><i class="icon files"></i></a>
              </div>
              <div class="wojo space inverted divider"></div>
              <div class="vertical-margin">
                <span class="wojo large text"><?php echo Utility::renderPrice($row->is_sale, $row->price, $row->sprice, "bold black");?></span>
              </div>
            </div>
          </div>
        </div>
        <div class="wojo grid card">
          <?php if($row->is_sale):?>
          <span class="wojo tiny black top right attached label">-<?php echo Utility::salePercent($row->price, $row->sprice);?>%</span>
          <?php endif;?>
          <div class="content-center"><img src="<?php echo Product::hasThumb($row->thumb, $row->id);?>" alt="<?php echo $row->title;?>" class="wojo basic image"></div>
          <h4 class="vertical-padding truncate"><?php echo $row->title;?></h4>
          <div class="wojo bold text">
            <?php echo Utility::renderPrice($row->is_sale, $row->price, $row->sprice, "negative");?></div>
        </div>
      </div>
    </div>
    <?php endforeach;?>
  </div>
</div>
<?php endif;?>