问题在于vq2-catalog_view_theme_clearshop_template_product_product 这个文件,需要修改里面的代码,将以下代码全部复制,在重新保存(注意,如果日后有人修改过vq2-catalog_view_theme_clearshop_template_product_product这个文件,将修改后,没问题的vq2-catalog_view_theme_clearshop_template_product_product重新写入到这个文件中)
<?php echo $header; ?>
<?php global $config; ?>
<div id=”maintop-container”>
<div class=”container”>
<?php echo $content_top; ?>
<ul class=”breadcrumb”>
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<li><a href=”<?php echo $breadcrumb[‘href’]; ?>”><?php echo $breadcrumb[‘text’]; ?></a></li>
<?php } ?>
</ul>
<div class=”prevnext <?php echo $config->get(‘clearshop_prevnext_mode’); ?>”>
<ul class=”pager”>
<?php if (isset($prev_url)) { ?>
<li class=”previous”>
<a href=”<?php echo $prev_url; ?>” title=”<?php echo $prev_title;?>” class=”tooltp”><i class=”fa fa-arrow-circle-left”></i><span class=”name”><?php echo $prev_title;?></span><span class=”dir”><?php echo $text_prev; ?></span></a>
</li>
<?php } ?>
<?php if (isset($next_url)) { ?>
<li class=”next”>
<a href=”<?php echo $next_url; ?>” title=”<?php echo $next_title;?>” class=”tooltp”><i class=”fa fa-arrow-circle-right”></i><span class=”name”><?php echo $next_title;?></span><span class=”dir”><?php echo $text_next; ?></span></a>
</li>
<?php } ?>
</ul>
</div>
<?php
$sbleft= $config->get(‘clearshop_sidebar_left_width’);
$sbright= $config->get(‘clearshop_sidebar_right_width’);
if ($column_left && $column_right) {
$main_width = 12 – $sbleft – $sbright;
$main = “middle sideleft “; }
else if ($column_left) {
$main_width = 12 – $sbleft;
$main =”sideleft “; }
else if ($column_right) {
$main_width = 12 – $sbright;
$main =”sideright “; }
else {
$main_width = 12; $main = “”; }
$main .= “col-sm-“.$main_width;
?>
<div id=”product” class=”row”>
<?php echo $column_left; ?>
<div id=”content” class=”product-page <?php echo $main; ?>” role=”main”>
<div class=”mainborder layout-<?php echo $config->get(‘clearshop_product_layout’); ?>”>
<?php switch ($config->get(‘clearshop_product_layout’)) {
case ‘1’:
if($column_left || $column_right) $spanval1 = 6; else $spanval1 = 7;
$spanval2 = 12; break;
case ‘2’: $spanval1 = 5; $spanval2 = 7; break;
case ‘3’: $spanval1 = 12; $spanval2 = 6; break;
default: break;
} ?>
<?php if ($config->get(‘clearshop_product_layout’) == 3) { ?>
<header class=”page-header full-width”>
<h1><?php echo $heading_title; ?></h1>
</header>
<?php } ?>
<div class=”row”>
<div class=”col-sm-<?php echo $spanval1; ?> leftcol”>
<?php if ($price && $special) { ?>
<div class=”onsale”><span><?php echo $text_onsale; ?></span></div>
<?php } ?>
<?php if ($thumb || $images) { ?>
<?php if ($thumb) { ?>
<div class=”image”>
<?php if($config->get(‘clearshop_cloud_zoom’) == 1) {
if($config->get(‘clearshop_zoom_autosize’) == 1) {
$zwidth = ‘auto’;
$zheight = ‘auto’;
} else {
$zwidth = $config->get(‘clearshop_zoom_width’);
$zheight = $config->get(‘clearshop_zoom_height’);
}
?>
<!– image zoom –>
<!– todo –>
<a href=”<?php echo $popup; ?>” title=”<?php echo $heading_title; ?>” class=”cloud-zoom tag2″ id=”image” rel=”adjustX: 10, adjustY:-4, tint:false,lensOpacity:0.2, zoomWidth:'<?php echo $zwidth ?>’, zoomHeight:'<?php echo $zheight; ?>’, position:'<?php echo $config->get(‘clearshop_zoom_position’); ?>’, showTitle:false”>
<img src=”<?php echo $thumb; ?>” id=”image” class=”tag1″ title=”<?php echo $heading_title; ?>” alt=”<?php echo $heading_title; ?>” />
</a>
<a href=”<?php echo $popup; ?>” id=”zoom-image” title=” <?php echo $heading_title; ?>” class=”magnificPopup expand” rel=”magnificPopup”><i class=”fa fa-expand”></i></a>
<?php } else { ?>
<a href=”<?php echo $popup; ?>” title=”<?php echo $heading_title; ?>” class=”magnificPopup” rel=”magnificPopup”><img src=”<?php echo $thumb; ?>” id=”image” title=”<?php echo $heading_title; ?>” alt=”<?php echo $heading_title; ?>” /><span id=”zoom-image” class=”expand”><i class=”fa fa-expand”></i></span></a>
<?php } ?>
</div>
<?php } ?>
<?php if ($images) { ?>
<div id=”sync2″ class=”owl-carousel image-additional”>
<?php if($config->get(‘clearshop_cloud_zoom’) == 1) { ?>
<div class=”item”><a href=”<?php echo $popup; ?>” title=”<?php echo $heading_title; ?>” class=”cloud-zoom-gallery” rel=”useZoom: ‘image’, smallImage: ‘<?php echo $thumb; ?>’ “><img src=”<?php echo $small; ?>” title=”<?php echo $heading_title; ?>” alt=”<?php echo $heading_title; ?>” /></a></div>
<?php } ?>
<?php foreach ($images as $image) { ?>
<?php if($config->get(‘clearshop_cloud_zoom’) == 1) { ?>
<div class=”item”><a href=”<?php echo $image[‘popup’]; ?>” title=”<?php echo $heading_title; ?>” class=”cloud-zoom-gallery” rel=”useZoom: ‘image’, smallImage: ‘<?php echo $image[‘thumb’]; ?>’ “><img src=”<?php echo $image[‘small’]; ?>” title=”<?php echo $heading_title; ?>” alt=”<?php echo $heading_title; ?>” /></a><a href=”<?php echo $image[‘popup’]; ?>” class=”magnificPopup” style=”display:none” rel=”magnificPopup”></a></div>
<?php } else {
if($image[‘small’]) { ?>
<div class=”item”><a href=”<?php echo $image[‘popup’]; ?>” title=”<?php echo $heading_title; ?>” class=”magnificPopup” rel=”magnificPopup”><img src=”<?php echo $image[‘small’]; ?>” title=”<?php echo $heading_title; ?>” alt=”<?php echo $heading_title; ?>” /></a></div>
<?php } else { ?>
<div class=”item”><a href=”<?php echo $image[‘popup’]; ?>” title=”<?php echo $heading_title; ?>” class=”magnificPopup” rel=”magnificPopup”><img src=”<?php echo $image[‘thumb’]; ?>” title=”<?php echo $heading_title; ?>” alt=”<?php echo $heading_title; ?>” /></a></div>
<?php } ?>
<?php } ?>
<?php } ?>
</div>
<script type=”text/javascript”>
$(document).ready(function() {
$(‘#sync2’).owlCarousel({
items : 5,
itemsDesktop : [1199,4],
itemsDesktopSmall : [979,3],
itemsTablet : [768,3],
itemsMobile : [479,3],
pagination:false,
navigation: true,
navigationText: [‘<i class=”fa fa-angle-left fa-5x”></i>’, ‘<i class=”fa fa-angle-right fa-5x”></i>’],
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(“.owl-item”).eq(0).addClass(“synced”);
}
});
});
</script>
<?php } ?>
<?php } ?>
</div> <!– .col-sm-6 LEFT BOX–>
<?php if ($config->get(‘clearshop_product_layout’) == 3) { ?>
</div>
<div class=”row”>
<?php } ?>
<div class=”col-sm-<?php echo 12-$spanval1; ?> rightcol”>
<?php if ($config->get(‘clearshop_product_layout’) != 3) { ?>
<header class=”page-header”>
<h1><?php echo $heading_title; ?></h1>
</header>
<div class=”share”>
<?php $url = urlencode($config->get(‘config_url’).”index.php?route=product/product&product_id=”.$product_id); ?>
<ul>
<li><a href=”//facebook.com/sharer.php?u=<?php echo $url; ?>” target=”_blank” title=”Facebook” class=”facebook” data-toggle=”tooltip”><i class=”fa fa-facebook”></i></a></li>
<li><a href=”https://twitter.com/share?url=<?php echo $url; ?>” target=”_blank” title=”Twitter” class=”twitter” data-toggle=”tooltip”><i class=”fa fa-twitter”></i></a></li>
<li><a href=”https://plus.google.com/share?url=<?php echo $url; ?>” target=”_blank” title=”Google +” class=”google-plus” data-toggle=”tooltip” onclick=”javascript:window.open(this.href,
”, ‘menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600’);return false;” ><i class=”fa fa-google-plus”></i></a></li>
<li><a href=”//pinterest.com/pin/create/button/?url=<?php echo $url; ?>&<?php if ($thumb) {?>media=<?php echo $thumb; ?>&<?php } ?>description=<?php echo strip_tags($heading_title); ?>” target=”_blank” title=”Pinterest” class=”pinterest” data-toggle=”tooltip”><i class=”fa fa-pinterest”></i></a></li>
<li><a href=”mailto:[email protected]?subject=<?php echo strip_tags($heading_title); ?>&body=<?php echo $config->get(‘config_url’); ?>index.php?route=product/product&product_id=<?php echo $product_id; ?>” class=”envelope” title=”<?php echo $text_email_friend; ?>” data-toggle=”tooltip”><i class=”fa fa-envelope”></i></a></li>
<li><a href=”<?php echo $config->get(‘config_url’); ?>index.php?route=product/product&product_id=<?php echo $product_id; ?>” class=”link” title=”<?php echo $text_get_link; ?>” data-toggle=”tooltip”><i class=”fa fa-link”></i></a></li>
</ul>
</div>
<?php } ?>
<div class=”row”>
<div class=”col-sm-<?php echo $spanval2; ?> detailscol”>
<?php if ($price) { ?>
<div class=”price”>
<?php if (!$special) { ?>
<span class=”price-normal”><?php echo $price; ?></span>
<?php } else { ?>
<span class=”price-old”><?php echo $price; ?></span> <span class=”price-new”><?php echo $special; ?></span>
<?php } ?>
<?php if ($tax) { ?>
<div class=”price-tax”><?php echo $text_tax; ?> <?php echo $tax; ?></div>
<?php } ?>
<?php if ($points) { ?>
<div class=”reward”><small><?php echo $text_points; ?> <?php echo $points; ?></small></div>
<?php } ?>
<?php if ($discounts) { ?>
<div class=”discount”>
<ul>
<?php foreach ($discounts as $discount) { ?>
<li><?php echo $discount[‘quantity’]; ?><?php echo $text_discount; ?><?php echo $discount[‘price’]; ?></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div> <!– .price –>
<?php } ?>
<div class=”stock”>
<?php if ($quantity <= 0) { ?>
<span class=”outstock”><i class=”fa fa-times”></i> <?php echo $stock; ?></span>
<?php } else { ?>
<span class=”instock”><i class=”fa fa-check”></i> <?php echo $stock; ?></span>
<?php } ?>
</div>
<div class=”description”>
<?php if ($manufacturer) { ?>
<span><?php echo $text_manufacturer; ?></span> <a href=”<?php echo $manufacturers; ?>”><?php echo $manufacturer; ?></a><br />
<?php } ?>
<span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
<?php if ($reward) { ?>
<span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
<?php } ?>
</div> <!– .description –>
<!– todo –>
<style type=”text/css”>
div[class=’radio’] label{
float: left;
}
div[class=’radio’] label img{
border-radius: 50%;
padding: 0px;
}
div[class=’radio’],div[class=’radio hoverimage’]{
margin: 0px!important;
float: left;
padding-bottom: 3px;
}
div[class=’radio’] #ty-image-label{
padding-left: 1px;
}
#ty-image-span{
display: inline-block;
float: left;
}
#ty-image-content{
clear: both;
}
div[class=’cart’]{
clear: both;
}
.ty-image-border-red{
border: 3px solid #FFF;
box-shadow: 0 0 8px rgba(0,0,0,0.45);
}
/*添加插件后的新样式*/
div[class=’radio hoverimage’] #ty-image-label{
padding-left: 1px;
border-radius: 50%;
}
div[class=’radio hoverimage’] label img{
border-radius: 50%;
padding: 0px;
margin: 0px;
}
</style>
<!– TODO –>
<script type=”text/javascript”>
// 点击图标选项后,该图标边框变色
$(function(){
$(‘.lyl-type-image-tubiao’).delegate(this,’click’,function(){
$(this).parent().parent().siblings().children().children(‘.lyl-type-image-tubiao’).removeClass(“ty-image-border-red”);
$(this).parent().parent().siblings().children().children(‘.lyl-type-image-tubiao’).addClass(“ty-image-border-ddd”);
$(this).addClass(“ty-image-border-red”);
});
});
</script>
<!– TOEND –>
<div>
<?php if ($options) { ?>
<hr>
<?php foreach ($options as $option) { ?>
<?php if ($option[‘type’] == ‘select’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label” for=”input-option<?php echo $option[‘product_option_id’]; ?>”><?php echo $option[‘name’]; ?></label>
<select name=”option[<?php echo $option[‘product_option_id’]; ?>]” id=”input-option<?php echo $option[‘product_option_id’]; ?>” class=”form-control”>
<option value=””><?php echo $text_select; ?></option>
<?php foreach ($option[‘product_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 class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label”><?php echo $option[‘name’]; ?></label>
<div id=”input-option<?php echo $option[‘product_option_id’]; ?>”>
<?php foreach ($option[‘product_option_value’] as $option_value) { ?>
<div class=”radio”>
<label>
<input type=”radio” name=”option[<?php echo $option[‘product_option_id’]; ?>]” 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>
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘checkbox’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label”><?php echo $option[‘name’]; ?></label>
<div id=”input-option<?php echo $option[‘product_option_id’]; ?>”>
<?php foreach ($option[‘product_option_value’] as $option_value) { ?>
<div class=”checkbox”>
<label>
<input type=”checkbox” name=”option[<?php echo $option[‘product_option_id’]; ?>][]” value=”<?php echo $option_value[‘product_option_value_id’]; ?>” />
<?php if ($option_value[‘image’]) { ?>
<img src=”<?php echo $option_value[‘image’]; ?>” alt=”<?php echo $option_value[‘name’] . ($option_value[‘price’] ? ‘ ‘ . $option_value[‘price_prefix’] . $option_value[‘price’] : ”); ?>” class=”img-thumbnail” />
<?php } ?>
<?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>
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘image’) { ?>
<div id=”ty-image-content” class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label”><?php echo $option[‘name’]; ?></label>
<div id=”input-option<?php echo $option[‘product_option_id’]; ?>”>
<?php $tag=0; ?>
<?php foreach ($option[‘product_option_value’] as $option_value) { ?>
<?php $tag = $tag+1; ?>
<div class=”radio<?php echo $option_value[‘imagemedium’] ? ‘ hoverimage’ : ”; ?>” rel=”<?php echo $option_value[‘imagemedium’]; ?>!<?php echo $option_value[‘imagelarge’]; ?>”>
<!– <?php if ($option_value[‘image’]) { ?>
<img src=”<?php echo $option_value[‘image’]; ?>” alt=”<?php echo $option_value[‘name’]; ?>” />
<?php } ?> –>
<label id=”ty-image-label”>
<input type=”radio” style=”display: none;” name=”option[<?php echo $option[‘product_option_id’]; ?>]” value=”<?php echo $option_value[‘product_option_value_id’]; ?>” />
<img src=”<?php echo $option_value[‘image’]; ?>” alt=”<?php echo $option_value[‘name’] . ($option_value[‘price’] ? ‘ ‘ . $option_value[‘price_prefix’] . $option_value[‘price’] : ”); ?>” title=”<?php echo $option_value[‘name’] . ($option_value[‘price’] ? ‘ ‘ . $option_value[‘price_prefix’] . $option_value[‘price’] : ”); ?>” class=”img-thumbnail lyl-type-image-tubiao” />
<!– 图片描述 –>
<br/>
<!– <span id=”ty-image-span”>
<?php echo $option_value[‘name’]; ?>
</span> –>
<?php if ($option_value[‘price’]) { ?>
(<?php echo $option_value[‘price_prefix’]; ?><?php echo $option_value[‘price’]; ?>)
<?php } ?>
</label>
</div>
<?php if($tag/6 == 1){ ?>
<?php $tag = 0; ?>
<?php echo ‘<div style=”clear: both;”> </div>’; ?>
<?php } ?>
<?php } ?>
</div>
</div>
<script type=”text/javascript”>
// todo
$(function() {
$(‘.hoverimage’).click(
function() {
var newsrc = $(this).attr(‘rel’);
if (typeof newsrc !== ‘undefined’) {
var arr = newsrc.split(‘!’);
if(newsrc.indexOf(‘no_image’) > 0) {
// Do nothing
} else {
if (arr[0] != ”) {
// $(‘#image’).attr(‘src’, arr[0]);
// $(‘#image’).parent().attr(‘href’, arr[1]);
$(‘.tag1’).attr(‘src’, arr[0]);
$(‘.tag2’).attr(‘href’, arr[1]);
$(‘#zoom-image’).attr(‘href’, arr[1]);
$(‘.cloud-zoom, .cloud-zoom-gallery’).CloudZoom();
//$(‘#zoom1’).attr(‘href’, arr[1]); // For CloudZoom
//$(‘#zoom1’).CloudZoom(); // For CloudZoom
//var ez = $(‘#image’).data(‘elevateZoom’); // For Elevate Zoom
//ez.swaptheimage(arr[0], arr[1]); // For Elevate Zoom
}
}
}
}
);
});
</script>
<?php } ?>
<!– toend –>
<?php if ($option[‘type’] == ‘text’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label” for=”input-option<?php echo $option[‘product_option_id’]; ?>”><?php echo $option[‘name’]; ?></label>
<input type=”text” name=”option[<?php echo $option[‘product_option_id’]; ?>]” value=”<?php echo $option[‘value’]; ?>” placeholder=”<?php echo $option[‘name’]; ?>” id=”input-option<?php echo $option[‘product_option_id’]; ?>” class=”form-control” />
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘textarea’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label” for=”input-option<?php echo $option[‘product_option_id’]; ?>”><?php echo $option[‘name’]; ?></label>
<textarea name=”option[<?php echo $option[‘product_option_id’]; ?>]” rows=”5″ placeholder=”<?php echo $option[‘name’]; ?>” id=”input-option<?php echo $option[‘product_option_id’]; ?>” class=”form-control”><?php echo $option[‘value’]; ?></textarea>
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘file’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label”><?php echo $option[‘name’]; ?></label>
<button type=”button” id=”button-upload<?php echo $option[‘product_option_id’]; ?>” data-loading-text=”<?php echo $text_loading; ?>” class=”btn btn-default btn-block”><i class=”fa fa-upload”></i> <?php echo $button_upload; ?></button>
<input type=”hidden” name=”option[<?php echo $option[‘product_option_id’]; ?>]” value=”” id=”input-option<?php echo $option[‘product_option_id’]; ?>” />
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘date’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label” for=”input-option<?php echo $option[‘product_option_id’]; ?>”><?php echo $option[‘name’]; ?></label>
<div class=”input-group date”>
<input type=”text” name=”option[<?php echo $option[‘product_option_id’]; ?>]” value=”<?php echo $option[‘value’]; ?>” data-date-format=”YYYY-MM-DD” id=”input-option<?php echo $option[‘product_option_id’]; ?>” class=”form-control” />
<span class=”input-group-btn”>
<button class=”btn btn-default” type=”button”><i class=”fa fa-calendar”></i></button>
</span></div>
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘datetime’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label” for=”input-option<?php echo $option[‘product_option_id’]; ?>”><?php echo $option[‘name’]; ?></label>
<div class=”input-group datetime”>
<input type=”text” name=”option[<?php echo $option[‘product_option_id’]; ?>]” value=”<?php echo $option[‘value’]; ?>” data-date-format=”YYYY-MM-DD HH:mm” id=”input-option<?php echo $option[‘product_option_id’]; ?>” class=”form-control” />
<span class=”input-group-btn”>
<button type=”button” class=”btn btn-default”><i class=”fa fa-calendar”></i></button>
</span></div>
</div>
<?php } ?>
<?php if ($option[‘type’] == ‘time’) { ?>
<div class=”form-group<?php echo ($option[‘required’] ? ‘ required’ : ”); ?>”>
<label class=”control-label” for=”input-option<?php echo $option[‘product_option_id’]; ?>”><?php echo $option[‘name’]; ?></label>
<div class=”input-group time”>
<input type=”text” name=”option[<?php echo $option[‘product_option_id’]; ?>]” value=”<?php echo $option[‘value’]; ?>” data-date-format=”HH:mm” id=”input-option<?php echo $option[‘product_option_id’]; ?>” class=”form-control” />
<span class=”input-group-btn”>
<button type=”button” class=”btn btn-default”><i class=”fa fa-calendar”></i></button>
</span></div>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
<?php if ($config->get(‘clearshop_product_layout’) == 1) { ?>
<div class=”cart”>
<?php if ($recurrings) { ?>
<h3><?php echo $text_payment_recurring ?></h3>
<div class=”form-group required”>
<select name=”recurring_id” class=”form-control”>
<option value=””><?php echo $text_select; ?></option>
<?php foreach ($recurrings as $recurring) { ?>
<option value=”<?php echo $recurring[‘recurring_id’] ?>”><?php echo $recurring[‘name’] ?></option>
<?php } ?>
</select>
<div class=”help-block” id=”recurring-description”></div>
</div>
<?php } ?>
<div>
<div class=”input-qty”>
<div class=”qty-minus” onclick=”if ($(this).parent(‘.input-qty’).find(‘#qty-input’).val()>1) { $(this).parent(‘.input-qty’).find(‘#qty-input’).val(parseInt($(this).parent(‘.input-qty’).find(‘#qty-input’).val())-1); }”><i class=”fa fa-minus”></i></div>
<div class=”qty-input-div”>
<input id=”qty-input” type=”text” name=”quantity” value=”<?php echo $minimum; ?>” class=”form-control input-sm” />
</div>
<div class=”qty-plus” onclick=”$(this).parent(‘.input-qty’).find(‘#qty-input’).val(parseInt($(this).parent(‘.input-qty’).find(‘#qty-input’).val())+1);”><i class=”fa fa-plus”></i></div>
</div>
<input type=”hidden” name=”product_id” value=”<?php echo $product_id; ?>” />
<button type=”button” id=”button-cart” data-loading-text=”<?php echo $text_loading; ?>” class=”btn btn-primary btn-lg”><?php echo $button_cart; ?></button>
<?php if ($minimum > 1) { ?>
<small class=”minimum”><i class=”fa fa-info-circle”></i> <?php echo $text_minimum; ?></small>
<?php } ?>
</div>
</div> <!– .cart –>
<div class=”links”>
<button type=”button” class=”wishlist btn btn-default btn-sm” title=”<?php echo $button_wishlist; ?>” onclick=”wishlist.add(‘<?php echo $product_id; ?>’);”><i class=”fa fa-heart-o”></i> <?php echo $button_wishlist; ?></button>
<button type=”button” class=”compare btn btn-default btn-sm” title=”<?php echo $button_compare; ?>” onclick=”compare.add(‘<?php echo $product_id; ?>’);”><i class=”fa fa-exchange”></i> <?php echo $button_compare; ?></button>
</div> <!– .links –>
<?php if ($review_status) { ?>
<div class=”review”>
<?php for ($i = 1; $i <= 5; $i++) { ?>
<?php if ($rating < $i) { ?>
<span class=”fa fa-stack”><i class=”fa fa-star-o fa-stack-2x”></i></span>
<?php } else { ?>
<span class=”fa fa-stack”><i class=”fa fa-star fa-stack-2x”></i><i class=”fa fa-star-o fa-stack-1x”></i></span>
<?php } ?>
<?php } ?>
<a href=”” onclick=”$(‘a[href=\’#tab-review\’]’).trigger(‘click’); return false;”><?php echo $reviews; ?></a>
</div>
<?php } ?>
<?php } ?> <!– product layout –>
</div>
<?php if ($tags) { ?>
<div class=”tags”>
<b><?php echo $text_tags; ?></b>
<?php foreach ($tags as $tag) { ?>
<a href=”<?php echo $tag[‘href’]; ?>”><?php echo $tag[‘tag’]; ?></a>
<?php } ?>
</div>
<?php } ?>
</div>
<?php if ($config->get(‘clearshop_product_layout’) != 1) { ?>
<div class=”col-sm-<?php echo 12-$spanval2; ?> cartcol”>
<div class=”cart”>
<?php if ($recurrings) { ?>
<hr>
<h3><?php echo $text_payment_recurring ?></h3>
<div class=”form-group required”>
<select name=”recurring_id” class=”form-control”>
<option value=””><?php echo $text_select; ?></option>
<?php foreach ($recurrings as $recurring) { ?>
<option value=”<?php echo $recurring[‘recurring_id’] ?>”><?php echo $recurring[‘name’] ?></option>
<?php } ?>
</select>
<div class=”help-block” id=”recurring-description”></div>
</div>
<?php } ?>
<div>
<div class=”input-qty”>
<div class=”qty-minus” onclick=”if ($(this).parent(‘.input-qty’).find(‘#qty-input’).val()>1) { $(this).parent(‘.input-qty’).find(‘#qty-input’).val(parseInt($(this).parent(‘.input-qty’).find(‘#qty-input’).val())-1); }”><i class=”fa fa-minus”></i></div>
<div class=”qty-input-div”>
<input id=”qty-input” type=”text” name=”quantity” value=”<?php echo $minimum; ?>” class=”form-control input-sm” />
</div>
<div class=”qty-plus” onclick=”$(this).parent(‘.input-qty’).find(‘#qty-input’).val(parseInt($(this).parent(‘.input-qty’).find(‘#qty-input’).val())+1);”><i class=”fa fa-plus”></i></div>
</div>
<input type=”hidden” name=”product_id” value=”<?php echo $product_id; ?>” />
<button type=”button” id=”button-cart” data-loading-text=”<?php echo $text_loading; ?>” class=”btn btn-primary btn-lg”><?php echo $button_cart; ?></button>
<?php if ($minimum > 1) { ?>
<small class=”minimum”><?php echo $text_minimum; ?></small>
<?php } ?>
</div>
</div> <!– .cart –>
<div class=”links”>
<button type=”button” data-toggle=”tooltip” class=”wishlist btn btn-default btn-sm” title=”<?php echo $button_wishlist; ?>” onclick=”wishlist.add(‘<?php echo $product_id; ?>’);”><i class=”fa fa-heart-o”></i> <?php echo $button_wishlist; ?></button>
<button type=”button” data-toggle=”tooltip” class=”compare btn btn-default btn-sm” title=”<?php echo $button_compare; ?>” onclick=”compare.add(‘<?php echo $product_id; ?>’);”><i class=”fa fa-exchange”></i> <?php echo $button_compare; ?></button>
</div>
<?php if ($review_status) { ?>
<div class=”review”>
<?php for ($i = 1; $i <= 5; $i++) { ?>
<?php if ($rating < $i) { ?>
<span class=”fa fa-stack”><i class=”fa fa-star-o fa-stack-2x”></i></span>
<?php } else { ?>
<span class=”fa fa-stack”><i class=”fa fa-star fa-stack-2x”></i><i class=”fa fa-star-o fa-stack-1x”></i></span>
<?php } ?>
<?php } ?>
<a href=”” onclick=”$(‘a[href=\’#tab-review\’]’).trigger(‘click’); return false;”><?php echo $reviews; ?></a>
</div>
<?php } ?>
<div class=”share”>
<?php $url = urlencode($config->get(‘config_url’).”index.php?route=product/product&product_id=”.$product_id); ?>
<ul>
<li><a href=”//facebook.com/sharer.php?u=<?php echo $url; ?>” target=”_blank” title=”Facebook” class=”facebook” data-toggle=”tooltip”><i class=”fa fa-facebook”></i></a></li>
<li><a href=”https://twitter.com/share?url=<?php echo $url; ?>” target=”_blank” title=”Twitter” class=”twitter” data-toggle=”tooltip”><i class=”fa fa-twitter”></i></a></li>
<li><a href=”https://plus.google.com/share?url=<?php echo $url; ?>” target=”_blank” title=”Google +” class=”google-plus” data-toggle=”tooltip” onclick=”javascript:window.open(this.href,
”, ‘menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600’);return false;” ><i class=”fa fa-google-plus”></i></a></li>
<li><a href=”//pinterest.com/pin/create/button/?url=<?php echo $url; ?>&<?php if ($thumb) {?>media=<?php echo $thumb; ?>&<?php } ?>description=<?php echo strip_tags($heading_title); ?>” target=”_blank” title=”Pinterest” class=”pinterest” data-toggle=”tooltip”><i class=”fa fa-pinterest”></i></a></li>
<li><a href=”mailto:[email protected]?subject=<?php echo strip_tags($heading_title); ?>&body=<?php echo $config->get(‘config_url’); ?>index.php?route=product/product&product_id=<?php echo $product_id; ?>” class=”envelope” title=”<?php echo $text_email_friend; ?>” data-toggle=”tooltip”><i class=”fa fa-envelope”></i></a></li>
<li><a href=”<?php echo $config->get(‘config_url’); ?>index.php?route=product/product&product_id=<?php echo $product_id; ?>” class=”link” title=”<?php echo $text_get_link; ?>” data-toggle=”tooltip”><i class=”fa fa-link”></i></a></li>
</ul>
</div>
<?php if ($tags) { ?>
<div class=”tags”>
<b><?php echo $text_tags; ?></b>
<?php foreach ($tags as $tag) { ?>
<a href=”<?php echo $tag[‘href’]; ?>”><?php echo $tag[‘tag’]; ?></a>
<?php } ?>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div> <!– .span6 RIGHT BOX–>
</div>
</div>
</div>
<?php echo $column_right; ?>
</div> <!– .row –>
</div> <!– .container –>
</div> <!– #maintop-container –>
<div class=”product-details”>
<div class=”tabsbar”>
<div class=”container”>
<ul id=”tabs” class=”nav nav-tabs”>
<li class=”active”><a href=”#tab-description” data-toggle=”tab”><?php echo $tab_description; ?></a></li>
<?php if ($attribute_groups) { ?>
<li><a href=”#tab-attribute” data-toggle=”tab”><?php echo $tab_attribute; ?></a></li>
<?php } ?>
<?php if ($review_status) { ?>
<li><a href=”#tab-review” data-toggle=”tab”><?php echo $tab_review; ?></a></li>
<?php } ?>
<?php if ($product_tabs_5) { ?>
<?php foreach($product_tabs_5 as $product_tab_5) { ?>
<li><a href=”#tab-product-tab<?php echo $product_tab_5[‘tab_id’];?>” data-toggle=”tab”><?php echo $product_tab_5[‘name’]; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
<div class=”container”>
<div class=”tab-content”>
<div id=”tab-description” class=”tab-pane fade in active”><?php echo $description; ?></div> <!– #tab-description –>
<?php if ($attribute_groups) { ?>
<div id=”tab-attribute” class=”tab-pane fade”>
<div class=”product-atrributes”>
<table class=”table attribute table-striped”>
<?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) { ?>
<tr>
<th><?php echo $attribute[‘name’]; ?></th>
<td><?php echo $attribute[‘text’]; ?></td>
</tr>
<?php } ?>
</tbody>
<?php } ?>
</table>
</div>
</div> <!– #tab-attribute –>
<?php } ?>
<?php if ($review_status) { ?>
<div id=”tab-review” class=”tab-pane fade”>
<div class=”row”>
<div id=”review” class=”col-md-7 col-sm-6″></div>
<div id=”add-review” class=”col-md-5 col-sm-6″>
<h4 id=”review-title”><?php echo $text_write; ?></h4>
<form id=”form-review” class=”form”>
<?php if ($review_guest) { ?>
<div class=”form-group required”>
<div class=”col-sm-12″>
<label class=”control-label” for=”input-name”><?php echo $entry_name; ?></label>
<input type=”text” name=”name” value=”” id=”input-name” class=”form-control” />
</div>
</div>
<div class=”form-group required”>
<div class=”col-sm-12″>
<label class=”control-label” for=”input-review”><?php echo $entry_review; ?></label>
<textarea name=”text” rows=”5″ id=”input-review” class=”form-control”></textarea>
<div class=”help-block”><?php echo $text_note; ?></div>
</div>
</div>
<div class=”form-group required”>
<div class=”col-sm-12″>
<label class=”control-label”><?php echo $entry_rating; ?></label>
<?php echo $entry_bad; ?>
<input type=”radio” name=”rating” value=”1″ />
<input type=”radio” name=”rating” value=”2″ />
<input type=”radio” name=”rating” value=”3″ />
<input type=”radio” name=”rating” value=”4″ />
<input type=”radio” name=”rating” value=”5″ />
<?php echo $entry_good; ?>
</div>
</div>
<?php echo $captcha; ?>
<div class=”buttons”>
<button type=”button” id=”button-review” data-loading-text=”<?php echo $text_loading; ?>” class=”btn btn-primary”><?php echo $button_continue; ?></button>
</div>
<?php } else { ?>
<?php echo $text_login; ?>
<?php } ?>
</form> <!– #form-review –>
</div>
</div>
</div> <!– #tab-review –>
<?php } ?>
<?php if ($product_tabs_5) { ?>
<?php foreach($product_tabs_5 as $product_tab_5) { ?>
<div class=”tab-pane fade” id=”tab-product-tab<?php echo $product_tab_5[‘tab_id’];?>”>
<?php echo $product_tab_5[‘text’]; ?>
</div>
<?php } ?>
<?php } ?>
</div>
</div>
<div class=”container”>
<div class=”prevnext compact”>
<ul class=”pager”>
<?php if (isset($prev_url)) { ?>
<li class=”previous”>
<a href=”<?php echo $prev_url; ?>” title=”<?php echo $prev_title;?>” class=”tooltp”><i class=”fa fa-arrow-circle-left”></i><span class=”name”><?php echo $prev_title;?></span><span class=”dir”><?php echo $text_prev; ?></span></a>
</li>
<?php } ?>
<?php if (isset($next_url)) { ?>
<li class=”next”>
<a href=”<?php echo $next_url; ?>” title=”<?php echo $next_title;?>” class=”tooltp”><i class=”fa fa-arrow-circle-right”></i><span class=”name”><?php echo $next_title;?></span><span class=”dir”><?php echo $text_next; ?></span></a>
</li>
<?php } ?>
</ul>
</div>
</div>
</div>
<?php echo $content_bottom; ?>
<script type=”text/javascript”><!–
$(‘select[name=\’recurring_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=\’recurring_id\’]’),
dataType: ‘json’,
beforeSend: function() {
$(‘#recurring-description’).html(”);
},
success: function(json) {
$(‘.alert, .text-danger’).remove();
if (json[‘success’]) {
$(‘#recurring-description’).html(json[‘success’]);
}
}
});
});
//–></script>
<script type=”text/javascript”><!–
$(‘#button-cart’).on(‘click’, function() {
$.ajax({
url: ‘index.php?route=checkout/cart/add’,
type: ‘post’,
data: $(‘#product input[type=\’text\’], #product input[type=\’hidden\’], #product input[type=\’radio\’]:checked, #product input[type=\’checkbox\’]:checked, #product select, #product textarea’),
dataType: ‘json’,
beforeSend: function() {
$(‘#button-cart’).button(‘loading’);
},
complete: function() {
$(‘#button-cart’).button(‘reset’);
},
success: function(json) {
$(‘.alert, .text-danger’).remove();
$(‘.form-group’).removeClass(‘has-error’);
if (json[‘error’]) {
if (json[‘error’][‘option’]) {
for (i in json[‘error’][‘option’]) {
var element = $(‘#input-option’ + i.replace(‘_’, ‘-‘));
if (element.parent().hasClass(‘input-group’)) {
element.parent().after(‘<div class=”text-danger”>’ + json[‘error’][‘option’][i] + ‘</div>’);
} else {
element.after(‘<div class=”text-danger”>’ + json[‘error’][‘option’][i] + ‘</div>’);
}
}
}
if (json[‘error’][‘recurring’]) {
$(‘select[name=\’recurring_id\’]’).after(‘<div class=”text-danger”>’ + json[‘error’][‘recurring’] + ‘</div>’);
}
// Highlight any found errors
$(‘.text-danger’).parent().addClass(‘has-error’);
}
if (json[‘success’]) {
$(‘.breadcrumb’).after(‘<div class=”alert alert-success”>’ + json[‘success’] + ‘<button type=”button” class=”close” data-dismiss=”alert”>×</button></div>’);
$(‘.cart-heading > span’).html(json[‘total’]);
$(‘html, body’).animate({ scrollTop: 0 }, ‘slow’);
$(‘#cart > ul’).load(‘index.php?route=common/cart/info ul li’);
}
}
});
});
//–></script>
<script type=”text/javascript”><!–
$(‘.date’).datetimepicker({
pickTime: false
});
$(‘.datetime’).datetimepicker({
pickDate: true,
pickTime: true
});
$(‘.time’).datetimepicker({
pickDate: false
});
$(‘button[id^=\’button-upload\’]’).on(‘click’, function() {
var node = this;
$(‘#form-upload’).remove();
$(‘body’).prepend(‘<form enctype=”multipart/form-data” id=”form-upload” style=”display: none;”><input type=”file” name=”file” /></form>’);
$(‘#form-upload input[name=\’file\’]’).trigger(‘click’);
if (typeof timer != ‘undefined’) {
clearInterval(timer);
}
timer = setInterval(function() {
if ($(‘#form-upload input[name=\’file\’]’).val() != ”) {
clearInterval(timer);
$.ajax({
url: ‘index.php?route=tool/upload’,
type: ‘post’,
dataType: ‘json’,
data: new FormData($(‘#form-upload’)[0]),
cache: false,
contentType: false,
processData: false,
beforeSend: function() {
$(node).button(‘loading’);
},
complete: function() {
$(node).button(‘reset’);
},
success: function(json) {
$(‘.text-danger’).remove();
if (json[‘error’]) {
$(node).parent().find(‘input’).after(‘<div class=”text-danger”>’ + json[‘error’] + ‘</div>’);
}
if (json[‘success’]) {
alert(json[‘success’]);
$(node).parent().find(‘input’).attr(‘value’, json[‘code’]);
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + “\r\n” + xhr.statusText + “\r\n” + xhr.responseText);
}
});
}
}, 500);
});
//–></script>
<script type=”text/javascript”><!–
$(‘#review’).delegate(‘.pagination a’, ‘click’, function(e) {
e.preventDefault();
$(‘#review’).fadeOut(‘slow’);
$(‘#review’).load(this.href);
$(‘#review’).fadeIn(‘slow’);
});
$(‘#review’).load(‘index.php?route=product/product/review&product_id=<?php echo $product_id; ?>’);
$(‘#button-review’).on(‘click’, function() {
$.ajax({
url: ‘index.php?route=product/product/write&product_id=<?php echo $product_id; ?>’,
type: ‘post’,
dataType: ‘json’,
data: $(“#form-review”).serialize(),
beforeSend: function() {
$(‘#button-review’).button(‘loading’);
},
complete: function() {
$(‘#button-review’).button(‘reset’);
},
success: function(json) {
$(‘.alert-success, .alert-danger’).remove();
if (json[‘error’]) {
$(‘#review-title’).after(‘<div class=”alert alert-danger”><i class=”fa fa-exclamation-circle”></i> ‘ + json[‘error’] + ‘</div>’);
}
if (json[‘success’]) {
$(‘#review-title’).after(‘<div class=”alert alert-success”><i class=”fa fa-check-circle”></i> ‘ + json[‘success’] + ‘</div>’);
$(‘input[name=\’name\’]’).val(”);
$(‘textarea[name=\’text\’]’).val(”);
$(‘input[name=\’rating\’]:checked’).prop(‘checked’, false);
}
}
});
});
//–></script>
<script type=”text/javascript”><!–
$(document).ready(function() {
$(“a[rel^=’magnificPopup’]”).magnificPopup({
type:’image’,
gallery:{
enabled:true
}
});
});
//–></script>
<script type=”text/javascript”><!–
$(document).ready(function() {
$(‘.cloud-zoom, .cloud-zoom-gallery’).CloudZoom();
});
//–></script>
<?php echo $footer; ?>
Comments