<div class="mb-3">
    <div id="cart_ajax_section">
        {*<div class=" m-0 p-2 d-none d-lg-block d-md-block">
        <div class="row">
            <div class="col-lg-5 col-md-5 font-bold h6">{$language.lblDescription}</div>
            <div class="col-sm-7">
                <div class="row">
                    <div class="col-4 col-lg-4 col-md-4 font-bold h6">{$language.lblPrice}</div>
                    <div class="col-5 col-lg-5 col-md-5 font-bold h6">{$language.lblQuantity}</div>
                    <div class="col-3 col-lg-3 col-md-3 font-bold h6 pl-0">{$language.lblTotal}</div>
                </div>
            </div>
            </div>
        </div>*}
        {assign var="giveAsGiftCount" value="0"}
        <div class="border-bottom px-1">
  {foreach from=$cartData['items'] item="cartItem"}
  	{assign var="cartItemID" value=$cartItem.cartItemID}
        <div class="cartItem position-relative border-bottom px-3 py-3 row">
             {if $cartItem.freeProduct!='Yes' || ($cartItem.freeProduct=='Yes' && $cartItem.freeBaseProductID>0)}
            {html->anchor onclick="CallDeleteCart('{$cartItemID}');" title=$language.lblDeleteItem 
   class="icon-cross-fill remv-item position-absolute" tabindex="4"} 
            {/if}
            <div class="col-sm-12 col-12 col-md-5 col-lg-5">
                <div class="cartItemName clearfix">
                    <span class="cart-itm-img float-left mr-3">
                        <img src="{$view_public_path}/uploads/catalog/product/small/{$cartItem.unserialize.imagePath}" class="img-fluid" alt="image" class="left">
                    </span>
                    <figcaption>
                    {if $cartItem.freeProduct=='Yes' && $cartItem.freeBaseProductID<=0}
                        {if $isCartpopup|default:''}
                            {assign var="additionalUrl" value=$popup_iframe_url|cat:"/"|cat:$cartItem.unserialize.productURL}
                                {html->anchor  
                            title=$cartItem.unserialize.productOptionName|unescape:"html" 
                            content=$cartItem.unserialize.productOptionName|unescape:"html" 
                            class="readOnlyLink d-block pb-2" 
                            tabindex="5"
                            href=$cartItem.unserialize.productURL
                        }
                        {else}	
                        {html->anchor  
                            title=$cartItem.unserialize.productOptionName|unescape:"html" 
                            content=$cartItem.unserialize.productOptionName|unescape:"html" 
                            class="readOnlyLink d-block pb-2" 
                            tabindex="5"
                            onclick="parent.$.fancybox.close();parent.location.href='{$additionalUrl|default:''}'" 
                        }
                        {/if}
                    {else}
                    {if $isCartpopup|default:''}
                    {assign var="additionalUrl" value=$popup_iframe_url|cat:"/"|cat:$cartItem.unserialize.productURL|cat:"?configid="|cat:$cartItemID}
                        {html->anchor  
                            title=$cartItem.unserialize.productOptionName|unescape:"html" 
                            content=$cartItem.unserialize.productOptionName|unescape:"html" 
                            class="readOnlyLink d-block pb-2" 
                            tabindex="5"
                            onclick="parent.$.fancybox.close();parent.location.href='{$additionalUrl|default:''}'" 
                        }
                {else}
                        {html->anchor  
                            title=$cartItem.unserialize.productOptionName|unescape:"html" 
                            content=$cartItem.unserialize.productOptionName|unescape:"html" 
                            class="readOnlyLink d-block pb-2" 
                            tabindex="5"
                            href=$cartItem.unserialize.productURL|cat:"?configid="|cat:$cartItemID
                        }
                    {/if}
                    {/if}

                    <p class="font-small">
                            <label class="mb-1">{$language.lblProductCode} : </label><span> {$cartItem.optionSKU}</span>
                            <br> 
                            {if $cartItem.sellAsBatch eq 'Yes'}
                                <span class="font-medium text-dark d-none d-lg-block">{$language.lblSetof} {$cartItem.qtyPerBatch} {$cartItem.batchType} - {$cartItem.orderItemPrice|price:Full:$cartData.currencyID:$cartData.userCurrencyID}</span> 
                                <span class="font-medium text-dark d-none d-lg-block">{$language.lblper} {$cartItem.batchType} - {($cartItem.orderItemPrice/$cartItem.qtyPerBatch)|price:Full:$cartData.currencyID:$cartData.userCurrencyID} </span> 
                            {/if}
                            
                        </p>

	{if $cartItem.businessName neq ""}
            <p>{$language.lblMerchant}  :   {$cartItem.businessName}</p>
        {/if}
        {if $cartItem.busDispatchTime!=""} 
		<p class="fade-text">{$language.lblDispatchedin}<strong> {$cartItem.busDispatchTime} </strong>{$language.lblBusinessDays}</p>
	{/if}
                    {if $taxApplicable eq 'Yes' && $cartItem.unserialize.orderItemTaxDescription neq ''} 
                        <br /><strong>{$language.lblTax}</strong>: {$cartItem.unserialize.orderItemTaxDescription}
                {assign var="taxDescription" value="{$cartItem.unserialize.orderItemTaxDescription}"}
                    {/if}
                           {if $cartItem.unserialize.combinationValues.customOption|count|default:0 >0}

                            <div><span class="heading h6">SKU : {$cartItem.unserialize.combinationValues.cimbinationSKU}</span>
                            <span class="" style="display:block;">
                                <span class="combination h6 " >
                                    {foreach from=$cartItem.unserialize.combinationValues.customOption item="combination" key="key"}
                                        {if $key neq 0}<span class="x-style"> | </span>{/if}
                                        {$combination.customOptionName} : {$combination.variantValue}
                                    {/foreach}
                                </span>
                            </span>
                                </div>

                    {/if}
                           {if $cartItem.unserialize.customOptionValues|count >0 && $cartItem.unserialize.customOptionValues neq ''}
                        <div class="cart-detil fade-text pb-2">
                            <div class="" style="display:block;">
                                {foreach from=$cartItem.unserialize.customOptionValues item="customOptionValues"}
                                    <span class="combination d-block">
                                    <span>{$customOptionValues.0.customOptionName} : </span>
                                    <span >
                                    {foreach from=$customOptionValues item="customOption" key="key"}
                                        {if $customOption.inputType|default:'' != 'file'}
                                            {if $key >0},{/if}{$customOption.variantValue}
                                        {else if $customOption.inputType|default:'' == 'file' && $customOption.variantValue!=''}
                                            {html->anchor href="/cart/getFile/id/{$customOption.variantValue}/" 
                                            caption=$customOption.variantValue 
                                            title=$customOption.customOptionName}
                                        {/if}
                                    {/foreach}
                                    </span>
                                    </span>
                                {/foreach}
                            </div>
                        </div>
                    {/if}
                    {include file="catalog/default/FreeGift.tpl"}
                </figcaption>
                </div>
            </div>
            <div class="item-divider"></div>
            <div class="col-12 col-sm-12 col-md-7 col-lg-7">
                <div class="row d-lg-none d-md-none mb-2 py-2 border-bottom border-top mt-2">
                    <div class="col-4 col unit-price padding-bottom h6 m-0 font-bold">{$language.lblPrice}</div>
                    <div class="col-4 rmv-padding-right h6 m-0 font-bold">{$language.lblQuantity}</div>
                    <div class="col-4 rmv-padding-left total-col  h6 m-0 font-bold">{$language.lblTotal}</div>
                </div>
                <div class="row">
                    <div class="col-4 col-sm-4 col unit-price">
                        <span class="h6 font-bold">
                        {if $cartItem.freeProduct=='Yes'}
                            {assign var="lblFree" value="{$language.lblFree}"}
                            {if $cartItem.freeBaseProductID>0}
                                {assign var="lblFree" value="{$language.lblFreeGift}"}
                            {/if}
                            {$cartItem.unserialize.unitPrice|price:Full:$cartData.currencyID:$cartData.userCurrencyID}
                            <span class="heading"> ({$lblFree}) </span>
                        {else}
                            {$cartItem.unserialize.unitPrice|price:Full:$cartData.currencyID:$cartData.userCurrencyID}
                        {/if}
                        </span>
                    </div>
                    <div class="col-4 col-sm-5">
                        <div class="QntyInputBx">
                            {if $blockQtyUpdate eq 'Yes' || $cartItem.freeProduct=='Yes' || $cartItem.unserialize.bundleProduct=='Yes'}
                                {form->textbox name="orderQuantity_{$cartItemID}" class="quantity  form-control d-inline-block" maxlength="4" value="{$cartItem.orderItemQuantity}" readonly="readonly"}
                           {else}
                                {form->textbox name="orderQuantity_{$cartItemID}" class="quantity form-control m-0 text-center d-inline-block border px-0" value="{$cartItem.orderItemQuantity}" maxlength="4" rel = $cartItemID} 
                                &nbsp;
                                {html->anchor  
                                title=$language.lblUpdate 

                                class="readOnlyLink icon-load-more icon-reload d-inline-block update_cart_item"
                                id="update_item_{$cartItemID}"
                                tabindex="3"
                                rel = $cartItemID}
                          {/if}
                        </div>
                    </div>
                    <div class="col-4  col-sm-3  total-col d-lg-none">
                        <div class="h6 font-bold text-primary">
                            {$cartItem.unserialize.orderItemSubtotal|price:Full:$cartData.currencyID:$cartData.userCurrencyID}
                        </div>
                    </div>
                    <div class="col-4  col-sm-3 total-col d-none d-lg-block ">
                        <div class="font-bold h6 text-primary">
                            {$cartItem.unserialize.orderItemSubtotal|price:Full:$cartData.currencyID:$cartData.userCurrencyID}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {/foreach}
        </div>
  {if $cartData['items']|count >0}
  {include file='cart/CartTotal.tpl'}
  {/if}
    </div>
