133 lines
7.5 KiB
HTML
133 lines
7.5 KiB
HTML
<li class="item">
|
|
{assign var="hasSubmit" value = false}
|
|
<article itemscope itemtype="http://schema.org/Product">
|
|
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
|
{loop name="brand.feature" type="feature" product=$ID title="brand"}
|
|
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
|
<meta itemprop="brand" content="{$TITLE}">
|
|
{/loop}
|
|
{/loop}
|
|
{loop name="brand.feature" type="feature" product=$ID title="isbn"}
|
|
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
|
<meta itemprop="productID" content="isbn:{$TITLE}">
|
|
{/loop}
|
|
{/loop}
|
|
|
|
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
|
{loop name="product_thumbnail" type="image" product=$ID width="{$width}" height="{$height}" resize_mode="borders" limit="1"}
|
|
<img itemprop="image" src="{$IMAGE_URL}" alt="Product #{$LOOP_COUNT}">
|
|
{/loop}
|
|
{elseloop rel="product_thumbnail"}
|
|
{images file="../assets/img/{$width}x{$height}.png"}<img itemprop="image" src="{$asset_url}" alt="Product #{$LOOP_COUNT}">{/images}
|
|
{/elseloop}
|
|
<span class="mask"></span>
|
|
</a>
|
|
|
|
<div class="product-info">
|
|
<h3 class="name"><a href="{$URL}"><span itemprop="name">{$TITLE}</span></a></h3>
|
|
{if $hasDescription}
|
|
<div class="description" itemprop="description">
|
|
<p>{$DESCRIPTION}</p>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="product-price">
|
|
<div class="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
<meta itemprop="category" content="{category attr="title"}">
|
|
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition"> <!-- List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition -->
|
|
<meta itemprop="priceCurrency" content="{currency attr="symbol"}"> <!-- List of currency : The currency used to describe the product price, in three-letter ISO format. -->
|
|
<link itemprop="availability" href="http://schema.org/InStock" content="in_stock" />
|
|
<!-- List of availibility :
|
|
out_of_stock : http://schema.org/OutOfStock
|
|
in_stock : http://schema.org/InStock
|
|
instore_only : http://schema.org/InStoreOnly
|
|
preorder : http://schema.org/PreOrder
|
|
online_only : http://schema.org/OnlineOnly
|
|
-->
|
|
{if $IS_PROMO }
|
|
{loop name="productSaleElements_promo" type="product_sale_elements" product=$ID limit="1" order="min_price"}
|
|
{assign var="default_product_sale_elements" value=$ID}
|
|
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"}</span></span>
|
|
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number=$TAXED_PRICE} {currency attr="symbol"}</span></span>
|
|
{/loop}
|
|
{else}
|
|
<span class="regular-price"><span itemprop="price" class="price">{format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"}</span></span>
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
{form name="thelia.cart.add" }
|
|
<form id="form-product-details" action="{url path="/cart/add" }" method="post" role="form">
|
|
{form_hidden_fields form=$form}
|
|
<input type="hidden" name="view" value="product">
|
|
<input type="hidden" name="product_id" value="{$ID}">
|
|
|
|
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
|
|
|
{form_field form=$form field='product_sale_elements_id'}
|
|
{if $default_product_sale_elements }
|
|
<input type="hidden" name="{$name}" value="{$default_product_sale_elements}" {$attr}>
|
|
{else}
|
|
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"}
|
|
<input type="hidden" name="{$name}" value="{$ID}" {$attr}>
|
|
{/loop}
|
|
{/if}
|
|
{/form_field}
|
|
{form_field form=$form field="product"}
|
|
<input id="{$label_attr.for}" type="hidden" name="{$name}" value="{$ID}" {$attr} >
|
|
{/form_field}
|
|
|
|
<fieldset class="product-options hide">
|
|
{ifloop rel="stock"}
|
|
<div class="option">
|
|
<label for="options" class="option-heading">Options</label>
|
|
<div class="option-content">
|
|
<select name="options" class="form-control">
|
|
{loop name="stock" type="product_sale_elements" product="$ID" order="min_price"}
|
|
{if $LOOP_TOTAL == 1}
|
|
{assign var="hasSubmit" value = true}
|
|
{/if}
|
|
{loop name="combi" type="attribute_combination" product_sale_elements="$ID" order="alpha"}
|
|
<option value="{$ID}" data-quantity="{$QUANTITY}" data-price="{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}" data-old-price="{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}">{$ATTRIBUTE_AVAILABILITY_TITLE}</small></option>
|
|
{/loop}
|
|
{/loop}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{/ifloop}
|
|
</fieldset>
|
|
<fieldset class="product-cart form-inline">
|
|
{form_field form=$form field='quantity'}
|
|
<div class="form-group group-qty hide {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
|
|
<label for="{$label_attr.for}">{$label}</label>
|
|
<input type="number" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value|default:1}" min="0" required>
|
|
{if $error }
|
|
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
|
{elseif $value != "" && !$error}
|
|
<span class="help-block"><i class="icon-ok"></i></span>
|
|
{/if}
|
|
</div>
|
|
{/form_field}
|
|
|
|
<div class="form-group group-btn">
|
|
|
|
</div>
|
|
<div>
|
|
<div class="product-btn">
|
|
{if $hasSubmit == true}
|
|
<button type="submit" class="btn btn-cart">{intl l="Add to cart"}</button>
|
|
{else}
|
|
<a href="{$URL}" class="btn btn-cart">{intl l="View product"}</a>
|
|
{/if}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</fieldset>
|
|
</form>
|
|
{/form}
|
|
|
|
</div>
|
|
</article><!-- /product -->
|
|
</li> |