Thursday, 24 December 2015

Call main image for product without resize on Product detail Page in OpenCart

<?php require( DIR_TEMPLATE.$this->config->get('config_template')."/template/common/config.tpl" );

  $themeConfig = $this->config->get('themecontrol');
  $productConfig = array(  
      'product_enablezoom'         => 1,
      'product_zoommode'           => 'basic',
      'product_zoomeasing'         => 1,
      'product_zoomlensshape'      => "round",
      'product_zoomlenssize'       => "150",
      'product_zoomgallery'        => 0,
      'enable_product_customtab'   => 0,
      'product_customtab_name'     => '',
      'product_customtab_content'  => '',
      'product_related_column'     => 0,
     
  );
  $categoryConfig = array(
'category_pzoom'   => 1,
  );
  $categoryPzoom    = $categoryConfig['category_pzoom'];
  $productConfig = array_merge( $productConfig, $themeConfig );
  $languageID = $this->config->get('config_language_id');
?>

<?php echo $header; ?>
<?php require( DIR_TEMPLATE.$this->config->get('config_template')."/template/common/breadcrumb.tpl" );  ?>
<div class="container">

<div class="row">

<?php if( $SPAN[0] ): ?>
<aside class="col-lg-<?php echo $SPAN[0];?> col-md-<?php echo $SPAN[0];?> col-sm-12 col-xs-12">
<?php echo $column_left; ?>
</aside>
<?php endif; ?>

<section class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div id="content-man" class="product-detail">
<?php echo $content_top; ?>
<div class="product-info">
<div class="row">
            <!--<div id="carousel-inner" class="col-lg-2 col-sm-2 col-xs-12">
<?php
if( $productConfig['product_zoomgallery'] == 'slider' && $thumb ) {
$eimages = array( 0=> array( 'popup'=>$popup,'thumb'=> $thumb )  );
$images = array_merge( $eimages, $images );
}
$icols = 3; $i= 0;
foreach ($images as  $image) { ?>
<?php if( (++$i)%$icols == 1 ) { ?>
<div class="item">
<?php } ?>
                                <?php


                        $p=str_replace("image/cache/sellers/","image/sellers/",$image['thumb']);
                     
                        $pattern = '/sellers/';
                        if (preg_match($pattern, $image['thumb']))
                        {


                        $k=str_replace('-500x500',"",$p);
                     
                        $imagepath=$k;
                        }

                        else
                        {
                        $imagepath=$image['thumb'];
                        }
                        ?>
                        <style>
#cboxLoadedContent{
width:500px;
height:500px;

}

</style>
<a href="<?php echo $imagepath; ?><?php //echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" data-zoom-image="<?php echo $imagepath; ?><?php //echo $image['popup']; ?>" data-image="<?php echo $imagepath; ?><?php //echo $image['popup']; ?>" id="colorbox-cboxElement">
                                    <?php
$size='/-80x85/';
                        $p=str_replace("image/cache/sellers/","image/sellers/",$image['thumb']);
                   
                        $pattern = '/sellers/';
                        if (preg_match($pattern, $image['thumb']))
                        {
if(preg_match($size,$p)){
$k=str_replace("-80x85","",$p);
}
else{
                        $k=str_replace("-500x500","",$p);
                       }
                        $imagepath=$k;
                        }
                        else
                        {
                        $imagepath=$image['thumb'];
                        }
                        ?>
<img src="<?php echo $imagepath; ?>" style="max-width:<?php echo $this->config->get('config_image_additional_width');?>px"  title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" data-zoom-image="<?php echo  $imagepath; ?><?php //echo $image['popup']; ?>" class="product-image-zoom img-responsive" />
</a>
<?php if( $i%$icols == 0 || $i==count($images) ) { ?>
</div>
 <?php } ?>
