create dedicated file for menu
This commit is contained in:
@@ -29,67 +29,7 @@
|
||||
{loop type="product" name="product_list" category={category attr="id"}}
|
||||
|
||||
<li class="item">
|
||||
<article itemscope itemtype="http://schema.org/Product">
|
||||
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
||||
{$product_id=$ID}
|
||||
{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="218" height="146" resize_mode="borders" limit="1"}
|
||||
<img itemprop="image" src="{$IMAGE_URL}" alt="Product #{$LOOP_COUNT}">
|
||||
{/loop}
|
||||
{elseloop rel="product_thumbnail"}
|
||||
{images file='assets/img/218x146.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>
|
||||
|
||||
<div class="description" itemprop="description">
|
||||
<p>{$DESCRIPTION}</p>
|
||||
</div>
|
||||
</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>
|
||||
<div class="product-btn">
|
||||
<button class="btn btn-cart">Add to cart</button>
|
||||
</div>
|
||||
</div>
|
||||
</article><!-- /product -->
|
||||
{include file="includes/single-product.html" product_id=$ID}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
@@ -100,33 +40,7 @@
|
||||
|
||||
<aside class="col-left" role="complementary" itemscope itemtype="http://schema.org/WPSideBar">
|
||||
|
||||
<section id="categories" class="block block-nav" role="navigation" aria-labelledby="categories-label">
|
||||
<div class="block-heading"><h3 class="block-title" id="categories-label">{intl l="Categories"}</h3></div>
|
||||
<div class="block-content">
|
||||
<nav class="nav-categories">
|
||||
<ul id="category" class="accordion">
|
||||
{assign "previousLevel" 0}
|
||||
{loop name="cat-parent" type="category-tree" category="0"}
|
||||
|
||||
{for $foo=1 to $previousLevel-$LEVEL}
|
||||
</ul>
|
||||
</li>
|
||||
{/for}
|
||||
|
||||
{if $CHILD_COUNT > 0 }
|
||||
<li><a class="accordion-toggle" data-toggle="collapse" data-parent="#category" href="#collapse{$ID}">{$TITLE}<span class="amount">({$CHILD_COUNT})</span></a>
|
||||
|
||||
<ul id="collapse{$ID}" class="collapse">
|
||||
{else}
|
||||
|
||||
<li><a href="#">{$TITLE}<span class="amount">(0)</span></a></li>
|
||||
{/if}
|
||||
{assign "previousLevel" $LEVEL}
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
{include file="includes/menu.html"}
|
||||
|
||||
<section id="filters">
|
||||
<h3>Find <span>a product</span></h3>
|
||||
@@ -135,13 +49,21 @@
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Type</legend>
|
||||
<div class="filter-content">
|
||||
<?php for ($count = 1; $count <= $type; $count++) { ?>
|
||||
<div class="checkbox">
|
||||
<label for="type<?php echo $count; ?>">
|
||||
<input type="checkbox" name="type<?php echo $count; ?>" id="type<?php echo $count; ?>"<?php if(isset($_GET['type'. $count])) { echo ' checked'; }?> value="<?php echo $count; ?>"> Type <?php echo $count; ?>
|
||||
<label for="type0">
|
||||
<input type="checkbox" name="type0" id="type0" value="0"> Type 0
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="type1">
|
||||
<input type="checkbox" name="type1" id="type1" value="1"> Type 1
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="type2">
|
||||
<input type="checkbox" name="type2" id="type2" value="2"> Type 2
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /Filter Type -->
|
||||
@@ -150,13 +72,21 @@
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Price</legend>
|
||||
<div class="filter-content">
|
||||
<?php foreach ($price as $key => $value) { ?>
|
||||
<div class="checkbox">
|
||||
<label for="price<?php echo $key; ?>">
|
||||
<input type="checkbox" name="price<?php echo $key; ?>" id="price<?php echo $key; ?>"<?php if(isset($_GET['price'. $key])) { echo ' checked'; }?> value="<?php echo $value; ?>"> <?php echo $value; ?>
|
||||
<label for="price0">
|
||||
<input type="checkbox" name="price0" id="price0" value="0"> $0.00 - $99.99
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="price1">
|
||||
<input type="checkbox" name="price1" id="price1" value="1"> $100.00 - $199.99
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="price2">
|
||||
<input type="checkbox" name="price2" id="price2" value="2"> $200.00 and above
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /Filter Price -->
|
||||
@@ -165,13 +95,21 @@
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Size</legend>
|
||||
<div class="filter-content">
|
||||
<?php foreach ($size as $key => $value) { ?>
|
||||
<div class="checkbox">
|
||||
<label for="size<?php echo $key; ?>">
|
||||
<input type="checkbox" name="size<?php echo $key; ?>" id="size<?php echo $key; ?>"<?php if(isset($_GET['size'. $key])) { echo ' checked'; }?> value="<?php echo $key; ?>"> <?php echo $value; ?>
|
||||
<label for="size0">
|
||||
<input type="checkbox" name="size0" id="size0" value="0"> Large
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="size1">
|
||||
<input type="checkbox" name="size1" id="size1" value="1"> Medium
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="size2">
|
||||
<input type="checkbox" name="size2" id="size2" value="2"> Small
|
||||
</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /Filter Size -->
|
||||
|
||||
27
templates/default/includes/menu.html
Normal file
27
templates/default/includes/menu.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<section id="categories" class="block block-nav" role="navigation" aria-labelledby="categories-label">
|
||||
<div class="block-heading"><h3 class="block-title" id="categories-label">{intl l="Categories"}</h3></div>
|
||||
<div class="block-content">
|
||||
<nav class="nav-categories">
|
||||
<ul id="category" class="accordion">
|
||||
{assign "previousLevel" 0}
|
||||
{loop name="cat-parent" type="category-tree" category="0"}
|
||||
|
||||
{for $foo=1 to $previousLevel-$LEVEL}
|
||||
</ul>
|
||||
</li>
|
||||
{/for}
|
||||
|
||||
{if $CHILD_COUNT > 0 }
|
||||
<li><a class="accordion-toggle" data-toggle="collapse" data-parent="#category" href="{$URL}#collapse{$ID}">{$TITLE} <span class="amount">({$CHILD_COUNT})</span></a>
|
||||
|
||||
<ul id="collapse{$ID}" class="collapse">
|
||||
{else}
|
||||
|
||||
<li><a href="{$URL}">{$TITLE} <span class="amount">(0)</span></a></li>
|
||||
{/if}
|
||||
{assign "previousLevel" $LEVEL}
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
60
templates/default/includes/single-product.html
Normal file
60
templates/default/includes/single-product.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<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="218" height="146" resize_mode="borders" limit="1"}
|
||||
<img itemprop="image" src="{$IMAGE_URL}" alt="Product #{$LOOP_COUNT}">
|
||||
{/loop}
|
||||
{elseloop rel="product_thumbnail"}
|
||||
{images file='../assets/img/218x146.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>
|
||||
|
||||
<div class="description" itemprop="description">
|
||||
<p>{$DESCRIPTION}</p>
|
||||
</div>
|
||||
</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>
|
||||
<div class="product-btn">
|
||||
<button class="btn btn-cart">Add to cart</button>
|
||||
</div>
|
||||
</div>
|
||||
</article><!-- /product -->
|
||||
@@ -80,8 +80,7 @@
|
||||
preorder : http://schema.org/PreOrder
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
<span class="regular-price"><span itemprop="price" class="price">{currency attr="symbol"} {format_number number="{$BEST_TAXED_PRICE}"}
|
||||
</span></span>
|
||||
<span class="regular-price"><span itemprop="price" class="price">{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user