<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$language.lblBusiness} :  {$language.lblProductsTitle} : {$language.lblManageProducts} : {$language.lblProductDetails}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/product-details.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" />
{include file='CommonCustomStyles.tpl'}
</head>
<body class="{$languageDirection}">
<div id="main" class="outer"> {include file='CommonHeader.tpl'} 
  <!--End:Header Container--> 
  <!--*************************************************************END HEADER CONTAINER******************************************************-->
  <div class="content-wrapper">
    <div class="container-fluid"> 
      <!-- product informoation starts --> 
      <!-- product-basic-info :: starts -->
      <div class="product-basic-info">
         
     <div class="clearfix">
      <!-- product-basic-info :: Ends -->
      <div class="left_block col-md-2 col-sm-3 col-xs-12 margin-bottom">
              <div class="tab-head">
                <h2>{$language.lblProductDetails}</h2>
              </div>
            <ul class="left-tab" id="maintab">
             <li class="sub"> {html->anchor href="" class="left-tab-a active" id="detail" content="{$language.lblGeneral}"} </li>
             <li class="sub"> {html->anchor href="" class="left-tab-a" id="option" content="{$language.lblQuantityandPrice}"} </li>
             <li class="sub"> {html->anchor href="" class="left-tab-a" id="images" content="{$language.lblContents}"} </li>   
             <li class="sub"> {html->anchor href="" class="left-tab-a" id="images" content="{$language.lblSizeChart}"} </li>   
             <li class="sub"> {html->anchor href="" class="left-tab-a" id="images" content="{$language.lblCustomAttributes}"} </li>
             <li class="sub">{html->anchor href="" class="left-tab-a" content="{$language.lblCustomOption}"} </li>            
             <li class="sub"> {html->anchor href="" class="left-tab-a" id="inventory" content="{$language.lblInventory}"} </li>
             <li class="sub">{html->anchor href="" class="left-tab-a" content="{$language.lblShipping}"} </li>
              <li class="sub">{html->anchor href="" class="left-tab-a" id="discusn" content="<span>{$language.lblRelatedProducts}</span>"} </li>
            <li class="sub">{html->anchor href="" class="left-tab-a" id="upsell" content="<span>{$language.lblUpSellProducts}</span>"} </li>
           <li class="sub">{html->anchor href="" class="left-tab-a" id="crossell" content="<span>{$language.lblCrossSellProducts}</span>"} </li>
	     <li class="sub">{html->anchor href="" class="left-tab-a" id="discusn" content="{$language.lblDiscussion}"} </li>
            </ul>
            </div>
      <!--End: Tab Button-->
     <div class="right_block col-md-10 col-sm-9 col-xs-12 container-section clearfix">
     <div class="clearfix title-section">
      <h2 class="product-title pull-left">{$resSelectproduct.productTitle|wordwrap:80:"<br />
          \n":true}                 
          {assign var="productStatus" value=$resSelectproduct.productStatus|@strtolower} <span class="status-{$productStatus}">
               {$language.{$resSelectproduct.productStatus}}
          </span></h2>
     <span class="edit-product pull-right">
         {assign var="productID" value=$resSelectproduct.productID}
         <div class="pull-left">
         {include file='ContentLanguageOptions.tpl'}
         </div>
          
          {if $settingEditProduct=='Yes' && $agreeBusiness|default:''=='yes'}
          {html->anchor priv_href="product/edit/" href="product/edit/id/{$resSelectproduct.productID}/" class="margin-left btn btn-sm btn-primary" content=$language.lblEdit}
         {/if}
         {html->anchor href=$previousURL caption="{$language.lblBack}" class="back-link"} 
     </span>
       
         </div>
     
        <div class="tabpane clearfix">
         <h3 class="tab-head">{$language.lblBasicInformation}</h3>
      <div class="row">
      <div class="image-block col-xs-12 col-sm-3">
                      	{if $resSelectproduct.productImage neq ''}
                            <img  id="dalImageSize" src="{$view_public_path}/uploads/catalog/product/thumb/{$resSelectproduct.productImage}?random={$rand}" alt="logo" style="max-width:100%" />
                        {else}
                            <img d="dalImageSize" src="{$view_images}/{$resSelectproduct.medicineType}.png" alt="{$resSelectproduct.medicineType}" class="fixing_left pd-img" />
                         {/if}
      </div>
      <div class="tabpane_inner col-xs-12 col-sm-9">
        <div class="form_listing outer-tab">
          <ul>
            <li class="clearfix"> 
              <!--start: left pane -->
                  <ul>
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblProductTitle}</label>
                      <div class="col-sm-8 col-xs-12">{$resSelectproduct.productTitle}</div>
                    </li>
                      <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{if $resProductcategory|@count eq 1}{$language.lblProductCategory}{else}{$language.lblProductCategory}{/if}</label>
                      <div class="col-sm-8 col-xs-12 default-style category-list"> 
                      {if $resProductcategory}
                    <div class="category-section">
                    <ol><li>
                      {foreach item="productCategory" key=k from=$resProductcategory}
                        {$productCategory.productCategoryName}{if $k+1 neq $resProductcategory|@count}, {/if}
                        {/foreach} 
                    </li></ol>
                    </div>
                    {else}{$language.lblNotSpecified}{/if}</div>
                    </li>                    
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblStartDate} </label>
                      <div class="col-sm-8 col-xs-12">{if $resSelectproduct.productStartTime!='0000-00-00'}{$resSelectproduct.productStartTime|date_format:$date_format}{else}{$language.lblNotSpecified}{/if}</div>
                    </li>                    
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblEndDate}</label>
                      <div class="col-sm-8 col-xs-12">{if $resSelectproduct.productEndTime!='0000-00-00'}{$resSelectproduct.productEndTime|date_format:$date_format}{else}{$language.lblNotSpecified}{/if}</div>
                    </li>
                     <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblShowCountDownCounter}</label>
                      <div class="col-sm-8 col-xs-12">{if $resSelectproduct.showCountTimer} {$resSelectproduct.showCountTimer}{else}{$language.lblNotSpecified}{/if}</div>
                    </li>
                  
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblBusiness}</label>
                      <div class="col-sm-8 col-xs-12">{$resBusiness.businessName}</div>
                    </li>
					<li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblBrand}</label>
                      <div class="col-sm-8 col-xs-12">{$resSelectproduct.brandName}</div>
                    </li>
                     <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblStatus}</label>
                      <div class="col-sm-8 col-xs-12">
                      {$language.{$resSelectproduct.productStatus}}
                      </div>
                    </li>
                      {if $detailViewCount|@count neq 0}            
               <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblTotalProductView}</label>
                      <div class="col-sm-8 col-xs-12">{$detailViewCount}</div>
                    </li>
              {/if}
              {if $uniqueDetailViewCount|@count neq 0}              
                       {if $detailViewCount|@count neq 0}            
                       <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblUniqueProductView}</label>
                      <div class="col-sm-8 col-xs-12">{$uniqueDetailViewCount}</div>
                    </li>              
              {/if} 
			  {/if}
				{if $productReturn.enableReturn == 'Yes'}	
					<li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblReturnable}</label>
                      <div class="col-sm-8 col-xs-12">{$resSelectproduct.productReturnable}</div>
                    </li>
					<li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblReturnPeriod}</label>
                      <div class="col-sm-8 col-xs-12">{$resSelectproduct.productReturnPeriod}</div>
                    </li>
				{/if}
                  </ul>
              <!--end: right pane --> 
            </li>
            {form->hidden name="productType" value=$resSelectproduct.productTypeKey|default:''}
             </ul>
        </div>
       </div> 
       </div>
        <!-- Related Products --> 
      </div>
      <!--End:Product Details--> 
      <!-- Image Listing-->
      
      <!--End: Images--> 
      <!-- Options-->
    <div class="tabpane quantity-price" style="display:none;">
    <div class="tabpane_inner">
            <div class="form_listing"> 
              <h3 class="tab-head">{$language.lblQuantityandPrice}</h3>
                    <div class=" form_listing01">
                      <ul>
                        <li class="row padding-bottom">
                          <label class="col-sm-4 col-xs-12">{$language.lblMinimumBuy}</label>
                          <div class="col-sm-8 col-xs-12">{$resSelectproduct.productMinBuyLimit}</div>
                        </li>
                          <li class="row padding-bottom">
                          <label class="col-sm-4 col-xs-12">{$language.lblMaximumBuyLimit}</label>
                          <div class="col-sm-8 col-xs-12">{if $resSelectproduct.productMaxBuyLimit!=''}<strong>{$resSelectproduct.productMaxBuyLimit}</strong>{else}{$language.lblNotSpecified}{/if}</div>
                        </li>             
                        <li class="row padding-bottom">
                          <label id="categotyLabel" class="col-sm-4 col-xs-12">{$language.lblTaxClass} </label>
                          <div class="col-sm-8 col-xs-12">
                          {if $resSelectproduct.taxClassName}
                          {$resSelectproduct.taxClassName}
                          {else}
                          {$language.lblNotSpecified}
                          {/if}
                          </div>
                        </li>                     
                         <li class="row padding-bottom ">
                          <label class="col-sm-4 col-xs-12">{$language.lblTaxTobusiness}</label>
                          <div class="col-sm-8 col-xs-12">{$resSelectproduct.taxPayableToBusiness}</div>
                        </li>     
                        <li class="row  padding-bottom">
                          <label class="col-sm-4 col-xs-12">{$language.lblSubscribeSave}</label>
                          <div class="col-sm-8 col-xs-12">{$resSelectproduct.subscribeSave}</div>
                        </li> 
                        {if $resSelectproduct.subscribeSave|default:'' eq 'Yes'}
                        <li class="row  padding-bottom">
                          <label class="col-sm-4 col-xs-12">{$language.lblSubscriptionDiscount}</label>
                          <div class="col-sm-8 col-xs-12">{$resSelectproduct.subscriptionDiscount}{if $resSelectproduct.subscriptionDiscount>0}%{/if}</div>
                        </li> 
                        {/if}
                        {if $resSelectproduct.subscribeSave|default:'' eq 'Yes'}
                        <li class="row padding-bottom">
                          <label class="col-sm-4 col-xs-12">{$language.lblSubscriptionBasedOn}</label>
                          <div class="col-sm-8 col-xs-12">{$resSelectproduct.subTypeName}</div>
                        </li> 
                        {/if}
                      </ul>
                    </div>
                  

         {if $resProductOptions|count >0}
          {assign var="productOptionCount" value="0"}      
        
        {if $resProductOptions}                
        {foreach from=$resProductOptions item="productOptions"}
        
        {assign var="productOptionCount" value=$productOptionCount+1}
          <ul class="option productOptionRow" >
          {if $resSelectproduct.multiOptionsAvailable=="Yes"}
			  <li class="clearfix first">
              <h4>{$language.lblOption} {$productOptionCount}</h4> 
            </li>{/if}
            <li class="clearfix form_listing">
            <div class="product_info">
                  <ul>
                   {if $resSelectproduct.multiOptionsAvailable=="Yes"}
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblOptionName}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.productOptionName|unescape}</div>
                    </li>{/if}
                     <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12"> {$language.lblSKU}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.optionSKU}</div>
                    </li>
                      <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblBarCode}<span class="sub-text">[UPC,ISBN]</span> </label>
                      <div class="col-sm-8 col-xs-12">{if $productOptions.optionBarCode} {$productOptions.optionBarCode} {else} {$language.lblNotSpecified}{/if}</div>
                    </li>
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblItemPrice}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.productOptionRegularPrice}</div>
                    </li>
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblSaleprice}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.productOptionProductPrice}</div>
                    </li>
                    <li class="clearfix padding-bottom">
                     {assign var="discount" value=$productOptions.productOptionRegularPrice-$productOptions.productOptionProductPrice}
                 {assign var="discountPer" value=($discount*100)/$productOptions.productOptionRegularPrice}
                      <label class="col-sm-4 col-xs-12">{$language.lblDiscountAmount}</label>
                      <div class="col-sm-8 col-xs-12">{$discount|round:"2"}</div>
                    </li>
                     <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblDiscount} (%)</label>
                      <div class="col-sm-8 col-xs-12">{$discountPer|round:"2"}</div>
                    </li>
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblSold}</label>
                      <div class="col-sm-8 col-xs-12">{if $productOptions.optionSoldCount}{$productOptions.optionSoldCount}{else}0 {/if} </div>
                    </li> {if $resSelectproduct.multiOptionsAvailable=="Yes"}
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblOptionStatus}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.productOptionStatus} </div>
                    </li>{/if}
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblPackage} {$language.lblWeight} </label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.packageWeight} {$WeightDim}</div>
                    </li>
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblPackageDimension}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.packageLength} * {$productOptions.packageWidth} * {$productOptions.packageHeight} {$LengthDim}</div>
                    </li>
                    {if $resSelectproduct.multiOptionsAvailable=="Yes"}
                    <li class="clearfix padding-bottom">
                      <label class="col-sm-4 col-xs-12">{$language.lblDefaultproductoption}</label>
                      <div class="col-sm-8 col-xs-12">{$productOptions.productOptionDefault}</div>
                    </li>
                     
                  {/if}  
                  </ul>
              </div>
             
              </li>
               <li class="clearfix">
            <h3 class="tab-head">{$language.lblMedia}</h3>
          </li>
          {if $productReqID|default:''}                  
          {assign var="productImageLoc" value="product-request"}                  
          {else}                  
          {assign var="productImageLoc" value="product"}                  
          {/if}
           <li class="clearfix padding-bottom">
           <label class="col-sm-4 col-xs-12">{$language.lblAdditionalImages}</label>
            <div class="col-sm-8 col-xs-12">
            <ul class="img-list clearfix " id="productImagesul{$productOptionCount}" rel="{$productOptionCount}">
                    {assign var="productImageCount" value="0"} 
                    {if $productOptions.media}              
                    {foreach from=$productOptions.media item="productImages"}              
                    {assign var="productImageCount" value=$productImageCount+1}
                    <li class="productImageInlineli{$productImageCount} productImageLi{$productOptionCount}" id="{$productImageCount}"> <img  id="dalImageSize"  height="100" src="{$view_public_path}/uploads/catalog/product/preview/{$productImages.productMedia}?random={$rand}"/> </li>
                    {/foreach}{else}{$language.lblNotSpecified}{/if}
                  </ul>
            </div>
          </li>
              </ul>
              {/foreach}
              {/if}
              {else}
      <div class="message_info">{$language.lblNoAdditionalOptions} </div>
      {/if} </div>
             </div>
           </div>
        <div class="tabpane"  style="display:none;">
        <div class="tabpane_inner">
        <div class="form_listing product_info content">
            <h3 class="tab-head">{$language.lblProductInfo}</h3>
          <ul>
               {if $resSelectproduct.productShortDescription|unescape:"html" neq ''}
                <li class="row padding-bottom">
                  <label class="col-sm-4 col-xs-12">{$language.lblShortDescription}</label>
                  <div class="col-sm-8 col-xs-12"> {$resSelectproduct.productShortDescription|unescape:"html"} </div>
                </li>
            {/if}
            <li class="row padding-bottom">
              <label class="col-sm-4 col-xs-12">{$language.lblDescription}</label>
              <div class="col-sm-8 col-xs-12"> {$resSelectproduct.productDescription|unescape:"html"} </div>
            </li>          
            <li class="row padding-bottom">
              <label class="col-sm-4 col-xs-12">{$language.lblHighlights}</label>
              <div class="col-sm-8 col-xs-12"> {$resSelectproduct.productHighlights|unescape:"html"} </div>
            </li>
          <li class="row padding-bottom">
            <label class="col-sm-4 col-xs-12">{$language.lblMetaTitle}</label>
            <div class="col-sm-8 col-xs-12">{if $resSelectproduct.productMetaTitle} 
              {$resSelectproduct.productMetaTitle}{else}{$language.lblNotSpecified}{/if} </div>
          </li>
          <li class="row padding-bottom">
            <label class="col-sm-4 col-xs-12">{$language.lblMetaDescription}</label>
            <div class="col-sm-8 col-xs-12"> {if $resSelectproduct.productMetaDescription} {$resSelectproduct.productMetaDescription}{else}{$language.lblNotSpecified}{/if} </div>
          </li>
          <li class="row padding-bottom">
            <label class="col-sm-4 col-xs-12">{$language.lblMetakeywords}</label>
            <div class="col-sm-8 col-xs-12"> {if $resSelectproduct.productMetaKeywords} {$resSelectproduct.productMetaKeywords}{else}{$language.lblNotSpecified}{/if} </div>
          </li>       
          </ul>
        </div>
       </div>
      </div>
          
    <!--sizechart-->
  <div class="tabpane"  style="display:none;">
        <div class="tabpane_inner" >
         <div class="form_listing">
             <h3 class="tab-head">{$language.lblSizeChart}</h3>
          <ul>
              <li class="row">
                  <label class="col-sm-4 col-xs-12">{$language.lblEnableSizeChart}</label>
                    <div class="col-sm-8 col-xs-12 top-spc">		
                        {assign var="enableSizeChart" value=$enableSizeChart|default:''} 
                        <ul>
                            <li>
                                {assign var="sizeChart" value=$sizeChart|default:''}
                                {if $enableSizeChart=="Yes"}
                                    {assign var="sizeChart" value={$language.lblYes}}
                                {else}
                                    {assign var="sizeChart" value={$language.lblNo}}
                                {/if}
                                    {$sizeChart}
                            </li>
                        </ul>
                     </div>
                </li>
              <li class="row" id="showAgreeSection">
                  <label class="col-sm-4 col-xs-12">{$language.lblSizeChart}</label>
                    <div class="col-sm-8 col-xs-12 top-spc">		
                        <ul>
                            <li>
                                 {$productSizeChart|unescape:"html"}
                            </li>
                        </ul>
                     </div>
              </li>						
         </ul>
        </div>
      </div>
     </div>
  <!--sizechart-->      
  <div class="tabpane "  style="display:none;">
  <div class="tabpane_inner">
  <div class="form_listing">   
     <div class="attribute-section" id="loadCustomAttributes"> 
         <h3 class="tab-head">{$language.lblCustomAttributes}</h3>
{if $resAttributes|@count>0}
    {foreach from=$resAttributes item="resAttributesAdminGroup"}
	{if $resAttributesAdminGroup.attributes|@count>0}
    <h4>{$resAttributesAdminGroup.attributeGroupName}</h4> 
    <div class="grid_table01">
    <table width="100%" cellspacing="0" cellpadding="0" border="0" id="adminLevelCustomAttr">
    <tbody> 
    <tr>
    <th align="left" valign="middle" width="30%">{$language.lblAttributes}</th>
    <th align="left" valign="middle" width="60%">{$language.lblValues}</th>
    </tr>      
    {foreach from=$resAttributesAdminGroup.attributes key=k item="resAttributesAdmin"}    
    {assign var="customAttributeID" value=$k}
    {assign var="attrDetValue" value=$resAttributesAdmin.attrDetValue|default:''}   
    <tr>
    <td align="left" valign="top">{$resAttributesAdmin.attrName}
    </td>
    <td  align="left" valign="top">    
    {if $resAttributesAdmin.attrInputType eq 'textbox' || $resAttributesAdmin.attrInputType eq 'textarea' || $resAttributesAdmin.attrInputType eq 'time'}
         {if $attrDetValue}{$attrDetValue} {else} {$language.lblNotSpecified} {/if}
    {else if $resAttributesAdmin.attrInputType eq 'date'}
         {if $attrDetValue}{$attrDetValue|date_format:$settingsDateFormat}{else} {$language.lblNotSpecified} {/if}   
    {else if $resAttributesAdmin.attrInputType eq 'datetime'}
             {if $attrDetValue}{$attrDetValue|customDate}{else} {$language.lblNotSpecified} {/if}
    {else if $resAttributesAdmin.attrInputType eq 'file'}   
	{if isset($resAttributesAdmin.attrDetValue) && ($resAttributesAdmin.attrDetValue neq '')}
	<span id="trashDisplay_{$resAttributesAdmin.attrValueID}">{html->anchor href="product/download/id/{$resAttributesAdmin.attrValueID}/" class="file-display" image="{$view_images}/download.png"  title=$language.lblDownloadFile}</span>	
	{else}{$language.lblNotSpecified}{/if}	
    {else if $resAttributesAdmin.attrInputType eq 'select' || $resAttributesAdmin.attrInputType eq 'multiselect'}
   {assign var="optionTitleStr" value=''}
    {foreach from=$resAttributesAdmin['attrOptionID'] key="OptionID" item="optionTitle"}
     
     
     {if $resAttributesAdmin.attrInputType eq 'select'}
          {if $resAttributesAdmin.assignedOptionID['0']|default:'' ==$OptionID}         
          {$optionTitle|html_entity_decode}
          {/if}
    {else}
     {if $resAttributesAdmin.assignedOptionID|default:array()|@count >0}
    {if in_array($OptionID, $resAttributesAdmin.assignedOptionID|default:array())}
               {if $optionTitleStr!=''}    
                 {assign var ='optionTitleStr' value=$optionTitleStr|cat:","}
                {/if}
                {assign var ='optionTitleStr' value=$optionTitleStr|cat:$optionTitle|html_entity_decode}
          {/if}
          {/if}
    {/if}

    {/foreach}  {$optionTitleStr}
    {/if}
    </td> 
    </tr>
    {/foreach}	
    </tbody>    
    </table>
    </div>
	{/if}
    {/foreach}
{else}
<div class="message_info"> {$language.msgNoRecords}</div>
{/if}
     </div>
    </div>
    </div>
  </div>
  <div class="tabpane "  style="display:none;">
   <div class="tabpane_inner">
    <h3 class="tab-head">{$language.lblCustomOptions}</h3>
       {if $resUserLevelAttributes|@count>0}  
    <div class="grid_table01 custom-option-grid">
    <table width="100%" cellspacing="0" cellpadding="0" border="0" id="userLevelCustomAttr" class="customAttributePriority">
    <tbody>              
    <tr class="nodrag nodrop">
    <th align="left" valign="middle">{$language.lblName}</th>   
    <th align="left" valign="middle">{$language.lblInputType}</th>
     <th align="left" valign="middle">{$language.lblAttributeSubText}</th>
      <th align="left" valign="middle">{$language.lblValidate}</th>
       <th align="left" valign="middle">{$language.lblPriceImpact}</th>   
    </tr>
    {foreach from=$resUserLevelAttributes item="resAttributesUser"}
   
    {assign var="customOptionID" value=$resAttributesUser.customOptionID}
    {if $productRequestID|default:''}
    {assign var="editAttributeURL" value='attribute/edit/productRequestID/'|cat:{$productRequestID}|cat:'/custid/'|cat:$customOptionID|cat:'/'}
    {else if $productID}        
    {assign var="editAttributeURL" value='productoption/show/productID/'|cat:{$productID}|cat:'/id/'|cat:$customOptionID|cat:'/'}
    {/if}    
    <tr id="{$customOptionID}">
    <td align="left" valign="top"><div class="pos-relative">{$resAttributesUser.customOptionName}{if $resAttributesUser.isGlobal==1}(Global){/if}
     {if $resAttributesUser.inputType eq 'select' || $resAttributesUser.inputType eq 'multiselect'}<span class="expandable expand-span"  style="padding-left:16px;">              
                                <img class="expand" src="{$view_images}/plus.gif" width="14" height="9">
                                <img class="collapse" src="{$view_images}/minus.gif" width="14" height="9" >
              </span>{/if}</div></td>        
    <td align="left" valign="top">{$resAtrributeInputTypes[$resAttributesUser.inputType]}</td>
     <td align="left" valign="top">{if $resAttributesUser.helpText} {$resAttributesUser.helpText} {else}{$language.lblNotSpecified}{/if}</td>
      <td align="left" valign="top"> {if $resAttributesUser.validateRule|strstr:"required"}
                   {$language.lblYes}({$resAttributesUser.validationMessage})
                    {else}
                    {$language.lblNo}
                  {/if}</td>
    <td align="left" valign="top">
    {if $resAttributesUser.inputType eq 'select' || $resAttributesUser.inputType eq 'multiselect'}  
    {else}
    {$resAttributesUser.priceDiff|round:"2"} 
   ({if $resAttributesUser.priceDiff=='I'}{$language.lblIncrease}{elseif $resAttributesUser.priceDiff=='D'}{$language.lblDecrease} 
		  {elseif $resAttributesUser.priceDiff=='O'}{$language.lblOverride}{else}None{/if})
    {/if}
    </td>
    </tr>
     {if $resAttributesUser.variant|default:''}
    <tr class="detailview">
      <td colspan="5" class="expand-div">
    <div class="grid_table01"> 
    <table width="100%" cellpadding="0" cellspacing="0">
     <tr>
      <th align="left" valign="middle">{$language.lblValue}</th>
      <th align="left" valign="middle" width="17%">{$language.lblPriceImpact}</th>
      <th align="left" valign="middle" width="12%">{$language.lblWeightImpact}</th>
      {if $resAttributesUser.inputType=='select'}
      <th align="left" class="variant_image" valign="middle" width="20%">{$language.lblImage}</th>
      {/if}
      <th align="left" valign="middle" width="10%">{$language.lblIsDefault}</th>
    </tr>    
    {foreach from=$resAttributesUser.variant item="attributeOptions"}  	
    <tr>
    <td align="left" valign="top">
{$attributeOptions.value|html_entity_decode}
   </td>
  <td align="left" valign="top">
    <span class="small-field">
  	{$attributeOptions.priceDiff|round:"2"} 
   ({if $attributeOptions.priceDiffType=='I'}{$language.lblIncrease}{elseif $attributeOptions.priceDiffType=='D'} {$language.lblDecrease}
		  {elseif $attributeOptions.priceDiffType=='O'}{$language.lblOverride}{else}{$language.lblNone}{/if})</span>
  </td>
  <td align="left" valign="top">
     <span class="small-field">
    	{$attributeOptions.weightDiff|escape}
	 ({if $attributeOptions.weightDiffType=='I'}{$language.lblIncrease}{elseif $attributeOptions.weightDiffType=='D'} {$language.lblDecrease}
		  {elseif $attributeOptions.weightDiffType=='O'}{$language.lblOverride}{else}{$language.lblNone}{/if})</span>
  </td>
   {if $attributeOptions.inputType eq 'select'}
    <td align="center" valign="top">       
        <div>{if $attributeOptions.variantThumbImage}		  
	 <img src="{$view_public_path}/uploads/catalog/custom-option-variant/{$attributeOptions.variantThumbImage}" width="77"/>              
        {else}
         <img src="{$view_images}/thumbnail.gif" width="77"/> {/if}
        </div> 
     
    </td>{/if}
    <td align="center" valign="top"> 
    {if $attributeOptions.isDefault==1}
    Yes 
    {else}
   No
    {/if}
  </td>     
    </tr>
    {/foreach}
    </table>
    <div>
    </td></tr>
    
    {/if}   
    {/foreach}
    </tbody>
    </table>
    </div>	            
{else}
<div class="message_info"> {$language.msgNoRecords}</div>
{/if}</div>
</div>
   <div class="tabpane "  style="display:none;">
   <div class="tabpane_inner">
    <h3 class="tab-head">{$language.lblCombinations}</h3>
  {if $resproductCombo}