<?php } ?>
</div>-->
<?php if ($thumb || $images) { ?>
<div class="left pull-left col-sm-6 col-xs-12 image-container">
<?php if( $special )  { ?>        
<!--<span class="product-label-special"><span><?php //echo $this->language->get( 'text_sale' ); ?></span></span>-->
<?php } ?>

<?php if ($thumb) { ?>
<div class="image">
<a href="<?php echo $imagepath; ?><?php //echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox">    </a>                 <?php
                        $size='/-80x85/';
$p=str_replace("image/cache/sellers/","image/sellers/",$thumb);
                   
                        $pattern = '/sellers/';
                        if (preg_match($pattern, $thumb))
                        {
if(preg_match($size,$p)){
$k=str_replace("-80x85","",$p);
}
else{
                        $k=str_replace("-500x500","",$p);
                       }
                        $imagepath=$k;
                        }
                        else
                        {
                     
                        $imagepath=$thumb;
                        }
                        ?>
                     
<img src="<?php echo $imagepath; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image"  data-zoom-image="<?php echo $imagepath; ?><?php //echo $popup; ?>" class="product-image-zoom " style="width:400px;"/>

</div>
<?php } ?>
 
                   
<!---------------EDIT MODE-------------------->


<!---------------END EDIT MODE---------------->
<?php if ($images) { ?>
<div class="image-additional slide carousel" id="image-additional">
<div id="carousel-inner">
                     
<?php
if( $productConfig['product_zoomgallery'] == 'slider' && $thumb ) {
$eimages = array( 0=> array( 'popup'=>$popup,'thumb'=> $thumb )  );
$images = array_merge( $eimages, $images );
}
$icols = 5; $i= 0;
                         
                           
                           
                           
foreach (array_slice($images,1) as  $image) {
                         
                             ?>
<?php if( (++$i)%$icols == 1 ) {  ?>
<div class="item">
<?php }  ?>
                                 <?php
                        $size='/-80x85/';
         $p=str_replace("image/cache/sellers/","image/sellers/",$image['thumb']);
                   
                        $pattern = '/sellers/';
                        if (preg_match($pattern, $image['thumb']))
                        {
        if(preg_match($size,$p)){
         $k=str_replace("-80x85","",$p);
        }
                     else{
                        $k=str_replace("-500x500","",$p);
                       }
                        $imagepath=$k;
                        }
                        else
                        {
                     
                        $imagepath=$image['thumb'];
                        }
                        ?>
                         <?php
                        $size='/-80x85/';
         $pop=str_replace("image/cache/sellers/","image/sellers/",$image['popup']);
                   
                        $pattern = '/sellers/';
                        if (preg_match($pattern, $image['popup']))
                        {
        if(preg_match($size,$pop)){
         $kpop=str_replace("-80x85","",$pop);
        }
                     else{
                        $kpop=str_replace("-500x500","",$pop);
                       }
                        $imagepopup=$kpop;
                        }
                        else
                        {
                     
                        $imagepopup=$image['popup'];
                        }
                        ?>
<a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" data-zoom-image="<?php echo $imagepopup;; ?>" data-image="<?php echo $imagepopup;; ?>" id="colorbox-cboxElement">
<img src="<?php echo $imagepath; ?>" style="max-width:<?php echo $this->config->get('config_image_additional_width');?>px"  title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" data-zoom-image="<?php echo $imagepopup; ?>" class="product-image-zoom img-responsive" />
</a>
<?php if( $i%$icols == 0 || $i==count($images) ) { ?>
</div>
 <?php } ?>
<?php } ?>
<?php if($i<5){ echo "</div>"; } if($i>5){ echo "</div>"; } ?>
<!--<div class="carousel-control left fa fa-angle-left" href="#image-additional" data-slide="prev"></div>
<div class="carousel-control right fa fa-angle-right" href="#image-additional" data-slide="next"></div>-->
</div>
<script async type="text/javascript">
$('#image-additional .item:first').addClass('active');
$('#image-additional').carousel({interval:false})
</script>
<?php } ?>  
</div>
               
<?php } ?>

</div>
<div class="right pull-right col-sm-6 col-xs-12">
<div class="description" id="description">
<?php if ($profiles): ?>
<div class="option form-group" >
<h2><span class="required">*</span><?php echo $text_payment_profile ?></h2>
<select name="profile_id" class="form-control">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($profiles as $profile): ?>
<option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option>
<?php endforeach; ?>
</select>
<span id="profile-description"></span>
</div>
<?php endif; ?>
                 

                 <h2><?php echo $heading_title; ?></h2>
             
                 
<?php if ($options) { ?>
<div class="options">
<h2><?php //echo $text_option; ?></h2>      
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'select') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option form-group" style="width:160px;">
<?php if ($option['required']) { ?>
<p><span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b></p>
<select name="option[<?php echo $option['product_option_id']; ?>]">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($option['option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</option>
<?php } ?>
</select>
</div>      
<?php } ?>


<?php if ($option['type'] == 'radio') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option-size">
<?php if ($option['required']) { ?>
<p><span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b></p>
<?php foreach ($option['option_value'] as $option_value) { ?>
<div class="radio">
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>">
<input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
<?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</label>
</div>
<?php } ?>
</div>
<?php } ?>

<?php } ?>
</div>
<?php } ?>

            <style>
.span.price {
  font-size: 24px;
  display: block;
  margin: -10px 0 0;
  vertical-align: bottom;
}


