<script type="text/javascript">
	 var productsCountVar = '{$prodsMaxCount|default:0}';
</script> 

{if  $toAppend|default:'' neq Yes}<ul class="cateListing gridBg clearfix" id="prodListingUl">{/if}
	{foreach $resProducts|default:array() as $resProduct key="key" name="highlt"}
		{assign var="productID" value=$resProduct.productID}
		{assign var="productOptionsCount" value=$resProduct['productOptionCount']|default:''}
		{assign var="offerPrice" value=$resProduct['offerPrice']}
		{assign var="productOptionRegularPrice" value=$resProduct['productOptionRegularPrice']}
                {assign var="productOptionCashBack" value=$resProduct['productOptionCashBack']|default:''}
		{assign var="productOptionOfferDiscount" value=$resProduct['productOptionOfferDiscount']|round}
		{assign var="productOptionQuantitySum" value=$resProduct.productOptionQuantitySum} 
		{assign var="uniqueID" value=$uniqueID|default:''}
		<li class="col-xs-6 col-sm-3 rmv-padding  {if ($smarty.foreach.highlt.index + 1) % 3 == 0}marginR0{/if}" rel="product_{$productID}" uniqueID="{$uniqueID}"><div class="bx-contr">

			<div class="imageBox"> 
                {if $resProduct['featuredStatus']=='Yes'} <span class='featured'>{$language.lblFeatured}</span>{/if}
               
				{html->anchor href="{$resProduct.productID|sef_path:'product':$originCatalogID|default:0}" title=$language.lblViewDetails content="<img class='lazy img-responsive' data-original='{$view_public_path}/uploads/catalog/product/custom/{$resProduct.productImage}' src='{$view_images}/loader-small.gif' alt='{$resProduct.productTitle}'>"}
         <div class="AddwishLst"> 
            {if in_array($resProduct.productID, $listUsersWishListItems)}
                
				{html->anchor 
				href="user/wishlist/"
				title="{$language.lblAddedTo} {$language.lblWishlist}" 
				class="addToWishList icon-wish-list-fill"   
				 }
			{else}
                
				{html->anchor 
				title="{$language.lblAddToWishlist}" 
				class="addToWishList icon-wish-list" 
				user="{$commonUserID|default:0}" 
				productid="{$resProduct.productID}"}
			{/if}
            </div>
                <!-- days left ends -->
			</div>
<div class="deatils">
			<div class="productTitle  clearfix">
               {if $productOptionOfferDiscount >0}
                        <div class="offerPrice  btn-primary">{$productOptionOfferDiscount}<span>% off</span></div>
                    {/if}
                {if $productOptionCashBack|default:'' > 0}
                                    <span class="offerPrice btn-primary right-top margin-right">
                                        {$productOptionCashBack|price:''}
                                       {$language.lblCashback}
                                    </span>
                                    {/if}
              {html->anchor href="{$resProduct.productID|sef_path:'product':$originCatalogID|default:0}" content="{$resProduct.productTitle|truncate:30}" class="slip"}</div>
               {if $resProduct['brandKey']!=''}
					{html->anchor href="brand/{$resProduct['brandKey']}" class='bpfc' caption="{$resProduct['brandName']}"}
					
				{/if}
               <div class="clearfix" >
				<div class="pull-left prices">{if $productOptionRegularPrice!=$offerPrice}<del>{$productOptionRegularPrice|price:''}</del>{/if} <span class="price">{$offerPrice|price:''}</span>
                                    
</div>
               
                     </div>
		</div>
           
		</div></li>
	{/foreach}
	

{if $toAppend|default:'' neq Yes}</ul>{/if}

{if $toAppend|default:'' neq Yes && $resProducts|default:array()|count ==0}
{include file='IndexNoProduct.tpl'}
{/if}