<div class="grid_table01" id="combohead">
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
                <tr align="left" valign="top">
                  <th width="5%" align="left" valign="middle">{$language.lblSlNo} </th>
                  <th align="left" valign="middle">{$language.lblCombinations}</th>
                  <th width="10%" align="left" valign="middle">{$language.lblSKU}</th>
                  <th width="16%" align="left" valign="middle">{$language.lblPriceImpact}</th>
                  <th width="14%" align="left" valign="middle">{$language.lblWeightImpact}</th>
                  <th width="8%" align="left" valign="middle">{$language.lblQty}</th>
                </tr>{assign var="Count" value=1}
	 {foreach from=$resproductCombo item="productCombo"}        
                <tr align="left" valign="top" id="row_{$productCombo.combinationID}">
                  <td align="left" valign="top">{$Count}</td>
                  <td align="left" valign="top" class="combinationImg">{if $productCombo.ComboImage}<img src="{$view_public_path}/uploads/catalog/product-combination/large/{$productCombo.ComboImage}?random={$rand}"  width="100px" height="100px"/>{/if}{$resSelectproduct.productTitle}  ({$productCombo['productOptionName']|default:''}) [ {$productCombo['ProductCombo']} ]</td>
                  <td align="left" valign="top">{$productCombo['combinationSKU']}</td>
                  <td align="left" valign="top">
		{$productCombo['combinationPrice']|round:"2"} ({if $productCombo['combinationPriceDiffType']=='I'}{$language.lblIncrease}{elseif $productCombo['combinationWeightDiffType']=='D'} {$language.lblDecrease}
		  {elseif $productCombo['combinationPriceDiffType']=='O'}{$language.lblNone}{else}{$language.lblNone}{/if})</td>
		  
                  <td align="left" valign="top">{$productCombo['combinationWeight']} ({if $productCombo['combinationWeightDiffType']=='I'}{$language.lblIncrease}{elseif $productCombo['combinationWeightDiffType']=='D'} {$language.lblDecrease}
		  {elseif $productCombo['combinationWeightDiffType']=='O'}{$language.lblNone}{else}{$language.lblNone}{/if})</td>                 
                  <td align="left" valign="top" nowrap>{if $productCombo['combinationQtyUnlimited']==1} {$language.lblUnlimited} {else}{$productCombo['combinationQty']} {/if} [{$language.lblSold} {if $productCombo['soldQunatity']==''} 0 {else} {$productCombo['soldQunatity']} {/if}]</td>                
                </tr>{assign var="Count" value=	$Count+1}		
	{/foreach}	 