span.price {
  color: #e74c3c;
  font-size: 16px;
  font-weight: 600;
}
.btn-wishlist, .btn-compare {
    width: 45px;
    height: 41px;
    padding: 10px;
    margin-right: 10px !important;
}
</style>
            <?php
               mysql_connect("localhost","decporti_decp","QCUy={ngGyb2");
mysql_select_db("decporti_decport");
                $sql=mysql_fetch_array(mysql_query("SELECT * FROM `oc_product_description` WHERE `product_id`='".$_GET['product_id']."'"));
             
             $link = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    $link_array = explode('/',$link);
    $page = end($link_array);
    $ur= str_replace('-',' ',$page);
   $uri= explode('.', $ur);
   // echo $uri[0];
 
               //echo '<h2 style="font-size: 24px;    font-weight: 700;">'.$sql['name'].'</h2>';
               if(!$sql['name'])
               {
               //echo '<h2 style="font-size: 24px;    font-weight: 700;">'.$uri[3].'</h2>';
               }
                 ?>
                 <?php if ($review_status) { ?>
<div class="col-lg-6 col-lg-6 col-lg-6 review" style="padding:0px;">
<div><img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
</div>
         
            <div class="col-lg-6 col-lg-6 col-lg-6 share">
<!-- AddThis Button BEGIN -->
<div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div>
<script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script>
<!-- AddThis Button END -->
</div>
<?php if ($attribute_groups) { ?>
<div class="col-lg-12 col-lg-12 col-lg-12">
<table class="attribute table">
        <?php
        $arr=array('Material','Colour','Brand');?>
<?php foreach ($attribute_groups as $attribute_group) { ?>
<tbody>
            <ul class="list-unstyled description">
<?php foreach ($attribute_group['attribute'] as $attribute) { ?>

                <?php
                for($i=0;$i<3;$i++)
                {
                if($attribute['name']==$arr[$i]){
                ?>
             
<li type="disc"><?php echo $attribute['name']; ?> : <?php echo $attribute['text']; ?></li>

<?php }} ?>
         
            <?php } ?>
            </ul>
</tbody>
<?php } ?>
</table>
</div>
<?php } ?>

<?php } ?>
<div>
            <?php if ($price) { ?>
     
            <div class="price">
<div class="price-gruop">
                        <span class="price">
<!--<span class="text-price"><?php // echo $text_price; ?></span>-->
<?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span class="price-old"><?php echo $price; ?></span>
<span class="price-new"><?php echo $special; ?></span>
<?php } ?>
                            </span>
</div>
                     
                        <?php if($special){ ?>
                        <?php
                        $oldp=str_replace("Rs","",$price);
                        $newp=str_replace("Rs","",$special);
                         $off=(str_replace(",","",$oldp)-str_replace(",","",$newp))/str_replace(",","",$oldp);
                        $offer= $off*100;
                         if($offer!='0'){
                          ?>
<div>               <?php
                     
                         echo round($offer)." "."%"." "."OFF";
                       
                         ?>
                       
                     
                        </div> <?php } }?>
                       
<!--<div class="other-price">
<?php //if ($tax) { ?>
<span class="price-tax"><?php //echo $text_tax; ?> <?php //echo $tax; ?></span><br/>
<?php //} ?>
<?php //if ($points) { ?>
<span class="reward"><small><?php //echo $text_points; ?> <?php //echo $points; ?></small></span>
<?php //} ?>
</div>-->