</div>
{*<ul class="table-listing">
  <li class="header-section-outer">
  <div class="header-section text-uppercase clearfix">
    <div class=" col-xs-5">{$language.lblDescription}</div>
    <div class=" col-xs-2"> {$language.lblPrice}</div>
    <div class=" col-xs-2"> {$language.lblQuantity}</div>
    <div class=" col-xs-2">{$language.lblTotal}</div>
	<div class=" col-xs-1"></div>
    </div>
  </li>
  {assign var="giveAsGiftCount" value="0"}
  {foreach from=$cartData['items'] item="cartItem"}
  	{assign var="cartItemID" value=$cartItem.cartItemID}
    <li class="clearfix content-listing">
    <div class="clearfix">
     
    <div class="col-xs-5 ">
       
        <figure><img src="{$view_public_path}/uploads/catalog/product/small/{$cartItem.unserialize.imagePath}" class="img-responsive" alt="image" class="left"></figure>
       <figcaption >
    {if $cartItem.freeProduct=='Yes'}
		{if $isCartpopup|default:''}
			{assign var="additionalUrl" value=$popup_iframe_url|cat:"/"|cat:$cartItem.unserialize.productURL}
				{html->anchor  
			title=$cartItem.unserialize.productOptionName|unescape:"html" 
			content=$cartItem.unserialize.productOptionName|unescape:"html" 
			class="readOnlyLink" 
			tabindex="5"
			href=$cartItem.unserialize.productURL
		}
		{else}	
		{html->anchor  
			title=$cartItem.unserialize.productOptionName|unescape:"html" 
			content=$cartItem.unserialize.productOptionName|unescape:"html" 
			class="readOnlyLink" 
			tabindex="5"
			onclick="parent.$.fancybox.close();parent.location.href='{$additionalUrl|default:''}'" 
		}
		{/if}
	{else}
	{if $isCartpopup|default:''}
	{assign var="additionalUrl" value=$popup_iframe_url|cat:"/"|cat:$cartItem.unserialize.productURL|cat:"?configid="|cat:$cartItemID}
		{html->anchor  
			title=$cartItem.unserialize.productOptionName|unescape:"html" 
			content=$cartItem.unserialize.productOptionName|unescape:"html" 
			class="readOnlyLink" 
			tabindex="5"
			onclick="parent.$.fancybox.close();parent.location.href='{$additionalUrl|default:''}'" 
		}
{else}
		{html->anchor  
			title=$cartItem.unserialize.productOptionName|unescape:"html" 
			content=$cartItem.unserialize.productOptionName|unescape:"html" 
			class="readOnlyLink" 
			tabindex="5"
			href=$cartItem.unserialize.productURL|cat:"?configid="|cat:$cartItemID
		}
	{/if}
	{/if}
	
	{if $taxApplicable eq 'Yes' && $cartItem.unserialize.orderItemTaxDescription neq ''} 
		<br /><strong>{$language.lblTax}</strong>: {$cartItem.unserialize.orderItemTaxDescription}
	{/if}
{if $cartItem.productDispatchTime > 0} 
		<p class="fade-text">{$language.lblDispatchedin}<strong> {$cartItem.productDispatchTime} </strong>{$language.lblBusinessDays}</p>
	{/if}
           {if $cartItem.unserialize.combinationValues.customOption|count|default:0 >0}
	
			<div><span class="heading">SKU : {$cartItem.unserialize.combinationValues.cimbinationSKU}</span>
			<span class="" style="display:block;">
				<span class="combination " >
					{foreach from=$cartItem.unserialize.combinationValues.customOption item="combination" key="key"}
						{if $key neq 0}<span class="x-style"> | </span>{/if}
						{$combination.customOptionName} : {$combination.variantValue}
					{/foreach}
				</span>
			</span>
                </div>

	{/if}
           {if $cartItem.unserialize.customOptionValues|count >0 && $cartItem.unserialize.customOptionValues neq ''}
		<div class="cart-detil">
			<div class="" style="display:block;">
				{foreach from=$cartItem.unserialize.customOptionValues item="customOptionValues"}
					<span class="combination clearfix" >
					<span>{$customOptionValues.0.customOptionName} : </span>
					<span>
					{foreach from=$customOptionValues item="customOption" key="key"}
						{if $customOption.inputType|default:'' != 'file'}
							{if $key >0},{/if}{$customOption.variantValue}
						{else if $customOption.inputType|default:'' == 'file' && $customOption.variantValue!=''}
							{html->anchor href="/cart/getFile/id/{$customOption.variantValue}/" 
							caption=$customOption.variantValue 
							title=$customOption.customOptionName}
						{/if}
					{/foreach}
					</span>
					</span>
				{/foreach}
			</div>
		</div>
	{/if}
	</figcaption>
   </div>
   <div class="col-xs-2">
		{if $cartItem.freeProduct=='Yes'}
			{$cartItem.unserialize.unitPrice|price:Full:$cartData.currencyID:$cartData.currencyID}
			<span class="heading"> (Free) </span>
		{else}
			{$cartItem.unserialize.unitPrice|price:Full:$cartData.currencyID:$cartData.currencyID}
		{/if}
	</div>
   <div class="col-xs-2">
   {if $blockQtyUpdate eq 'Yes' || $cartItem.freeProduct=='Yes'}
        {form->textbox name="orderQuantity_{$cartItemID}" class="quantity  form-control pull-left" maxlength="4" value="{$cartItem.orderItemQuantity}" readonly="readonly"}
   {else}
        {form->textbox name="orderQuantity_{$cartItemID}" class="quantity form-control pull-left" value="{$cartItem.orderItemQuantity}" maxlength="4" rel = $cartItemID} 
		&nbsp;
		{html->anchor  
		title=$language.lblUpdate 
		 
		class="readOnlyLink icon-load-more update_cart_item"
		id="update_item_{$cartItemID}"
		tabindex="3"
		rel = $cartItemID}
  {/if}
  </div>
  <div class="col-xs-2"> 
		{$cartItem.unserialize.orderItemSubtotal|price:Full:$cartData.currencyID:$cartData.currencyID}
	</div>
	{*}

	{* {if $cartItem.freeProduct!='Yes'}
		<div class="fifth flt-left hidden-xs hidden-sm"> 
		{html->anchor  
			title=$language.lblEdit 
			content=$language.lblEdit 
			class="readOnlyLink" 
			tabindex="3"
			href=$cartItem.unserialize.productURL|cat:"?configid="|cat:$cartItemID
		} 
		</div>
	{/if} *}

	{*}
  {if $cartItem.freeProduct!='Yes'}
   <div class="col-xs-1"> 
	{html->anchor onclick="CallDeleteCart('{$cartItemID}');" title=$language.lblDeleteItem 
   class="icon-circle-close readOnlyLink" tabindex="4"} 
  </div>
  {/if}
  </div>
   </li>
  {/foreach}
  {if $cartData['items']|count >0}
  {include file='cart/CartTotal.tpl'}
  {/if}
</ul>*}