</table>
</div>
{else}
 <div class="message_info">{$language.msgNoRecords}</div>
{/if}  
 </div>
 </div>
 <div class="tabpane "  style="display:none;">
  <div class="tabpane_inner">
      <h3 class="tab-head">{$language.lblShipping}</h3>
   {if $resproductShip}
 <div class="grid_table01 form_listing" id="shiphead">
              <table width="100%" cellspacing="0" cellpadding="0" border="0" >
                  <tr align="left" valign="top">                  
                    <th width="20%" align="left" valign="middle">{$language.lblShippingMethods}</th>
                    <th width="20%" align="left" valign="middle">{$language.lblMenuDeliveryzones}</th>
		      <th align="left" valign="middle">{$language.lblBasecharge}</th>
                      <th align="left" valign="middle">{$language.lblMaxqtypershipping}</th>
                        <th align="left" valign="middle">{$language.lblChargeperextraQty}</th>
                        <th align="left" valign="middle">{$language.lblHandlingcharge}</th>
                  </tr>
		   {foreach from=$resproductShip item="productShip"}
                  <tr align="left" valign="top" id="ship_{$productShip.shippingtoproductID}">                   
                    <td align="left" valign="middle">{$productShip.SMservice}</td>
                    <td align="left" valign="middle"> {$productShip.zone}</td>
		     <td align="left" valign="middle"> {$productShip.baseCharge}</td>
                      <td align="left" valign="middle"> {$productShip.maxQtyPerShipping}</td>
                       <td align="left" valign="middle"> {$productShip.chargePerExtraQty}</td>
                       <td align="left" valign="middle"> {$productShip.handlingCharge}</td>
                  </tr>
		  {/foreach}                 
                </table>