<?php if ($discounts) { ?>
<div class="discount">
<ul>
<?php foreach ($discounts as $discount) { ?>
<li><?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
                 
               
                 
                    <?php
                 $corporate_gifts = array("corporate gift","wall clocks","crystal items","decorative mirrors","photo frame","showpiece","silver items","brass","religious item","tea set");
                 $whatINeed = explode('/', $link);
                 $whatINeed = str_replace('-',' ',$whatINeed[3]);
                 if(in_array($whatINeed,$corporate_gifts)):?>
                 <div style="    width: 50%;
    float: right;
    margin-top: -110px;">
    <?php
    $link = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    $link_array = explode('/',$link);
    $page = end($link_array);
    $ur= str_replace('-',' ',$page);
   $uri= explode('.', $ur);
  $product_name= $uri[0];
 
    ?> <p style="margin-top:-15px;    font-size: x-large;">Call us at : <span style="
    color: #e74c3c;
">+91-9999491967</span></p>
    <div style="border:2px solid;border-radius:3px;color:#e74c3c;">

               <form method="POST">

<table class="form">
<tbody>
                        <tr><td width="20%" style="padding-top:10px !important;"><span class="required">*</span> Full Name:</td></tr>
                     
                        <tr><td width="30%"><input type="text" name="field1" class="field-divided" /></td></tr>
                        <input type="hidden" name="product" value="<?php echo $product_name; ?>" />
                        <tr><td width="20%"><span class="required">*</span> Phone: </td></tr>
                         
                        <tr><td width="30%"><input type="text" name="phone" class="field-long" /></td></tr>
                        <tr><td width="20%"><span class="required">*</span> E-mail: </td></tr>
                         
                        <tr><td width="30%"><input type="email" name="email" class="field-long" /></td></tr>
                     
<tr><td><span class="required">*</span> Your Message </td></tr>
                        <tr><td><textarea name="field5" id="field5" class="field-long field-textarea"></textarea></td></tr>
                     
                        <tr><td><input type="submit" value="Order Now" name="mails" style="height:30px;"/></td></tr>

</tbody>
                    </table>
</form></div></div>

              <?php   endif;  ?>
                        <?php foreach ($attribute_groups as $attribute_group) { ?>
<?php foreach ($attribute_group['attribute'] as $attribute) { ?>
<?php
                if($attribute['name']=='Discount'){
                ?>
                <ul>
<li type="disc"> <?php echo $attribute['text']; ?></li>
</ul>
<?php }} ?>
<?php } ?>
                 
<?php } ?>

         
                     
         
               
<div class="col-lg-12 col-lg-12 col-lg-12 product-extra" id="qun-div">
            <?php
                 $corporate_gifts = array("corporate gift","wall clocks","crystal items","decorative mirrors","photo frame","showpiece","silver items","brass","religious item","tea set");
                 $whatINeed = explode('/', $link);
                 $whatINeed = str_replace('-',' ',$whatINeed[3]);
                 if(in_array($whatINeed,$corporate_gifts)){ ?>
                <h5 style="margin-top: -216px;">Minimum Quantity : 10</h5>
             <?php    } else{?>
               

<div class="quantity-adder pull-left" style="width: 100%;">
<div class="quantity-number pull-left" style="width: 100%;">
<label class="control-label" for="input-quantity"><?php echo $text_qty; ?></label>    
<div class="select_number">
<input type="text" class="text form-control" name="quantity" size="2" id="input-quantity" value="<?php echo $minimum; ?>" />
<button onclick="changeQty(0); return false;" class="decrease">-</button>
        <button onclick="changeQty(1); return false;" class="increase">+</button>
</div>
<input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
<div class="cart_button">
<div class="boss_cover"><span class="cart_icon"></span></div>
<?php /* <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /> */ ?>
        <?php if ($stock == "In Stock") {?>
<button id="button-cart" class="btn button_cart">
<!--<span class="fa fa-shopping-cart  add-to-icon"></span>-->
<a id="button-cart" class="btn button_cart"><?php echo $button_cart; ?></a>
</button> <?php } else{ ?>
        <button id="button-cart" class="btn btn-cart"  disabled="disabled" style="background: #E65B5B;padding: 4px 11px 3px 3px;    margin-top: 6px;width: 100px;font-size: inherit;">
<!--<span class="fa fa-shopping-cart  add-to-icon"></span>-->
<span><?php echo "Out of Stock"; ?></span>
</button> <?php } ?>
</div>
<div class="btn-group">
<a class="btn-wishlist" title="Add to Wish List" href="#" onclick="addToWishList('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></a>
<a class="btn-compare" title="Compare this Product" href="#" onclick="addToCompare('<?php echo $product['product_id']; ?>');"><i class="fa fa-retweet"></i></a>
</div>
<!-- <span>&nbsp;&nbsp;<?php //echo $text_or; ?>&nbsp;&nbsp;</span> -->
</div>

            <?php if ($minimum > 1) { ?>
<div class="minimum"><small><?php echo $text_minimum; ?></small></div>
<?php } ?>
         
<?php } ?>




           



</div>
     
</div>
    <!--------------Delivery Option-------------------->
    <?php
                 $corporate_gifts = array("corporate gift","wall clocks","crystal items","decorative mirrors","photo frame","showpiece","silver items","brass","religious item","tea set");
                 $whatINeed = explode('/', $link);
                 $whatINeed = str_replace('-',' ',$whatINeed[3]);
                 if(in_array($whatINeed,$corporate_gifts)){
           
                 } else{?>
            <div class="col-lg-12 col-lg-12 col-lg-12">
            <?php
            $customerid=mysql_fetch_array(mysql_query("SELECT * FROM `oc_ms_seller` WHERE `nickname` REGEXP '".$seller['nickname']."'"));
            $storename=mysql_fetch_array(mysql_query("SELECT * FROM `oc_customer` WHERE `customer_id`='".$customerid['seller_id']."'"));
           $store_url= strtolower(str_replace(" ","-",$storename['firstname']));  if($seller['nickname']){ ?>
       <div>Sold By : <b><a href="http://www.decport.com/<?php echo $store_url; ?>"><?php   echo $storename['firstname']; ?></a></b></div>
      <a href="http://www.decport.com/<?php echo $store_url; ?>/products" style="color: #e74c3c!important;">Other Products by Same Seller</a>
            <?php } if ($attribute_groups) { ?>

        <?php
        $pq=array('Standard Delivery','COD','International'); ?>
<?php foreach ($attribute_groups as $attribute_group) { ?>

         
<?php foreach ($attribute_group['attribute'] as $attribute) { ?>

                <?php
                for($i=0;$i<3;$i++)
                {
                if($attribute['name']==$pq[$i]){
                ?>
             
<li type="disc">  <?php if($attribute['name']=='COD') {echo str_replace("COD","Cash On Delivery",$attribute['name']); } elseif($attribute['name']=='International'){echo str_replace("International","International Shipping",$attribute['name']);} else { echo $attribute['name'];}?> : <?php if($attribute['text']=='No'){echo str_replace("No","Not Available",$attribute['text']);} elseif($attribute['text']=='Yes'){echo str_replace("Yes","Available",$attribute['text']);} else{ echo $attribute['text']; } ?> </li>

<?php }} ?>
         
            <?php } ?>
         
<?php }} ?>
</div> <?php } ?>
       <!-----------End Delivery Option------------------->
</div>

 

</div>
</div>
<style>
#psummary{
  background: #f7f7f7;
  margin-bottom: 20px;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;  border-spacing: 2px;
}
#psummary td {
  border: 1px solid #C7C7C7;
  padding: 8px;
  font-size: 14px;
  vertical-align: middle;
  padding-bottom: 17px;
  padding: 0px 20px 5px 10px!important;
}
li{list-style:none;}
</style>


