{assign var="offerPrice" value=$option['offerPrice']}
{assign var="dealPrice" value=$option['dealPrice']|default:''}
{assign var="productOptionRegularPrice" value=$option['productOptionRegularPrice']}
{assign var="productOptionOfferDiscount" value=$option['productOptionOfferDiscount']}
{assign var="productOptionCashBack" value=$option['productOptionCashBack']|default:''}
{assign var="productOptionSavePrice" value=$option['productOptionSavePrice']}
{assign var="productOptionQuantity" value=$option['productOptionQuantity']}
{assign var="showQuantityAvailable" value=$option['showQuantityAvailable']}
{assign var="InventoryTrackLevel" value=$option['InventoryTrackLevel']}
{include file="{$pageLayout}CustomOption.tpl"}
 {*<!---------------------------------Tire Pricing star here --------------------------------------------------->*}
 
{if $isProductDeal|default:''=='No'}
  {if count($tierPrices)>0}
  <div class="mb-3">
    {foreach $tierPrices as $tierPrice}
    {assign var="discount" value=($productOptionRegularPrice-$tierPrice['tierPrice'])/$productOptionRegularPrice*100}
    <span class="tire p-1 mb-2">{$language.lblTierPriceBuy} <span class="bpfc">{$tierPrice['quantity']}</span> {$language.lblForSmall}  <span class="text-primary">{$tierPrice['tierPrice']|price:''}</span> {$language.lbleachandsave}  <span class="text-primary">{$discount|round}%</span></span>
    {/foreach}
  </div>
  {/if}
 {/if}
 {*<!---------------------------------Tire Pricing End here --------------------------------------------------->*}

