{if isset($products) && $products}
  <h3 class="title-deals"><span>{l s="Special Offer" d='Modules.Dordailydeals.Shop'}</span></h3>
  <div class="product_list grid row-item">
  {foreach from=$products item=product name=products}
    
  	{block name='product_miniature_item'}
	  <article class="ajax_block_product product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
	    <div class="product-container{if isset($dorShowQuantity) && $dorShowQuantity ==1} dor-show-qty{/if}">
	      <div class="left-block">
	        <div class="product-image-container">
	          {block name='product_thumbnail'}
	            {hook h='dorFlipImages' product=$product}
	          {/block}
	          {if (isset($product.new) && $product.new == 1) || (isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price) }
	          <div class="box-items">
	            {if isset($product.new) && $product.new == 1}
	              <a class="new-box box-status" href="{$product.link|escape:'html':'UTF-8'}">
	                <span class="new-label">{l s='New' d='Modules.Dordailydeals.Shop'}</span>
	              </a>
	            {/if}
	            {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price}
	              <a class="sale-box box-status" href="{$product.link|escape:'html':'UTF-8'}">
	                <span class="sale-label">{l s='Sale!' d='Modules.Dordailydeals.Shop'}</span>
	              </a>
	            {/if}
	          </div>
	          {/if}
	            {block name='product_price_and_shipping'}
	              {if $product.show_price}
	                {if $product.has_discount}
                      {if $product.discount_type === 'percentage'}
                        <span class="discount-percentage">{$product.discount_percentage}</span>
                      {/if}
                    {/if}
	              {/if}
	            {/block}

	        </div>
	        <form action="{if isset($carturl)}{$carturl}{else}{$urls.pages.cart}{/if}" method="post" class="dor-addcart-button">
	          {if isset($dorShowQuantity) && $dorShowQuantity ==1}
	          <div class="dor-product-quantity">
	            <div class="qty">
	              <input
	                type="text"
	                name="qty"
	                id="quantity_wanted_{$product.id_product}"
	                value="1"
	                class="input-group dor_quantity_wanted"
	                data-min="{$product.minimal_quantity}"
	              >
	            </div>
	          </div>
	          {/if}
	          <div class="add">
	            <input type="hidden" name="token" value="{$static_token}">
	            <input name="id_product" value="{$product.id_product}" type="hidden">
	            <input type="hidden" name="id_customization" value="0">
	            <a href="{if isset($carturl)}{$carturl}{else}{$urls.pages.cart}{/if}" class="cart-button button ajax_add_to_cart_button btn btn-default add-to-cart" data-button-action="add-to-cart" data-toggle="tooltip" title="{l s='Add to cart' d='Shop.Theme.Actions'}" {if !$product.add_to_cart_url}disabled{/if}>
	              <i class="material-icons shopping-cart">&#xE547;</i>
	              <span class="hidden">{l s='Add to cart' d='Shop.Theme.Actions'}</span>
	            </a>
	          </div>
	        </form>
	        <div class="show-btn-products">        
	          {if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
	          {hook h="displayProductPriceBlock" product=$product type="weight"}
	          <div class="control-action-buttons">
	            <div class="action-button">
	                <ul>
	                    <li class="icon-line-wishlist-fel">
	                      {capture name='dorwishlist'}{hook h='dorwishlist'}{/capture}
	                      {if $smarty.capture.dorwishlist}
	                      {$smarty.capture.dorwishlist nofilter}
	                      {/if}
	                    </li>
	                    <li class="icon-line-compare-fel">
	                    {hook h='DorCompare' product=$product}
	                    </li>
	                    <li class="icon-line-quickview">
	                      <a href="#" class="quick-view countdown-view-detail" data-link-action="quickview" data-toggle="tooltip" title="{l s='View detail' d='Modules.Dordailydeals.Shop'}">
	                         <i class="material-icons">&#xE8B6;</i>
	                      </a>
	                    </li>
	                </ul>
	            </div>
	          </div>
	        </div>
	      </div>
	      
	    <div class="right-block">
	      	<div class="deail-info-content">
		      	<div class="deail-info-content-inner">
			      	<div class="deail-info-content-wrapper">
				      	<div class="deail-info-content-data">
				          <div class="product-cate"><span>{$product.category_name}</span></div>
				          {block name='product_name'}
				            <h5 class="product-title-item" itemprop="name"><a href="{$product.url}" class="product-name" title="{$product.name}">{$product.name|truncate:30:'...'}</a></h5>
				          {/block}
				          <div class="review-price-product">
				          {capture name='displayProductListReviews'}{hook h='displayProductListReviews' product=$product}{/capture}
				          {if $smarty.capture.displayProductListReviews}
				            <div class="hook-reviews">
				            {hook h='displayProductListReviews' product=$product}
				            </div>
				          {/if}
				          <div class="dor-show-value-product clearfix">
				            {block name='product_price_and_shipping'}
				              {if $product.show_price}
				                <div class="content_price">
				                  <div class="product-price-and-shipping">
				                  	{hook h='displayProductPriceBlock' product=$product type="before_price"}
				                    <span itemprop="price" class="price">{$product.price}</span>
				                    {hook h='displayProductPriceBlock' product=$product type='unit_price'}
				                  	{hook h='displayProductPriceBlock' product=$product type='weight'}
				                    {if $product.has_discount}
				                      {hook h='displayProductPriceBlock' product=$product type="old_price"}

				                      <span class="regular-price">{$product.regular_price}</span>
				                      {if $product.discount_type === 'percentage'}
				                        <span class="discount-percentage">{$product.discount_percentage}</span>
				                      {/if}
				                    {/if}
				                  </div>
				                </div>
				              {/if}
				            {/block}
				            <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
				              {block name='product_variants'}
				                {if $product.main_variants}
				                  {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
				                {/if}
				              {/block}
				            </div>
				          </div>
				        </div>
				        {block name='product_description_short'}
				          <div class="product-description-short hidden" itemprop="description">{$product.description_short nofilter}</div>
				        {/block}
					        {if $product.special_finish_time|escape:'html':'UTF-8' != ""}
					        <div class="countdow-data-offer">
					            <div class="processCountDown">
					                <div class="infoProcess">
					                    <span class="avai">{l s='Available:' d='Shop.Theme.Actions'} <strong>{$product.quantity}</strong></span>
					                    <span class="sold">{l s='Already Sold:' d='Shop.Theme.Actions'} <strong>{if $product.totalSales gt 0}{$product.totalSales}{else}{0}{/if}</strong></span>
					                </div>
					                <div class="progress">
					                    <span style="width:{if $product.totalSales gt 0}{$product.totalSales/($product.quantity+$product.totalSales)*100}%{else}0{/if}" class="progress-bar">{if $product.totalSales gt 0}{$product.totalSales/($product.quantity + $product.totalSales)}*100{else}0{/if}</span>
					                </div>
					            </div>
					            <span class="txt-offer-countdown">{l s='Hurry Up! Offer ends in:' d='Shop.Theme.Actions'}</span>
					            <div id="countdown-timer-{$product.id_product}" class="countdown-daily" data-id="{$product.id_product}" data-time="{$product.special_finish_time|escape:'html':'UTF-8'}"></div>
					        </div>
					        {/if}
				    	</div>
			    	</div>
		    	</div>
	    	</div>
	    </div>

	    {block name='product_flags'}
	      <ul class="product-flags hidden">
	        {foreach from=$product.flags item=flag}
	          <li class="{$flag.type}">{$flag.label}</li>
	        {/foreach}
	      </ul>
	    {/block}
	    
	  </div>
	  </article>
	{/block}

  {/foreach}
  </div>
{/if}
