{assign var="selectedProductID" value=$resultProduct['productID']}
{assign var="productID" value=$resultProduct['productID']}
{assign var="productDefaultCurrency" value=$resultProduct['productDefaultCurrency']}
{assign var="productOptionOfferDiscount" value=$resultProduct['productOptionOfferDiscount']|round}
{assign var="options" value=$resultProduct['options'][0]}       
{assign var="shareUrl" value=$productID|sef_path:'product':$originCatalogID}
{html->script src="{$view_javascript}/jquery.imgzoom.js"}


<div class="popup-overlay"><span class="ie-overlay"></span>
<div class="popup-wrap">
<div class="popup-wrap-inner clearfix">
		<div id="CategoryFade" class="closeBtn1 icon-delete" onclick="lightbox_close();"></div> 
            <div class="row">
            <div class="pordSlider col-sm-5 col-12">
				{if $resultProduct['productImage']}
					{assign var="productImages" value=$resultProduct['images']}
                    {assign var="defProductImage" value=$resultProduct['productImage']}
					<span id="img_slider">
						{assign var="section" value='quickView'}
						{include file="{$pageLayout}ProductImagesQickview.tpl"}
					</span>
				{/if}
				<span class="slip"> 
                    {if $wishlistProducts|default:0 == 0}
						{html->anchor href="" class="icon-wish-list wish-list slip iconappend2" id ="wish-req"  wishlist="0" productid=$productID user=$regUserID}
                    {/if}
                    <span id="wishlist-div" {if $wishlistProducts|default:0 == 0}class="hide"{/if}>
						{html->anchor href="user/wishlist/" id ="wish-added" class="icon-wish-list-fill wish-list slip iconappend2"  }
                    </span>
				</span>
            </div>
			<div class="productDetails col-sm-7 col-12">
				<div class="clearfix position-relative">
                    <span class="icon-share share-icon">
                    <div class="banner-share clearfix">
					{if $settingsFacebookNewProductOnWall eq "Yes"}
							{html->anchor class="icon-fb-filled" onClick="fbShare('{$views_host_share}/{$shareUrl}')"} 
					{/if} 
					{if $settingsGooglePlusNewProductOnWall eq "Yes"} 
							{html->anchor class="icon-g-plus-filled" onClick="googlePlusShare('{$views_host_share}/{$shareUrl}')"}
					{/if}
					{if $settingsPinterestNewProductOnWall eq "Yes"}
							{html->anchor onClick="pinterestShare('{$views_host_share}/{$shareUrl}', '{$view_host}/public/uploads/catalog/product/thumb/{$resultProduct.productImage}', '{$settingsPinterestProductPostMessage|escape:'quotes'|unescape:'html'|escape:'html'}')" 
							 content=" <span class='path1'></span><span class='path2'></span>"  class="icon-pin-filled"}
					{/if}				
					{if $settingsTwitterPostNewProductOn eq "Yes"}
							{html->anchor 	onClick="twitterShare('{$views_host_share}/{$shareUrl}','{$settingsTwitterProductPostMessage|escape:'quotes'|unescape:'html'|escape:'html'} : {$resultProduct.productTitle|escape:'quotes'|unescape:'html'|escape:'html'}')" 
							class="icon-twt-filled" content=" <span class='path1'></span><span class='path2'></span>"}
					{/if} 
						<a href="mailto:?subject={$language.lblProductsFrom} {$commonSiteName}&amp;body={$resultProduct.productTitle|unescape:'html'|escape:'url'} Checkout: {$views_host_share}/{$shareUrl}" class=" icon-mail-filled">
						</a>
				    </div>
                    </span>
                <h2 class="h4 font-bold">{$resultProduct['productTitle']}</h2>
              </div>	
                
                <div id="poppup_common_message" ></div>
                {if $resultProduct.brandID>0 && isset($resultProduct['brandKey'])}                    
                <div class="brand">{$language.lblby}
{html->anchor href="brand/{$resultProduct['brandKey']}/{$resBreadcrumb['productCategoryID']|sef_path:'catalog'}" 	content="{$resultProduct.brandName}"}</div>
                {/if}
                {if $resultProduct['productReviewsCount']|default:'' > 0}
                    <div class="linkbox1 ">
                        <ul class="clearfix">
                            <li>
                            <div class="review-outer">
                                    {assign var="avgRating" value=$resultProduct['ratingTotal']/$resultProduct['productReviewsCount']|default:''}
                                    {assign var="avgRating" value=$avgRating|round:2}
                                    <div class="starRating"><div class="rated" style="width:{$avgRating * 20}%"></div></div>[ {$language.lblRated} {$avgRating}/5  ] | {$resultProduct['productReviewsCount']|default:''} {$language.lblReviews}
                            </div>
                           </li>
                       </ul>
                    </div>
                {/if}
            <div class="linkbx2 mb-3"> 
                <h4 class="h6 font-bold font-small">{$language.lblDescription}</h4>
                {$resultProduct['productDescription']|unescape:"html"|strip_tags|truncate:200}
                <div class="listThumb">
                    <ul class="clearfix">	
                        <li >
                          {html->anchor href="{$shareUrl}" class="iconappend2 detail-view slip text-secondary" caption=$language.lblViewDetails}
                        </li>
                    </ul>
                </div>
            </div>
									
				<script type="text/javascript">
				{if $productsToJs!=''}
					var	isQuickView	=	true;
					var InventoryTrackLevel ='{$resultProduct.InventoryTrackLevel}';
					var products= {$productsToJs};
				{/if}
				</script>
				<script type="text/javascript">	
				var encodedCustomOption = {$encodedCustomOption};
				var selectedProductID 		= {$selectedProductID};
				var productCurrency 		= {$productDefaultCurrency};
				var encodedCombinations = {$encodedCombinations};
				var showQuantityAvailable = Number('{$resultProduct.showQuantityAvailable}');
				$(document).ready(function () {
					$('#formProductOptions').ajaxForm({
						beforeSend: function() 
						{
						},
						complete: function(xhr) {
							userUploadedImageArray = xhr.responseText;
							var JSONuserUploadedImageArray = JSON.parse(userUploadedImageArray);
							if(JSONuserUploadedImageArray.isError=='Yes' && typeof JSONuserUploadedImageArray != 'null')
							{
								jNotifyShow(JSONuserUploadedImageArray.errorMessage,"common_message", "message_error");
								return true;
							}
							else
							{
								buynow_link(buyNoeButtonThisElm);
							}
						}
					}); 
				});
				</script>	
                                
				{include file="{$pageLayout}CustomOption.tpl"}
				{assign var="showQuantityAvailable" value=$resultProduct['showQuantityAvailable']}
				{assign var="InventoryTrackLevel" 	value=$resultProduct['InventoryTrackLevel']}
				{assign var="productOptionQuantity" 	value=$resultProduct['productOptionQuantity']}
		
				<div class=" clearfix">
					<h4 class="h6 font-bold font-small">{$language.lblQuantity}</h4>
                    <div class="row">
					<div class="mb-3 col-2 ">
{form->textbox name="quantityBox" class="QuantityBox form-control" value="{$resultProduct['productMinBuyLimit']}"} 
					</div> 
					{*{if $InventoryTrackLevel!='No'}
						<div class="col-10">
							<span class="col-Green" id="quantity_available"> 
							{if $InventoryTrackLevel=='Product'}
								{$productOptionQuantity} {$language.lblAvailable}
							{/if}	
							</span> 
						</div>
					{/if}*}
					</div>
				</div>
				
				{assign var="tierPrices" 	value=$resultProduct['tierPrices']}
				{assign var="productOptionRegularPrice" 	value=$resultProduct['productOptionRegularPrice']}
				{if count($tierPrices)>0}
					<ul class="tierGroup">
						{foreach $tierPrices as $tierPrice}
							{assign var="discount" value=($productOptionRegularPrice-$tierPrice['tierPrice'])/$productOptionRegularPrice*100}
							<li>{$language.lblTierPriceBuy} {$tierPrice['quantity']} {$language.lblForSmall} {$tierPrice['tierPrice']|price:''} {$language.lbleachandsave} {$discount|round}%</li>
						{/foreach}
					</ul>
				{/if}
	
				{if $productOptionOfferDiscount>0}
                {*<div class="offerPrice02">{$productOptionOfferDiscount}<span>%</span></div>*}
					{/if}
					
				{form->hidden name="selectedProductOption" value=$resultProduct.productOptionID}	
				<div class="valueSection">
                    {if $productOptionRegularPrice!=$resultProduct['offerPrice']}
                    <div class="price-original">
                        <strike>
{$productOptionRegularPrice|price:'':$resultProduct.productDefaultCurrency:$currentCurrencyID}
                        </strike>
                    </div>
					{/if}			
							
					<div class="price " id="product-price">
						{$resultProduct['offerPrice']|price:'':$resultProduct.productDefaultCurrency:$currentCurrencyID}<br>
					</div>
					<div class="my-3">
					{assign var="quantitySum" value=$options['productOptionQuantity']+$options['productQuantityUnlimited']}
					
					{if $quantitySum <1 && $InventoryTrackLevel!='No'} 
						{if $InventoryTrackLevel=='Product'}
							{html->anchor class="sold-out buyBut01 btnGradient" caption=$language.lblSoldOut}
						{else}
							{html->anchor class="sold-out buyBut01 btnGradient" caption=$language.lblCombinationNotFound}
						{/if}
					{else}
						<div class=" left" id="buynow-btn">
							{assign var="relData" value=$productID|cat:"-"|cat:$resultProduct.productOptionID}
							{html->anchor class="buynow buynow_link btn btn-primary btn-lg text-uppercase" caption="{$language.lblBuyNow}" rel=$relData}
						</div>
						<div id="stock-not-avilable" class="sold-out" style="font-size: 11px !important; display:none;">          
							{$language.lblCartStockNotAvailable}
						</div>
						<div id="combination-not-avilable" class="soldout font-small" style="font-size: 11px !important; display:none;">          
							{$language.lblCombinationNotFound|upper}
						</div>
						<div class="col-Green mb-3">
							{if $resultProduct.daysLeft>=0  && $resultProduct['showCountTimer']=='Yes'} 
							<span class="AjaxProductTimer">
								<span class="time-block">
									<span class="days_dash" >
										<span class="numr" id="timer_days_{$custID|default:0}" >
											{if $resultProduct.daysLeft>0}
												<span class="digit">{$resultProduct.daysLeft}</span>
												{if $resultProduct.daysLeft>1}
													<span class="dys-txt">{$language.lblDaysLeft}</span> 
												{else}
													<span class="dys-txt">{$language.lblDayLeft}</span> 
												{/if}
											{else}
												<span class="dys-txt">{$language.lblEndToday}</span> 
											{/if}
										</span>
									</span>
								</span>
							</span>
							{/if}
						</div>
					{/if}
					</div>
				</div>
                    
			</div>
            </div>
		
	</div>
</div>
</div>
<script>
	var selectedProductCategoryID= "{$originCatalogID}";
</script>
{html->script_group_start name="{$compiled_js_path}/catalog.default.listingquickview.js"}
   {html->script src="{$common_frontend_js}/product.page.js"}
 {html->script_group_end} 	