<div class="clearfix">
  {form->hidden name="selectedProductOption" value=$option.productOptionID}	
  
  {*<!--------------------------------- price section star here --------------------------------------------------->*}
      <div class="row position-relative">
      <div class="quantity-price-sec row">
      <div class="col-12 col-lg-6 pb-3">
          {*<!---------------------------------quantity star here --------------------------------------------------->*}
    <div class="qty-outer mb-3 clearfix">
      <h6 class="float-left mt-2 h6 font-bold">{$language.lblQuantity}</h6>
      <div class="float-left ml-2 qty">
        {if $productMinBuyLimit >1}
        {form->textbox name="quantityBox" class="QuantityBox form-control" value=$productMinBuyLimit}
        {else}
        {form->textbox name="quantityBox" class="QuantityBox form-control " value=1}
        {/if}
      </div>
    {*<!----------------------Quantity Available star here ----------->*}

      {if $InventoryTrackLevel!='No'}
      <div class="{if $languageDirection eq 'rtl'}float-right {else}float-left{/if} quantity_available pl-3 bpfc" id="quantity_available">
        {if $InventoryTrackLevel=='Product' && $showQuantityAvailable > $productOptionQuantity}
        <span class="Num-avail icon-right">{$productOptionQuantity} {$language.lblAvailable}  </span>
        {/if}	
      </div>
      {/if}
      {*<!----------------------Quantity Available star here ----------->*}
    </div>
  {*<!---------------------------------quantity End here --------------------------------------------------->*}
         <div class="price-outer">  
          {if $offerPrice!=$productOptionRegularPrice}
    <del class="h6 font-light mr-3">{$productOptionRegularPrice|price:'':$productDefaultCurrency:$currentCurrencyID}</del>
    {/if}
    <div class="price-new h3 font-bold mr-2" id="product-price">
      {if $option.isProductDeal|default:'' != "Yes"}  
        {$offerPrice|price:'':$productDefaultCurrency:$currentCurrencyID}
        {assign var="productOptionOfferDiscount" value=(($productOptionRegularPrice-$offerPrice)/$productOptionRegularPrice)*100}
      {else}
          {$dealPrice|price:'':$productDefaultCurrency:$currentCurrencyID}
          {assign var="productOptionOfferDiscount" value=(($productOptionRegularPrice-$dealPrice)/$productOptionRegularPrice)*100}
      {/if}
      {*{$offerPrice|price:'':$productDefaultCurrency:$productDefaultCurrency}*}
    </div>
              <!-- offer -->
    {if $productOptionOfferDiscount >0}
    <div class="discount font-small h6 mb-0 px-2 py-1 text-white bg-dark">
      <div class="offerPrice02 left" ><span id="product_discountt">{$productOptionOfferDiscount|round}</span><span>%</span><span class="right offerTxt">{$language.lblOff}</span></div>
    </div>
    {/if}
    {if $productOptionCashBack|default:'' > 0}
    <div class="discount"> <span class="cash" id="productcashBack">{$productOptionCashBack|price:'':$productDefaultCurrency:$currentCurrencyID}</span> <span class="rb_light">{$language.lblCashback}</span> </div>
        {/if}
    <!-- offer -->
  </div>
          </div> 
          {assign var="quantitySum" value=$option.productOptionQuantity+$option.productQuantityUnlimited}
          {if $quantitySum<1}
         {else}
             
          {assign var="relData" value=$productID|cat:"-"|cat:$option.productOptionID|cat:"-"|cat:$option.optBusinessID|default:0}
      <div class="col-12 col-lg-6 py-3">
          
       {html->anchor freecnt="{$freeProductsCount}" class="buynow btn addToCartMain btn-primary buynow_link text-uppercase btn-lg h4 mb-0 font-bold" id="addtocartlink" content="<span class='icon-shopping-cart mr-2'></span>{$language.lblAddtoCart}" rel=$relData}
          </div> 
          {/if}
          
          
      </div>   
        
   
          
          <div class="combination-not-avail message_error error-xs mx-0 rmvcolse hide">{$language.lblCombinationNotAvail}</div>
          {if $businessOptionCount|default:0>0}
              {assign var="moresellerStyle" value=""}
          {else}
              {assign var="moresellerStyle" value="hide"}
          {/if}
          <div class="col-12 mb-3">
            <div id="moresellerlinkSec" class="{$moresellerStyle}">
                {html->anchor id="moresellerlink" class="moresellerlink" caption="{$language.lblViewMoreSellers}"}
            </div>
         </div>
   
  {*<!--------------------------------- price section Ends here --------------------------------------------------->*}
  {*<!--------------------------------- Buy now section star here --------------------------------------------------->*}
    {assign var="redeemslotID" value=$redeemslotID|default:''}
    {assign var="quantitySum" value=$option.productOptionQuantity+$option.productQuantityUnlimited}
    {if $quantitySum<1}
    <div class="notify col-12 mb-3 {if $languageDirection eq 'rtl'}text-right {else}text-left{/if}">
      {if $InventoryTrackLevel=='Product'}
        <span class="soldout message_error error-xs margin-bottom">{$language.lblOutOfStockThisMerchant|upper}</span>
        
      {else}
      <div class="soldout pos-me message_error error-xs"  id="buynow-btn">
       {assign var="relData" value=$productID|cat:"-"|cat:$option.productOptionID|cat:"-"|cat:$option.optBusinessID|default:0}
        {$language.lblCombinationNotFoundMerchant|upper}
      </div>
      <div id="combination-not-avilable1" class="message_error error-xs" style=" display:none;">          
        {$language.lblCombinationNotFoundMerchant|upper}
      </div>
      <div id="stock-not-avilable" class="soldout font-sml curve-r5" style="display:none;">          
        <span class="soldout message_error error-xs margin-bottom">{$language.lblOutOfStockThisMerchant|upper}</span>
        
      </div>
      {/if}
    </div>
    {else}
{assign var="relData" value=$productID|cat:"-"|cat:$option.productOptionID|cat:"-"|cat:$option.optBusinessID|default:0}
    {*<div class="soldout pos-me"  id="buynow-btn">
      
      {html->anchor href="/cart/" class="buynow btn btn-default buynow_link " id="addtocartlink" content="<span class='icon-shopping-cart margin-right'></span>{$language.lblAddtoCart}" rel=$relData}
	    {html->anchor id="hidAddtocartlink" style="display:none" caption="Fancybox Display"}

      {html->anchor class="buynow  btn btn-primary buynow_link"  id="buynowcheckout" caption=$language.lblBuyNow rel=$relData}
      {html->anchor class="buynow  btn btn-primary buynow_link buttonDisable"  id="completeLoader" caption=$language.lblBuyNow disabled="disabled" style="display:none"}

    </div>*}
    
    <div id="stock-not-avilable" class="font-sml curve-r5" style="display:none;">
      <h6 class="message_error error-xs rmvcolse">{$language.lblCombinationHaveNoQty}</h6>
      
    </div>
    <div id="combination-not-avilable1" class="message_error error-xs my-3 mx-0 rmvcolse" style=" display:none;">          
      {$language.lblCombinationNotFound|upper}
    </div>
    {/if}

    {*<!--------------------------------- Buy now section Ends here --------------------------------------------------->*}

</div>
</div>