<?=$_product->breadcrumb()?>
<div id="product" class="clearfix" itemscope itemtype="http://schema.org/Product">
<div class="clearfix">
<div id="photos">
<a href="<?=$_front->resize($_product->image()->get('image'), 500)?>" class="fancyboxMain"><img src="<?=$_front->thumb($_product->image()->get('image'), 600, 600)?>" alt="<?=$_product->get('name')?>" data-zoom-image="<?=$_front->resize($_product->image()->get('image'), 500)?>" class="zoom"></a>
<ul>
<?php foreach($_product->get('images') as $img): ?>
<li><a href="<?=$_front->resize($img->get('image'), 500)?>" class="fancybox" rel="gallery"><img src="<?=$_front->thumb($img->get('image'), 150, 150)?>" alt="<?=$_product->get('name')?>" width="150"></a></li>
<?php endforeach; ?>
</ul>
</div>
<div id="info">
<form action="<?=$_product->getURL()?>" method="post" id="buy" data-name="<?=$_product->get('name')?>" data-manufacturer="<?=$_product->get('manufacturers.name')?>" data-category="<?=$_product->category()->get('name')?>">
<h1 itemprop="name"><?=$_product->get('name')?></h1>
<?php if($_product->get('buyNow')): ?>
<p class="price" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><?=$_front->price($_product->price())?></p>
<div class="attributes">
<?php while($_attribute->getNext()): ?>
<label>
<?=$_attribute->get('name')?>
<select name="attributes[<?=$_attribute->get('id')?>]" class="attribute" data-id="<?=$_attribute->get('id')?>">
<?php foreach($_product->getAttributeValues($_attribute->get('id')) as $value): ?>
<option value="<?=$value?>"><?=$value?></option>
<?php endforeach; ?>
</select>
</label>
<?php endwhile; ?>
<?php if($_available > 0): ?>
<div id="stockOk">
<label id="quantity_label">
Cantidad:
<input id="product_buy_quantity" name="quantity" type="text" size="2" value="1" />
</label>
</div>
<?php endif; ?>
</div>
<div id="stockError" <?=($_available ? 'style="display:none"' : '')?>>
<p>No disponible.</p>
</div>
<?php if($_available > 0): ?>
<button name="buy" id="add_to_cart" class="button">Comprar</button>
<?php endif; ?>
<input type="hidden" name="productId" id="productId" value="<?=$_product->get('id')?>" />
<?php else: ?>
<a href="<?=HOST?>contacto?productId=<?=$_product->get('id')?>" class="button">Consultar</a>
<?php endif; ?>
</form>
</div>
</div>
<div class="tabs">
<div class="tab">
<h2>Descripción</h2>
<p itemprop="description"><?=nl2br($_product->get('description'))?></p>
</div>
<?php if(strip_tags($_shop->get('delivery')) != ''): ?>
<div class="tab">
<h2>Tiempos de entrega</h2>
<?=$_shop->get('delivery')?>
</div>
<?php endif; ?>
<?php if(strip_tags($_shop->get('warranty')) != ''): ?>
<div class="tab">
<h2>Garantías y devoluciones</h2>
<?=$_shop->get('warranty')?>
</div>
<?php endif; ?>
</div>
<?php if($_totalRelated): ?>
<h2>Productos relacionados</h2>
<ul class="listado">
<?php
while($_related->getNext()) {
$_product = $_related;
require __DIR__.'/../inc/product.php';
}
?>
</ul>
<?php endif; ?>
</div>