<?php
$this->language->load('spicylicious_custom/spicy');
$text_wish = $this->language->get('text_wish');
$text_compare = $this->language->get('text_compare');
?>
<?php if (($setting['position'] == 'content_top') || ($setting['position'] == 'content_bottom')){ ?>

<div class="box">
  <h2 class="heading-title"><span><?php echo $heading_title; ?></span></h2>
  <div class="box-content">
    <div class="box-product fixed">
      <?php foreach ($products as $product) { ?>
      <div class="prod_hold">
        <?php if ($product['thumb']) { ?>
        <a class="wrap_link"  href="<?php echo $product['href']; ?>"><span class="image"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></span></a>
        <?php } ?>
        <?php if ($product['price']) { ?>
        <?php if (!$product['special']) { ?>
        <div class="pricetag_small"><span class="price"><?php echo $product['price']; ?></span></div>
        <?php } else { ?>
        <div class="pricetag_small"><span class="old_price"><?php echo $product['price']; ?></span> <span class="new_price"><?php echo $product['special']; ?></span></div>
        <?php } ?>
        <?php } ?>
        <div class="info">
          <h3><?php echo $product['name']; ?></h3>
          <p><?php echo $product['description']; ?></p>
          <a class="add_to_cart_small" onclick="addToCart('<?php echo $product['product_id']; ?>');"><?php echo $button_cart; ?></a> <a class="wishlist_small" onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $text_wish; ?></a> <a class="compare_small" onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $text_compare; ?></a> </div>
      </div>
      <?php } ?>
    </div>
  </div>
</div>
<?php } else { ?>
<div class="box">
  <div class="box-content">
    <h3 class="heading-title"><span><?php echo $heading_title; ?></span></h3>
    <?php foreach ($products as $product) { ?>
    <div class="product_unit">
      <?php if ($product['thumb']) { ?>
      <a class="image" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
      <?php } ?>
      <span class="name"><?php echo $product['name']; ?></span>
      <?php if ($product['price']) { ?>
      <?php if (!$product['special']) { ?>
      <span class="price"><?php echo $product['price']; ?></span>
      <?php } else { ?>
      <span class="price-old"><?php echo $product['price']; ?></span> <span class="price"><?php echo $product['special']; ?></span>
      <?php } ?>
      <?php } ?>
    </div>
    <?php } ?>
    <div class="clear"></div>
  </div>
</div>
<?php } ?>
