{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}
<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-close-narrow" onclick="lightbox_close();"></div> 
		<div class="pad15">
		<div class="compareError"></div>
			
			  
           
			<div id="poppup_common_message" ></div>
            <div class="row">
            <div class="pordSlider col-xs-5">
				{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}ProductImages.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-xs-7">
			
					
                <h2>{$resultProduct['productTitle']}</h2>
                    
                    {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}
            <div class="linkbox1 ">
                <ul class="clearfix">{if $resultProduct['productReviewsCount'] > 0}<li>
                <div class="review-outer">
						{assign var="avgRating" value=$resultProduct['ratingTotal']/$resultProduct['productReviewsCount']}
						{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']} {$language.lblReviews}
				</div>
				
               </li>{/if}
                   {if $resultProduct.comparable eq 'Y' && $checked|default:''} <li> 
					<span class="slip"><span class="addCompare iconappend2">
						<input type="checkbox"
							class="compareIt"
							id="compare_quick_{$productID}"
							rel="checkbox_compare_{$productID}"
							{if $checked=='true'}
								checked="checked"
							{/if}
							data-id="{$productID}" 
							data-src="{$view_public_path}/uploads/catalog/product/small/{$resultProduct.productImage}"
							data-title="{$resultProduct.productTitle|truncate:28}" 
							data-category="{$resultProduct['productCategoryName']|default:''}" 
							data-setkey="{$resultProduct['attributeSetID']}"/> 
							<label for='compare_quick_{$productID}'> {$language.lblAddtoCompare}</label></span>                                            </span>
						</li>{/if}
                    <li class="pull-right">
                    <span class="icon-share-fill share-icon">
                    <div class="banner-share clearfix">
					{if $settingsFacebookNewProductOnWall eq "Yes"}
						<span class="fb sprite">
							{html->anchor 
							onClick="fbShare('{$views_host_share}/{$shareUrl}')" 
							 class=""}
						</span> 
					{/if} 
					{if $settingsGooglePlusNewProductOnWall eq "Yes"} 
						<span class="gp sprite"> 
							{html->anchor  
							onClick="googlePlusShare('{$views_host_share}/{$shareUrl}')" 
							 class=""} 
						</span> 
					{/if}
					{if $settingsPinterestNewProductOnWall eq "Yes"}
						<span class="pinit sprite">
							{html->anchor 
							onClick="pinterestShare('{$views_host_share}/{$shareUrl}', '{$view_host}/public/uploads/catalog/product/thumb/{$resultProduct.productImage}', '{$settingsPinterestProductPostMessage|escape:'quotes'|unescape:'html'|escape:'html'}')" 
							 class=""}
						</span> 			
					{/if}				
					{if $settingsTwitterPostNewProductOn eq "Yes"}
						<span class="twit sprite">
							{html->anchor 
							onClick="twitterShare('{$views_host_share}/{$shareUrl}','{$settingsTwitterProductPostMessage|escape:'quotes'|unescape:'html'|escape:'html'} : {$resultProduct.productTitle|escape:'quotes'|unescape:'html'|escape:'html'}')" 
							class="share-button02 " }
						</span> 
					{/if} 
					<span class="msg sprite">
						<a href="mailto:?subject={$language.lblProductsFrom} {$commonSiteName}&amp;body={$resultProduct.productTitle|unescape:'html'|escape:'url'} Checkout: {$views_host_share}/{$shareUrl}" class="">
						</a>
					</span>
				</div>
                </span>
                  </li>
                </ul>
            </div>
                <div class="linkbx2 margin-bottom"> 
					<h4>{$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" 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>{$language.lblQuantity}</h4>
                    <div class="row">
					<div class="margin-bottom col-xs-2 ">
						{form->textbox name="quantityBox" class="QuantityBox form-control" value="{$resultProduct['productMinBuyLimit']}"}
					</div>
					{if $InventoryTrackLevel!='No'}
						<div class="col-xs-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:$resultProduct.productDefaultCurrency}
									</strike>
						
								</div>
					{/if}			
							
					<div class="price " id="product-price">
						{$resultProduct['offerPrice']|price:'':$resultProduct.productDefaultCurrency:$resultProduct.productDefaultCurrency}<br>
					</div>
					<div class="margin-top margin-bottom">
					{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="Buy Now " rel=$relData}
						</div>
						<div id="stock-not-avilable" class="sold-out curve-r5" style="font-size: 11px !important; display:none;">          
							{$language.lblCartStockNotAvailable}
						</div>
						<div id="combination-not-avilable" class="soldout font-sml curve-r5" style="font-size: 11px !important; display:none;">          
							{$language.lblCombinationNotFound|upper}
						</div>
						<div class="col-Green margin-top">
							{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>
</div>
	
<script>
	var selectedProductCategoryID= "{$originCatalogID}";
</script>
{html->script_group_start name="{$compiled_js_path}/catalog.default.listingquickview.js"}
   {html->script src="{$view_javascript}/jquery.imgzoom.js"}
   {html->script src="{$common_frontend_js}/product.page.js"}
 {html->script_group_end} 