<!--<div class="col-md-12">-->
<div>
    <table id="psummary">
<!--<tr><td colspan="2"><h5 style="color:#b70000;">PRODUCT SUMMARY</h5>
       
            </td></tr>
                        <tr><td>
<?php if ($manufacturer) { ?>
<p><?php echo $text_manufacturer; ?></td><td><a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a></p> </td></tr>
<?php } ?><?php
                          $product_info = $this->model_catalog_product->getProduct($product_id);
                          ?>
<tr><td><p><?php echo $text_model; ?></td><td><?php echo $product_info['sku']; ?><?php //echo $model; ?></p></td></tr>
<?php if ($reward) { ?>
<tr><td><p><?php echo $text_reward; ?></td><td><?php echo $reward; ?>
                        </p></td></tr>
<?php } ?>
<p>
<tr><td> <?php echo $text_stock; ?></td>
<td><span class="availability"><?php echo $stock; ?></span></td>
</p> </tr>-->

</table>
    </div>
    <?php if ($tags) { ?>
<div class="tags">
<b><?php echo $text_tags; ?></b>
<?php for ($i = 0; $i < count($tags); $i++) { ?>
<?php if ($i < (count($tags) - 1)) { ?>
<a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
<?php } else { ?>
<a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
<!--------------EDIT MODE----------------------->
<!--<div class="col-lg-12 col-lg-12 col-lg-12">-->
<div>

<div id="tabs" class="htabs">
    <!--<ul class="breadcrumb" style="background: #64A2E2;">-->

        <ul class="nav nav-tabs">
   <li class="active"><a href="#tab-description" data-toggle="tab" aria-expanded="true"><?php echo $tab_description; ?></a></li>
<?php if ($attribute_groups) { ?>
<li><a href="#tab-attribute" data-toggle="tab" aria-expanded="false"><?php echo $tab_attribute; ?></a></li>
<?php } ?>
<?php if ($review_status) { ?>
<li><a href="#tab-review" data-toggle="tab" aria-expanded="false"><?php echo $tab_review; ?></a></li>
<?php } ?>
<?php if( $productConfig['enable_product_customtab'] && isset($productConfig['product_customtab_name'][$languageID]) ) { ?>
<!--<li class="listc"><a href="#tab-customtab"><?php //echo $productConfig['product_customtab_name'][$languageID]; ?></a></li>-->
<?php } ?>
            <li></li>
</ul>
</div>
<div class="tab-content">
<div id="tab-description" class="tab-pane active"><?php echo $description; ?></div>
  <?php if ($attribute_groups) { ?>
<div id="tab-attribute" class="tab-pane">
<table class="attribute table">
<?php foreach ($attribute_groups as $attribute_group) { ?>
<thead>
<tr>
<td colspan="2"><?php echo $attribute_group['name']; ?></td>
</tr>
</thead>
<tbody>
<?php foreach ($attribute_group['attribute'] as $attribute) {
            if($attribute['name']=='Courier Type' || $attribute['name']=='COD' || $attribute['name']=='International' ){}
            else{
            ?>
<tr>
<td><?php echo $attribute['name']; ?></td>
<td><?php echo $attribute['text']; ?></td>
</tr>
<?php }} ?>
</tbody>
<?php } ?>
</table>
</div>
<?php } ?>


<?php if ($review_status) { ?>
 <div id="tab-review" class="tab-pane">
  <div id="review"></div>
  <h2 id="review-title"><?php echo $text_write; ?></h2>

  <div class="form-group">
   <label><?php echo $entry_name; ?></label>
   <p><input type="text" name="name" value=""  style="background-color: #f7f7f7;width: 100%;"/></p>
  </div>

  <div class="form-group">
   <label><?php echo $entry_review; ?></label>
   <p><textarea name="text" cols="50" rows="4" class="form-control" style="background-color: #f7f7f7;width: 100%;"></textarea></p>
  </div>

  <div class="form-group">
   <p><span style="font-size: 11px;"><?php echo $text_note; ?></span></p>
   <p>
    <strong><?php echo $entry_rating; ?></strong>
    <span><?php echo $entry_good; ?></span>
    <span>or</span>
    <span><?php echo $entry_bad; ?></span>
    <ul class="rating">
   <li> <input type="radio" name="rating" value="1" />  </li>
   <li> <input type="radio" name="rating" value="2" />  </li>
   <li> <input type="radio" name="rating" value="3" />   </li>
   <li> <input type="radio" name="rating" value="4" />  </li>
    <li><input type="radio" name="rating" value="5" /> </li>
    </ul>
 
   </p>
   <p> <strong><?php echo $entry_captcha; ?></strong> </p>
   <p> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /> </p>
   <p> <input type="text" name="captcha" value=""  style="background-color: #f7f7f7; width:50%;"/> </p>
  </div>

  <div class="buttons no-padding">
   <div class="pull-right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
  </div>
 </div>
 <?php } ?>


<?php if( $productConfig['enable_product_customtab'] && isset($productConfig['product_customtab_content'][$languageID]) ) { ?>
<div id="tab-customtab" class="tab-content custom-tab">
<!--<div class="inner">
<?php echo html_entity_decode( $productConfig['product_customtab_content'][$languageID], ENT_QUOTES, 'UTF-8'); ?>
</div>-->
</div>
<?php } ?>

</div>
<style>
.product-info .image-additional {
    background-color: #F1F1F1;
    padding: 3px 10px;
    margin-bottom: 10px;
}
div#carousel-inner {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-left: 0px;
}
a#colorbox-cboxElement {
    display: inline-block;
    zoom: 1;
    margin-right: 9px;
    width: 90px;
    border: 1px solid #D8D8D8;
}
.product-info .image-additional a {
    display: inline-block;
    zoom: 1;
    margin-right: 10px;
    width: 30%;
}
.product-info .image-additional img {
    border: 0;
}

</style>
<!--<div class="col-lg-3 col-lg-3 col-lg-3">
    <div id="rightcolumn">
    <?php //echo $column_right; ?>
    </div>-->
    </div>
    <div class="clearfix"></div>
 <div class="col-lg-12 col-lg-12 col-lg-12">
<?php if ($products) { ?>
<?php
$cols = ($productConfig['product_related_column'] == 0)?3:$productConfig['product_related_column'];
$span = 12/$cols;
?>
<div class="product-related">
<h2><?php echo $tab_related; ?> (<?php echo count($products); ?>)</h2>
<div class="carousel-button">
<a id="prev_related" class="prev nav_thumb" href="javascript:void(0)" style="display: block;" title="prev"><i data-original-title="Previous" title="" class="fa fa-angle-left btooltip">&nbsp;</i></a>
<a id="next_related" class="next nav_thumb" href="javascript:void(0)" style="display: block;" title="next"><i data-original-title="Next" title="" class="fa fa-angle-right btooltip">&nbsp;</i></a>
</div>
<div class="list_carousel responsive">
<div class="caroufredsel_wrapper" style="display: block; text-align: start; float: none; position: relative; top: auto; right: auto; bottom: auto; left: auto; z-index: auto; width: 1170px; height: 398px; margin: 0px 0px 10px; overflow: hidden;">
<ul id="product_related" class="content-products" style="text-align: left; float: none; position: absolute; top: 0px; right: auto; bottom: auto; left: 0px; margin: 0px; width: 6630px; height: 398px; z-index: auto;">
<?php foreach ($products as $i => $product) { $i=$i+1; ?>
<?php if( $i%$cols == 1 && $cols > 1 ) { ?>
   <div class="row">
<?php } ?>
<li style="width: 390px;">
<div class="product-thumb transition">
<?php if ($product['thumb']) { ?>
<div class="image">
<?php if( $product['special'] ) {   ?>    
<span class="product-label-special"><span><?php echo $this->language->get( 'text_sale' ); ?></span></span>
<?php } ?>
                       
<a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" class="img-responsive" /></a>
<?php if( $categoryPzoom ) { $zimage = str_replace( "cache/","", preg_replace("#-\d+x\d+#", "",  $product['thumb'] ));  ?>
<!--<a href="<?php echo $zimage;?>" class="info-view colorbox product-zoom" rel="colorbox" title="<?php echo $product['name']; ?>"><i class="fa fa-search-plus"></i></a>-->
<?php } ?>
<div class="img-overlay"></div>
</div>
<?php } else { ?>
    <div class="left">
<div class="image"><img src="image/data/no_image.jpg" title="No Image" alt="No Image" id="image" style="width:228px;height:228px;" /></a></div>
    </div>
      <?php } ?>
<div class="small_detail">
<div class="caption">
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo substr($product['name'],'0','30'); ?></a></div>

<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>

<?php if ($product['price']) { ?>
<p class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span>
<span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</p>
<?php } ?>


                            <div class="button-group bt-button-group">
<a href="#" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="btn-cart">Add to Cart</a>
<a class="btn-wishlist" title="Add to Wish List" href="#" onclick="addToWishList('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></a>
<a class="btn-compare" title="Compare this Product" href="#" onclick="addToCompare('<?php echo $product['product_id']; ?>');"><i class="fa fa-retweet"></i></a>
<button title="Quick View" class="sft_quickshop_icon"><span class="qs_icon"><i class="fa fa-search"></i></span></button>
</div>
                             
<!--<script type="text/javascript" src="catalog/view/theme/lexus_megashop/javascript/jquery.raty.min.js"></script><script type="text/javascript" src="catalog/view/theme/lexus_megashop/javascript/jquery.tweet.js"></script><script type="text/javascript" src="catalog/view/theme/lexus_megashop/javascript/tinynav.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/perfect-scrollbar.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/zoomsl-3.0.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/jquery.fancybox.pack.js"></script><script type="text/javascript" src="catalog/view/theme/lexus_megashop/javascript/jquery.themepunch.plugins.min.js"></script><script type="text/javascript"src="catalog/view/theme/lexus_megashop/javascript/jquery.themepunch.revolution.min.js"></script><script defer src="catalog/view/theme/lexus_megashop/javascript/flexslider.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/jquery.iosslider.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/jquery.nouislider.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/owl.carousel.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/zoomsl-3.0.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/chosen.jquery.min.js"type="text/javascript"></script><script defer src="catalog/view/theme/lexus_megashop/javascript/bootstrap.min.js"></script><script src="catalog/view/theme/lexus_megashop/javascript/main-script.js"></script>-->
</div></div>
</div>
</li>

<?php if( $cols > 1  && ($i%$cols == 0 || $i==count($products)) ) { ?>
</div>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
<?php echo $content_bottom; ?>

    <?php } ?>
    </div>
    <!-- Cloud Zoom -->
 
  <script src="catalog/view/theme/lexus_megashop/javascript/zoomsl-3.0.min.js"></script>
<!-------------EDIT MODE END-------------------->

<?php if( $productConfig['product_enablezoom'] ) { ?>
<script type="text/javascript" src=" catalog/view/javascript/jquery/elevatezoom/elevatezoom-min.js"></script>
<script async type="text/javascript">
<?php if( $productConfig['product_zoomgallery'] == 'slider' ) {  ?>
$("#image").elevateZoom({gallery:'image-additional', cursor: 'pointer', galleryActiveClass: 'active'});
<?php } else { ?>
var zoomCollection = '<?php echo $productConfig["product_zoomgallery"]=="basic"?".product-image-zoom":"#image";?>';
$( zoomCollection ).elevateZoom({
<?php if( $productConfig['product_zoommode'] != 'basic' ) { ?>
zoomType        : "<?php echo $productConfig['product_zoommode'];?>",
<?php } ?>
lensShape : "<?php echo $productConfig['product_zoomlensshape'];?>",
lensSize    : <?php echo (int)$productConfig['product_zoomlenssize'];?>,
});
<?php } ?>
</script>
<?php } ?>

<script async type="text/javascript">
$('#product<?php echo $id;?>').carousel({interval:<?php echo ( $auto_play_mode?$interval:'false') ;?>,auto:<?php echo $auto_play;?>,pause:'hover'});
</script>

<script async type="text/javascript">
<!--
$(document).ready(function() {
  $('.colorbox').colorbox({
    overlayClose: true,
    opacity: 0.5,
    rel: "colorbox"
  });
});
//-->
</script>

 <script async type="text/javascript">
 <!--
$('select[name="profile_id"], input[name="quantity"]').change(function(){
    $.ajax({
    url: 'index.php?route=product/product/getRecurringDescription',
    type: 'post',
    data: $('input[name="product_id"], input[name="quantity"], select[name="profile_id"]'),
    dataType: 'json',
        beforeSend: function() {
            $('#profile-description').html('');
        },
    success: function(json) {
      $('.success, .warning, .attention, information, .error').remove();
         
      if (json['success']) {
                $('#profile-description').html(json['success']);
      }
    }
  });
});
 
$('#button-cart').bind('click', function() {
  $.ajax({
    url: 'index.php?route=checkout/cart/add',
    type: 'post',
    data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
    dataType: 'json',
    success: function(json) {
      $('.success, .warning, .attention, information, .error').remove();
   
      if (json['error']) {
        if (json['error']['option']) {
          for (i in json['error']['option']) {
            $('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
          }
        }
             
                if (json['error']['profile']) {
                    $('select[name="profile_id"]').after('<span class="error">' + json['error']['profile'] + '</span>');
                }
      }
   
      if (json['success']) {
        $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/close.png" alt="" class="close" /></div>');
       
        $('.success').fadeIn('slow');
       
        $('#cart-total').html(json['total']);
     
        $('html, body').animate({ scrollTop: 0 }, 'slow');
      }
    }
  });
});
//-->
</script>

<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script async type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
  action: 'index.php?route=product/product/upload',
  name: 'file',
  autoSubmit: true,
  responseType: 'json',
  onSubmit: function(file, extension) {
    $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/loading.gif" class="loading" style="padding-left: 5px;" />');
    $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
  },
  onComplete: function(file, json) {
    $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);
 
    $('.error').remove();
 
    if (json['success']) {
      alert(json['success']);
   
      $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
    }
 
    if (json['error']) {
      $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
    }
 
    $('.loading').remove();
  }
});
//-->
</script>

<?php } ?>
<?php } ?>
<?php } ?>