</div>               
{else}
 <div class="message_info">{$language.msgNoRecords}</div>
{/if}
  </div> 
  </div>
 <div class="tabpane "  style="display:none;">
   <div class="tabpane_inner">
    <h3 class="tab-head">{$language.lblRelatedProducts}</h3>
  {if $resRelatedproducts|default:array()|@count > 0} <ul>
            <li>
             
              <div class="grid_table01" >
                <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
                  <thead>
                    <tr>
                      <th align="left" valign="middle"> {$language.lblProductTitle}</th>
                      <th align="left" valign="middle"  width="10%"> {$language.lblStatus}</th>
                    </tr>
                  </thead>
                  <tbody>
                  
                  {foreach from=$resRelatedproducts|default:array() item="relatedproducts" key="key1"}
                  <tr>
                    <td align="left" valign="top">{$relatedproducts.productTitle}</td>
                    <td align="left" valign="top"> {if $relatedproducts.productStatus=="Active"} <span class="status_Active">

{$language.lblActive}</span> {elseif $relatedproducts.productStatus=="Inactive"} <span class="status_Inactive">{$language.lblInactive}</span> {else} <span class="status_Cancelled">{$relatedproducts.productStatus}</span> {/if} </td>
                  </tr>
                  {/foreach}
                    </tbody>                  
                </table>
              </div>
            </li>
           </ul>
            {else}
              <div class="message_info">{$language.msgNoRecords}</div>
            {/if}
  
  </div>
  </div>
  <!--Up Sell---->  
   <div class="tabpane "  style="display:none;">
   <div class="tabpane_inner">
    <h3 class="tab-head">{$language.lblUpSellProducts}</h3>
  {if $resUpsellproducts|default:array()|@count > 0} <ul>
            <li>
             
              <div class="grid_table01" >
                <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
                  <thead>
                    <tr>
                      <th align="left" valign="middle"> {$language.lblProductTitle}</th>
                      <th align="left" valign="middle"  width="10%"> {$language.lblStatus}</th>
                    </tr>
                  </thead>
                  <tbody>
                  
                  {foreach from=$resUpsellproducts|default:array() item="relatedproducts" key="key1"}
                  <tr>
                    <td align="left" valign="top">{$relatedproducts.productTitle}</td>
                    <td align="left" valign="top"> {if $relatedproducts.productStatus=="Active"}
                        <span class="status_Active">{$language.lblActive}</span> 
                        {elseif $relatedproducts.productStatus=="Inactive"} 
                            <span class="status_Inactive">
                                {$language.lblInactive}</span> {else} 
                                    <span class="status_Cancelled">{$relatedproducts.productStatus}</span> {/if} </td>
                  </tr>
                  {/foreach}
                    </tbody>                  
                </table>
              </div>
            </li>
           </ul>
            {else}
              <div class="message_info">{$language.msgNoRecords}</div>
            {/if}
  
  </div>
  </div>
   <!---Cross Sell--->
      <div class="tabpane "  style="display:none;">
   <div class="tabpane_inner">
    <h3 class="tab-head">{$language.lblcrossSellProducts}</h3>
  {if $resCrossSellProducts|default:array()|@count > 0} <ul>
            <li>
             
              <div class="grid_table01" >
                <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
                  <thead>
                    <tr>
                      <th align="left" valign="middle"> {$language.lblProductTitle}</th>
                      <th align="left" valign="middle"  width="10%"> {$language.lblStatus}</th>
                    </tr>
                  </thead>
                  <tbody>
                  
                  {foreach from=$resCrossSellProducts|default:array() item="relatedproducts" key="key1"}
                  <tr>
                    <td align="left" valign="top">{$relatedproducts.productTitle}</td>
                    <td align="left" valign="top"> {if $relatedproducts.productStatus=="Active"} 
                        <span class="status_Active">{$language.lblActive}</span> 
                        {elseif $relatedproducts.productStatus=="Inactive"} 
                            <span class="status_Inactive">{$language.lblInactive}</span> 
                        {else} <span class="status_Cancelled">{$relatedproducts.productStatus}</span> {/if} </td>
                  </tr>
                  {/foreach}
                    </tbody>                  
                </table>
              </div>
            </li>
           </ul>
            {else}
              <div class="message_info">{$language.msgNoRecords}</div>
            {/if}
  
  </div>
  </div>  
   <!-- Discussions-->
    <div class="tabpane "  style="display:none;">
    <div class="tabpane_inner">  
        <h3 class="tab-head">{$language.lblDiscussion}</h3>
     {form->hidden name="productTab" value=$productTab}            
      {if !$resProductReviewDetails|@count eq 0}    
      {form->hidden name="hidProductReviewID" value=0}
      <div id="common_message" ></div>
      <div class="review-listing"> 
          {foreach from=$resProductReviewDetails item="product_review_details_list" key="key1"}
        {assign var ='currProductReviewID' value=$product_review_details_list.ProductReviewID}
          
          
          
          
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-bordered">
            <tbody>
                {foreach from=$resProductReviewDetails item="product_review_details_list" key="key1"}
        {assign var ='currProductReviewID' value=$product_review_details_list.ProductReviewID}
                
                <tr> 
                    <td align="left" valign="top" width="10%">
                    <ul id="unit_ul1" class="unit-rating ">
                        <li id="current-rating" class="current-rating" style="width:{16 * $product_review_details_list.productRating}px;">{$product_review_details_list.productRating}/5</li>
                    </ul>
            <span class="name">{$product_review_details_list.userFirstName} {$product_review_details_list.userLastName}</span> <br />
            <span class="date"> {$product_review_details_list.reviwedDate|date_format:"$date_format"} {$product_review_details_list.reviwedDate|date_format:"$time_format"}  </span>  
                    </td>
                    
                    <td align="left" valign="middle" width="35%">
                                        
            <span class="review-item">{$product_review_details_list.reviewTitle}</span> 
                        
            {if $product_review_details_list.helpfulVoteCount>0 || $product_review_details_list.notHelpfulVoteCount>0} 

                                                    {$product_review_details_list.helpfulVoteCount} {$language.lblOf} {$product_review_details_list.notHelpfulVoteCount + $product_review_details_list.helpfulVoteCount} {$language.lblReviewHelpfulText} 
                                                {/if} 
                        
                {assign var="reviewtext" value=$product_review_details_list.reviewText|unescape:"html"}
                {assign var="reviewtextCharCount" value=$reviewtext|count_characters:true}
                {assign var="reviewtextCharLimit" value=180}
            
            
            
            {if $reviewtextCharCount > $reviewtextCharLimit}
                <span class="reviewReadLessDet" id="reviewReadLessDet_{$currProductReviewID}">{$reviewtext|mb_substr:0:$reviewtextCharLimit}...</span>

                <span class="reviewReadMoreDet" id="reviewReadMoreDet_{$currProductReviewID}"  style="display:none;">
                {$reviewtext|nl2br}
                </span>

                {else}
                {$reviewtext|nl2br}										
                {/if}

                  
                   {if $reviewtextCharCount > $reviewtextCharLimit} 
                        {html->anchor class="reviewReadMore" title="{$language.lblViewMore}" rel="{$currProductReviewID}" caption="<span class='v-more'>{$language.lblViewMore}</span><span class='v-less'>{$language.lblViewLess}</span>"}
                      {else}
                      <span style="display:inline-block;width:15px;">&nbsp;</span>
                      {/if} 
                        
                    </td>
                    
                    <td align="center" valign="middle" width="5%">
                        
                        {if $product_review_details_list.reviewStatus eq 'Inactive'}
                        <span class="highlight"> {$product_review_details_list.reviewStatus} </span>
                    {/if} 
                        
                     {if $view_common_languages|@count>1} 
                         {if $product_review_details_list.languageID} <img class="flag" id="flag"  src="{$view_root_path}/public/uploads/languages/{$product_review_details_list.languageImage|escape}" alt="flag" /> {/if}
                     {/if}
                        
                        
                    </td>
                   
                </tr>
                {/foreach}
            </tbody>
        </table>
          
          
          
          
        {/foreach} 
    </div>
      <div class="clearfix">
        <div class="fixing_right pagination_outer"> {paginate->layout key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"}
          <div class="clear"></div>
        </div>
      </div>
      {else}
      <div class="message_info">{$language.lblNoProductDiscussions}</div>
      {/if} </div>
      </div>
    <!--End:Discussion--> 
    </div>
    </div>
    <!--End:Border 3--> 
    {form->hidden name="statusChanged"} 
    <!--End:Border 2--> 
  </div>
  <!--End: left Block-->
  <div class="clear"></div>
</div>
<!--End:Content Container-->
{form->basepath_script}
{include file='CommonFooter.tpl'}
</div>
<!--End:Outer Container--> 
<script type="text/javascript" src="{$view_javascript}/tab-double.js"></script>  
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/productDetails.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script> 
<script type="text/javascript" >
var msgSelectItem	=	"{$language.msgSelectItem}";
var msgSelectAStatus	=	"{$language.msgSelectAStatus}";
$('.remove-spacing li:last-child').css('border-bottom', 'none');
{literal}
$(document).ready(function(){       
        $(document).on('click',".expandable",function(){
		$(".detailview").hide();
		$("td").removeClass("selectedtd");
		$(".expand-span").removeClass("collapsable").addClass("expandable");
		$(this).closest("tr").next(".detailview").show();
		$(this).removeClass("expandable").addClass("collapsable");
		$(this).parent("td").addClass("selectedtd")
	});
	
	$(document).on('click',".collapsable",function(){
		$(this).closest("tr").next(".detailview").hide();
		$(this).removeClass("collapsable").addClass("expandable");
		$(this).parent("td").removeClass("selectedtd")
	});
        
        
});
{/literal}
</script> 
{html->messages_script id="common_message"} 
<script type="text/javascript" >
var lblSelectAction ='{$language.lblSelectAction}';
var lblSelectItem 	='{$language.lblSelectItem}';
var lblSelectDelete ='{$language.lblDeleteReview}';
var lblConfirmDeleteGeneral	='{$language.msgConfirmDelete}';
</script>
<script type="text/javascript" >

$(document).ready(function () {
		$(document).on('click','.reviewReadMore', function () {
			var thisRel = $(this).attr("rel");			
			if($(this).hasClass("minus01"))
			{
				$(this).removeClass("minus01");
				$("#reviewReadMoreDet_"+thisRel).hide();
				$("#reviewReadLessDet_"+thisRel).show();
			}
			else
			{
				$(this).addClass("minus01");
				$("#reviewReadLessDet_"+thisRel).hide();
				$("#reviewReadMoreDet_"+thisRel).show();
				
			}
		});
	});

</script>
</body>
</html>
