<div class="box">
  <div class="box-heading-bestseller"><?php echo $heading_title; ?></div>
  <div class="box-content-bestseller">
    <div class="box-product-bestseller">
      <?php foreach ($products as $product) { ?>
      <div class="box2-catalog2">
	  <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
	  <?php if ($product['ean']) { ?>
          <div style="position:relative;height:0px;top:125px;left:110px;max-width:110px;">
		  <div class="icon-sale"><?php echo $product['ean']; ?></div>
		  </div>
      <?php } ?>
	  <?php if ($product['sku']) { ?>
          <div style="position:relative;height:0px;top:150px;left:110px;max-width:110px;">
		  <div class="icon-new"><?php echo $product['sku']; ?></div>
		  </div>
      <?php } ?>
	   <?php if ($product['upc']) { ?>
          <div style="position:relative;height:0px;top:175px;left:110px;max-width:110px;">
		  <div class="icon-hit"><?php echo $product['upc']; ?></div>
		  </div>
      <?php } ?>
        <?php if ($product['thumb']) { ?>
		<div class="boxcaption">
			<div>
			<a href="#" data-reveal-id="<?php echo $product['product_id']; ?>" data-animation="fade" class="button-detail"><img src="catalog/view/theme/default/image/fast-view-but.png" alt="fast_view"></a>
			</div>
		</div>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
   <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <div class="price-only"><?php echo $product['price']; ?></div>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span><br /> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
       <div class="cart"><input type="image" src="catalog/view/theme/default/image/add2basket.png" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');"/></div>
		
		
		
		<div id="short-dis"><?php echo $product['description']; ?></div>
		<div style="clear:both;"></div>
		<div class="prod-footer">
		<div class="rating"><span>Рейтинг</span> <img style="width: 85px;" src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
		<div style="margin-top: -3px;" class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');" title="<?php echo $button_compare; ?>"><?php echo $button_compare; ?></a></div>
		
		</div>
		
		
		
		<?php if ($product['special']) { ?>
		<div class="economy-wrapper">Выгода <?php echo $product['economy']; ?></div>
		<?php } ?>
      </div>	
	  
	  <div id="<?php echo $product['product_id']; ?>" class="reveal-modal">
	     <div class="modal">
		  <div class="contents">
		   <div class="name"><?php echo $product['name']; ?></div>
		   <?php if ($product['popup']) { ?>
		   <div class="left">
		
			<div class="images"><a href="<?php echo $product['popups']; ?>" class="cloud-zoom" data-rel="adjustX: 10, adjustY:-4, tint:'#000000',tintOpacity:0.2, zoomWidth:510"><img src="<?php echo $product['popup']; ?>" alt="image"/></a></div>
		   </div>
		   <?php } ?>
		   <div class="right">
		    <div class="description">
	
			 <span><?php echo $text_model; ?></span> <?php echo $product['model']; ?><br />
			</div>
		     <?php if ($product['price']) { ?>
		      <div class="price"><?php echo $text_price; ?>
			   <?php if (!$product['special']) { ?>
			   <?php echo $product['price']; ?>
			   <?php } else { ?>
			     <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
				
		       <?php } ?>
		      </div>
		     <?php } ?>			 
		     <div class="cart">
			  <div><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div>
			  <div><span>&nbsp;&nbsp;</span></div>
			  <div><a onclick="addToWishList('<?php echo $product['product_id']; ?>');" class="button" ><?php echo $button_wishlist; ?></a></div>
			  <div><span>&nbsp;&nbsp;</span></div>
			  <div><a onclick="addToCompare('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_compare; ?></a></div>
			  <div><span>&nbsp;&nbsp;</span></div>
			  <div><a href="<?php echo $product['href']; ?>" class="button"><?php echo $button_detail; ?></a></div>
			 
		     </div>
			 
            </div>
			 <div class="clear"></div>
			 <div class="tab-content-2" ><?php echo $product['description']; ?></div>
			</div>
		   <a class="close-reveal-modal"></a>
		 </div>
		</div>
	  
	    
      <?php } ?>
     </div>
	 
	 
	 
  </div>
  
  
  
</div>