<script async type="text/javascript">
<!--
$('#review .pagination a').live('click', function() {
  $('#review').fadeOut('slow');
 
  $('#review').load(this.href);

  $('#review').fadeIn('slow');

  return false;
});  

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
  $.ajax({
    url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
    type: 'post',
    dataType: 'json',
    data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
    beforeSend: function() {
      $('.success, .warning').remove();
      $('#button-review').attr('disabled', true);
      $('#review-title').after('<div class="attention"><img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
    },
    complete: function() {
      $('#button-review').attr('disabled', false);
      $('.attention').remove();
    },
    success: function(data) {
      if (data['error']) {
        $('#review-title').after('<div class="warning">' + data['error'] + '</div>');
      }
   
      if (data['success']) {
        $('#review-title').after('<div class="success">' + data['success'] + '</div>');
             
        $('input[name=\'name\']').val('');
        $('textarea[name=\'text\']').val('');
        $('input[name=\'rating\']:checked').attr('checked', '');
        $('input[name=\'captcha\']').val('');
      }
    }
  });
});
//-->
</script>

<script async type="text/javascript">
<!--
$('#tabs a').tabs();
//-->
</script>

<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>
<script async type="text/javascript">
<!--
$(document).ready(function() {
  if ($.browser.msie && $.browser.version == 6) {
    $('.date, .datetime, .time').bgIframe();
  }

  $('.date').datepicker({dateFormat: 'yy-mm-dd'});
  $('.datetime').datetimepicker({
    dateFormat: 'yy-mm-dd',
    timeFormat: 'h:m'
  });
  $('.time').timepicker({timeFormat: 'h:m'});
});
//-->
</script>
</div>
 
</section>




</div>
<?php if( $SPAN[2] ): ?>
<aside class="col-lg-<?php echo $SPAN[2];?> col-md-<?php echo $SPAN[2];?> col-sm-12 col-xs-12">
<?php //echo $column_right; ?>
</aside>
<?php endif; ?></div>
<?php echo $footer; ?>

No comments:

Post a Comment