Prorab337 Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Есть бесплатный модуль Live Price Update.Устанавливаю по инструкии, только один пункт при действии в админке через установку расширений заливаю файл xml следующего содержания. <?xml version="1.0" encoding="UTF-8" ?> - <modification> <name>Live Price Update</name> <version>1.0</version> <code>live_price_update</code> <author>OpenCart FACTORY</author> <link>http://www.ocfactory.net</link> - <file path="catalog/view/theme/*/template/product/product.tpl"> - <operation> - <search index="0"> - <![CDATA[ <?php echo $price; ?> ]]> </search> - <add position="replace"> - <![CDATA[ <span id="price_old"><?php echo $price; ?></span> ]]> </add> </operation> - <operation> - <search> - <![CDATA[ <span style="text-decoration: line-through;"><?php echo $price; ?></span> ]]> </search> - <add position="replace"> - <![CDATA[ <span id="price_old" style="text-decoration: line-through;"><?php echo $price; ?></span> ]]> </add> </operation> - <operation> - <search> - <![CDATA[ <?php echo $special; ?> ]]> </search> - <add position="replace"> - <![CDATA[ <span id="price_special"><?php echo $special; ?></span> ]]> </add> </operation> - <operation> - <search> - <![CDATA[ <?php echo $tax; ?> ]]> </search> - <add position="replace"> - <![CDATA[ <span id="price_tax"><?php echo $tax; ?></span> ]]> </add> </operation> - <operation> - <search> - <![CDATA[ <?php echo $footer; ?> ]]> </search> - <add position="before"> - <![CDATA[ <script type="text/javascript" src="index.php?route=product/livepriceupdate/js&product_id=<?php echo $product_id; ?>"></script> ]]> </add> </operation> </file> </modification> Я так понимаю он должен замены сделать и модуль работать. Вот только замены не делаются ни в стандартной теме ни в купленной. Как вручную исправить? Надіслати Поділитися на інших сайтах More sharing options... Tom Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Этот модуль бесплатный? http://ocfactory.net/extensions/live-price-update Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Да, он бесплатный. http://www.opencart.com/index.php?route=extension/extension/info&extension_id=21664 Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Классный модуль только чет не работает. Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Я так понимаю он должен замены сделать и модуль работать.А вы чистите кеш(1) и делаете рефреш(2)? Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Да все делаю. Просто шаблон не стандартный там поиск в хмл не совпадает. Надо вручную. Принцип понял только вот не совсем получаеться.Вот мой продукт <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Попробуйте вот так <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span id="price_special" class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span id="price_old" class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span id="price_old" itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span id="price_old" class="price-old"><?php echo $price; ?></span> <span id="price_special" class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <span id="price_tax"><?php echo $tax; ?></span></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <script type="text/javascript" src="index.php?route=product/livepriceupdate/js&product_id=<?php echo $product_id; ?>"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Спасибо, заработало. И опции меняют цену и количество. С количество только если вписать число и клацнуть мышкой по пустому месту то меняет, а у меня кнопки -/+ вот они не срабатывают на изменение цены.Ну всеравно большое спасибо, как поставить + в репутацию? Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Никак, благодарности достаточно. Надіслати Поділитися на інших сайтах More sharing options... Створіть аккаунт або увійдіть для коментування Ви повинні бути користувачем, щоб залишити коментар Створити обліковий запис Зареєструйтеся для отримання облікового запису. Це просто! Зареєструвати аккаунт Вхід Уже зареєстровані? Увійдіть тут. Вхід зараз Share More sharing options... Передплатники 0 Перейти до списку тем Зараз на сторінці 0 користувачів Ні користувачів, які переглядиють цю сторінку Последние темы Последние дополнения Последние новости Вся активність Головна Підтримка та відповіді на запитання. Допомога програмістам та розробникам [Решено] Помогите разобраться с xml файлом [Live Price Update.] Покупцям Оплата розширень фізичними особами Оплата розширень юридичними особами Політика повернень Розробникам Регламент розміщення розширень Регламент продажу та підтримки розширень Віртуальний обліковий запис автора Політика просування оголошень API каталогу розширень Вирішення спорів щодо авторських прав Корисна інформація Публічна оферта Політика повернень Політика конфіденційності Платіжна політика Політика передачі особистих даних Політика прозорості Останні розширення PRICE MASTER - Модуль імпорту/експорту товарів, парсинг, переклад, генерація текстів, редактор каталогу та багато іншого Автор: ScriptBrains 1.0 Синхронізація Замовлень Rozetka.ua та Opencart Автор: sinco Product Manipulator Автор: Hiperlynx007 Видалення дублікатів товарів для OpenCart Автор: Hatshypsut Вибір категорій і виробників для "Знайшли дешевше" шаблону Upstore Автор: Flint2000 × Уже зареєстровані? Ввійти Реєстрація Ваші замовлення Назад Придбані модулі та шаблони Ваші рахунки Лист очікувань Альтернативні контакти Форум Новини ocStore Назад Офіційний сайт Демо ocStore 3.0.3.2 Демо ocStore 2.3.0.2.4 Завантажити ocStore Документація Історія версій ocStore Блоги Модулі Шаблони Назад Безкоштовні шаблони Платні шаблони Де купувати модулі? Послуги FAQ OpenCart.Pro Назад Демо Купити Порівняння × Створити... Important Information На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність. Я даю згоду
Tom Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Этот модуль бесплатный? http://ocfactory.net/extensions/live-price-update Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Да, он бесплатный. http://www.opencart.com/index.php?route=extension/extension/info&extension_id=21664 Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Классный модуль только чет не работает. Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Я так понимаю он должен замены сделать и модуль работать.А вы чистите кеш(1) и делаете рефреш(2)? Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Да все делаю. Просто шаблон не стандартный там поиск в хмл не совпадает. Надо вручную. Принцип понял только вот не совсем получаеться.Вот мой продукт <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Попробуйте вот так <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span id="price_special" class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span id="price_old" class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span id="price_old" itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span id="price_old" class="price-old"><?php echo $price; ?></span> <span id="price_special" class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <span id="price_tax"><?php echo $tax; ?></span></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <script type="text/javascript" src="index.php?route=product/livepriceupdate/js&product_id=<?php echo $product_id; ?>"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Спасибо, заработало. И опции меняют цену и количество. С количество только если вписать число и клацнуть мышкой по пустому месту то меняет, а у меня кнопки -/+ вот они не срабатывают на изменение цены.Ну всеравно большое спасибо, как поставить + в репутацию? Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Никак, благодарности достаточно. Надіслати Поділитися на інших сайтах More sharing options... Створіть аккаунт або увійдіть для коментування Ви повинні бути користувачем, щоб залишити коментар Створити обліковий запис Зареєструйтеся для отримання облікового запису. Це просто! Зареєструвати аккаунт Вхід Уже зареєстровані? Увійдіть тут. Вхід зараз Share More sharing options... Передплатники 0 Перейти до списку тем Зараз на сторінці 0 користувачів Ні користувачів, які переглядиють цю сторінку Последние темы Последние дополнения Последние новости Вся активність Головна Підтримка та відповіді на запитання. Допомога програмістам та розробникам [Решено] Помогите разобраться с xml файлом [Live Price Update.] Покупцям Оплата розширень фізичними особами Оплата розширень юридичними особами Політика повернень Розробникам Регламент розміщення розширень Регламент продажу та підтримки розширень Віртуальний обліковий запис автора Політика просування оголошень API каталогу розширень Вирішення спорів щодо авторських прав Корисна інформація Публічна оферта Політика повернень Політика конфіденційності Платіжна політика Політика передачі особистих даних Політика прозорості Останні розширення PRICE MASTER - Модуль імпорту/експорту товарів, парсинг, переклад, генерація текстів, редактор каталогу та багато іншого Автор: ScriptBrains 1.0 Синхронізація Замовлень Rozetka.ua та Opencart Автор: sinco Product Manipulator Автор: Hiperlynx007 Видалення дублікатів товарів для OpenCart Автор: Hatshypsut Вибір категорій і виробників для "Знайшли дешевше" шаблону Upstore Автор: Flint2000
destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Да, он бесплатный. http://www.opencart.com/index.php?route=extension/extension/info&extension_id=21664 Надіслати Поділитися на інших сайтах More sharing options...
Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Классный модуль только чет не работает. Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Я так понимаю он должен замены сделать и модуль работать.А вы чистите кеш(1) и делаете рефреш(2)? Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Да все делаю. Просто шаблон не стандартный там поиск в хмл не совпадает. Надо вручную. Принцип понял только вот не совсем получаеться.Вот мой продукт <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Попробуйте вот так <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span id="price_special" class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span id="price_old" class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span id="price_old" itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span id="price_old" class="price-old"><?php echo $price; ?></span> <span id="price_special" class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <span id="price_tax"><?php echo $tax; ?></span></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <script type="text/javascript" src="index.php?route=product/livepriceupdate/js&product_id=<?php echo $product_id; ?>"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Спасибо, заработало. И опции меняют цену и количество. С количество только если вписать число и клацнуть мышкой по пустому месту то меняет, а у меня кнопки -/+ вот они не срабатывают на изменение цены.Ну всеравно большое спасибо, как поставить + в репутацию? Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Никак, благодарности достаточно. Надіслати Поділитися на інших сайтах More sharing options... Створіть аккаунт або увійдіть для коментування Ви повинні бути користувачем, щоб залишити коментар Створити обліковий запис Зареєструйтеся для отримання облікового запису. Це просто! Зареєструвати аккаунт Вхід Уже зареєстровані? Увійдіть тут. Вхід зараз Share More sharing options... Передплатники 0 Перейти до списку тем Зараз на сторінці 0 користувачів Ні користувачів, які переглядиють цю сторінку Последние темы Последние дополнения Последние новости Вся активність Головна Підтримка та відповіді на запитання. Допомога програмістам та розробникам [Решено] Помогите разобраться с xml файлом [Live Price Update.]
destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Я так понимаю он должен замены сделать и модуль работать.А вы чистите кеш(1) и делаете рефреш(2)? Надіслати Поділитися на інших сайтах More sharing options...
Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Да все делаю. Просто шаблон не стандартный там поиск в хмл не совпадает. Надо вручную. Принцип понял только вот не совсем получаеться.Вот мой продукт <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Попробуйте вот так <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span id="price_special" class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span id="price_old" class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span id="price_old" itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span id="price_old" class="price-old"><?php echo $price; ?></span> <span id="price_special" class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <span id="price_tax"><?php echo $tax; ?></span></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <script type="text/javascript" src="index.php?route=product/livepriceupdate/js&product_id=<?php echo $product_id; ?>"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options... Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Спасибо, заработало. И опции меняют цену и количество. С количество только если вписать число и клацнуть мышкой по пустому месту то меняет, а у меня кнопки -/+ вот они не срабатывают на изменение цены.Ну всеравно большое спасибо, как поставить + в репутацию? Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Никак, благодарности достаточно. Надіслати Поділитися на інших сайтах More sharing options... Створіть аккаунт або увійдіть для коментування Ви повинні бути користувачем, щоб залишити коментар Створити обліковий запис Зареєструйтеся для отримання облікового запису. Це просто! Зареєструвати аккаунт Вхід Уже зареєстровані? Увійдіть тут. Вхід зараз Share More sharing options... Передплатники 0 Перейти до списку тем Зараз на сторінці 0 користувачів Ні користувачів, які переглядиють цю сторінку
destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Попробуйте вот так <?php echo $header; ?> <div class="container"> <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="row"><?php echo $column_left; ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-sm-9'; ?> <?php } else { ?> <?php $class = 'col-sm-12'; ?> <?php } ?> <div id="content" class="<?php echo $class; ?> product" itemscope itemtype="http://data-vocabulary.org/Product"> <?php echo $content_top; ?> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="left"> <?php if ($thumb) { ?> <div class="image"> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom" style="cursor:move" rel="position:'inside', showTitle: false" id='zoom1'><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <!-- zoom link--> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" id="zoom-btn" class="colorbox" rel="colorbox"><i class="fa fa-search-plus"></i></a> <?php } else { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img itemprop="image" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> <?php } ?> <?php if ($cosyone_percentage_sale_badge == 'enabled') { ?> <?php if (!$special) { ?> <?php } else { ?> <div class="sale_badge">-<?php echo $sales_percantage_main; ?>%</div> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional" style="width:<?php echo $thumb_width; ?>px; height:<?php echo $additional_height; ?>px"> <ul class="image_carousel"> <!-- Additional images --> <?php foreach ($images as $image) { ?> <li> <?php if ($cosyone_product_zoom) { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } else { ?> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['thumb']; ?>'"> <?php } ?> <img src="<?php echo $image['small']; ?>" title="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <!-- Show even the main image among the additional if --> <?php if ($cosyone_product_zoom) { ?> <li><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery colorbox" rel="useZoom: 'zoom1', smallImage: '<?php echo $thumb; ?>'"><img src="<?php echo $small; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" width="<?php echo $additional_width; ?>" height="<?php echo $additional_height; ?>"/></a></li> <?php } ?> </ul> </div> <?php } ?> <?php if($cosyone_product_share == 'image'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <!-- AddThis Button END --> <?php } ?> </div> <?php } ?> <div class="right" style="margin-left:<?php echo $thumb_width; ?>px"> <!-- NextPrevLinks--> <h1 itemprop="name"><?php echo $heading_title; ?></h1> <?php if ($review_status) { ?> <div class="review"> <span class="rating r<?php echo $rating; ?>"> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </span> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a> <a class="to_review" onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a> </div> <?php if ($count_reviews > 0) { ?><!-- Rich snippet start --> <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> <span itemprop="rating" content="<?php echo $rating; ?>"></span><span itemprop="count" content="<?php echo $reviews; ?>"></span> </div> <?php } ?><!-- Rich snippet end --> <?php } ?> <div class="description"> <?php if ($manufacturer) { ?> <span class="contrast_font"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /> <?php } ?> <span class="contrast_font"><?php echo $text_model; ?></span> <?php echo $model; ?><br /> <?php if ($reward) { ?> <span class="contrast_font"><?php echo $text_reward; ?></span> <?php echo $reward; ?><br /> <?php } ?> <span class="contrast_font" itemprop="availability" content="<?php if ($data_qty > 0) {echo "in_stock"; } else {echo "out_of_stock"; } ?>"><?php echo $text_stock; ?></span> <?php echo $stock; ?> </div> <!-- .description ends --> <?php if ($price) { ?> <meta itemprop="currency" content="<?php echo $currency_code; ?>" /> <span itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer"><!-- Rich snippets start --> <?php if (($special) && ($cosyone_product_yousave)) { ?> <div class="extended_offer"> <div class="price-new"><?php echo $text_special_price; ?><span id="price_special" class="amount contrast_font" itemprop="price"><?php echo $special; ?></span></div> <div class="price-old"><?php echo $text_old_price; ?><span id="price_old" class="amount contrast_font"><?php echo $price; ?></span></div> <div class="price-save"><?php echo $text_you_save; ?><span class="amount contrast_font"><?php echo $yousave; ?></span> </div> </div> <?php } ?> <?php if (($special_date_end > 0) && ($cosyone_product_countdown)) { ?> <div class="contrast_font"><div class="offer"></div></div> <?php if ($cosyone_product_hurry) { ?> <div class="hurry"> <span class="items_left contrast_color"><?php echo $text_stock_quantity; ?></span> <span class="items_sold"><?php echo $text_items_sold; ?></span> </div> <?php } ?> <?php } ?> <?php } ?> <div id="product"> <?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 } ?> <?php if ($options) { ?> <div class="options contrast_font"> <h2><?php echo $text_option; ?></h2> <?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 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') { ?> <?php if($cosyone_image_options == 'thumbs'){ ?> <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 id="input-option<?php echo $option['product_option_id']; ?>" class="clean-option-image"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="single-option main_font" <?php if ($option_value['price']) { ?>data-tooltip="<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>"<?php } ?>> <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']; ?>" /><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name']; ?>" /></label> </div> <?php } ?> </div> </div> <?php } else { ?> <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']; ?>" /> <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 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 } ?> <?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><br /> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="button"><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 } ?> </div> <!-- .options ends --> <?php } ?> <div class="cart"> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <span id="price_old" itemprop="price"><?php echo $price; ?></span> <?php } else { ?> <?php if (!$cosyone_product_yousave) { ?> <span id="price_old" class="price-old"><?php echo $price; ?></span> <span id="price_special" class="price-new" itemprop="price"><?php echo $special; ?></span> <?php } ?> <?php } ?> </div> </span> <!-- rich snippet ends --> <?php } ?> <a class="quantity_button minus icon">-</a><input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="quantity" /><a class="quantity_button plus icon">+</a> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <button type="submit" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="button contrast"><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a> <a class="sq_icon compare" onclick="compare.add('<?php echo $product_id; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left main_compare"></i></a> </div> </div> <!-- Cart ends --> <?php if ($minimum > 1) { ?> <div class="minimum"><?php echo $text_minimum; ?></div> <?php } ?> <?php if ($price) { ?> <?php if ($points) { ?> <div class="reward"><?php echo $text_points; ?> <?php echo $points; ?></div> <?php } ?> <?php if ($discounts) { ?> <div class="discount"> <?php foreach ($discounts as $discount) { ?> <span><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></span> <?php } ?> </div> <?php } ?> <?php } ?> </div> <div class="share"> <?php if($cosyone_product_share == 'content'){ ?> <!-- AddThis Button START --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <!-- AddThis Button END --> <?php } ?> <?php if ($price) { ?> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <span id="price_tax"><?php echo $tax; ?></span></span><br /> <?php } ?> <?php } ?> </div> <!-- .share ends --> </div> <!-- product-info-right END --> </div> <!-- product-info END --> <ul class="nav nav-tabs product-page"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-specification" 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 class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?> <?php if ($tags) { ?> <div class="tags"> <?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 } ?> </div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="attribute"> <?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> <td><?php echo $attribute['name']; ?></td> <td><?php echo $attribute['text']; ?></td> </tr> <?php } ?> </tbody> <?php } ?> </table> </div> <?php } ?> <?php if ($review_status) { ?> <div class="tab-pane" id="tab-review"> <form id="form-review" class="form-horizontal"> <div id="review"></div> <div class="write_review contrast_font"> <h2 id="review-title"><?php echo $text_write; ?></h2> <?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" id="input-review" rows="8" style="width: 100%;"></textarea> <small><?php echo $text_note; ?></small> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <span class="main_font"><?php echo $entry_bad; ?></span> <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" /> <span class="main_font"><?php echo $entry_good; ?></span> </div> </div> <div class="form-group"> <div class="col-sm-6"> <?php if ($site_key) { ?> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php } ?> </div> <div class="col-sm-6"><a id="button-review" class="button pull-right"><?php echo $button_continue; ?></a></div> </div> </div> <?php } else { ?> <div class="alert alert-info main_font"><?php echo $text_login; ?></div> <?php } ?> </form> </div> <?php } ?> <?php if ($product_tabs_5) { ?> <?php foreach($product_tabs_5 as $product_tab_5) { ?> <div class="tab-pane" id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>"> <?php echo $product_tab_5['text']; ?> </div> <?php } ?> <?php } ?> </div> <?php if ($products) { ?> <div class="box products"> <div class="box-heading products"><?php echo $text_related; ?></div> <div class="<?php echo $cosyone_grid_related; ?>"> <div class="grid_holder"> <div class="product-grid carousel related"> <?php foreach ($products as $product) { ?> <div class="item contrast_font"> <div class="image"> <?php if ($product['special'] && $cosyone_percentage_sale_badge == 'enabled') { ?> <div class="sale_badge">-<?php echo $product['sales_percantage']; ?>%</div> <?php } ?> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <?php if ($cosyone_text_ql) { ?> <div class="main_quicklook"> <a href="<?php echo $product['quickview']; ?>" class="button quickview"><i class="fa fa-eye"></i> <?php echo $cosyone_text_ql; ?></a> </div> <?php } ?> </div><!-- image ends --> <div class="information_wrapper"> <div class="left"> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <?php if ($product['brand_name'] && $cosyone_brand) { ?> <span class="brand main_font"><?php echo $product['brand_name']; ?></span> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><span class="rating r<?php echo $product['rating']; ?>"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div> <?php } ?> </div> <?php if ($product['price']) { ?> <div 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 } ?> </div> <?php } ?> <div class="cart"> <button type="submit" class="button contrast" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" ><i class="fa fa-shopping-cart"></i> <?php echo $button_cart; ?></button> </div> <div class="icons_wrapper"> <a class="sq_icon" onclick="wishlist.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_wishlist; ?>"><i class="fa fa-heart"></i></a><a class="sq_icon compare" onclick="compare.add('<?php echo $product['product_id']; ?>');" data-tooltip="<?php echo $button_compare; ?>"><i class="fa fa-arrow-right"></i><i class="fa fa-arrow-left"></i></a> <?php if ($cosyone_text_ql) { ?> <a href="<?php echo $product['quickview']; ?>" class="sq_icon qlook quickview" data-tooltip="<?php echo $cosyone_text_ql; ?>"><i class="fa fa-eye"></i></a> <?php } ?> <a class="sq_icon contrast add_to_cart" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" data-tooltip="<?php echo $button_cart; ?>"><i class="fa fa-shopping-cart"></i></a> <a class="plain_link wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');" ><?php echo $button_wishlist; ?></a> <a class="plain_link compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" ><?php echo $button_compare; ?></a> </div> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> <script type="text/javascript" src="catalog/view/theme/cosyone/js/cloud-zoom.1.0.2.min.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, maxWidth:'95%', rel:'gallery', opacity: 0.5 }); }); //--></script> <script type="text/javascript"> jQuery(function($) { //Product thumbnails $(".cloud-zoom-gallery").last().removeClass("cboxElement"); $(".cloud-zoom-gallery").click(function() { $("#zoom-btn").attr('href', $(this).attr('href')); $("#zoom-btn").attr('title', $(this).attr('title')); $(".cloud-zoom-gallery").each(function() { $(this).addClass("cboxElement"); }); $(this).removeClass("cboxElement"); }); }); </script> <script type="text/javascript"> $(document).ready(function() { var owlAdditionals = $('.image_carousel'); var wrapperWidth = $(".image-additional").width(); var itemWidth = (<?php echo $additional_width; ?> + 10); var itemcalc = Math.round(wrapperWidth / itemWidth); owlAdditionals.owlCarousel({ items : itemcalc, mouseDrag: true, responsive:false, pagination: false, navigation:true, slideSpeed:200, navigationText: [ "<div class='slide_arrow_prev add_img'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next add_img'><i class='fa fa-angle-right'></i></div>" ] }); }); </script> <script type="text/javascript"> $(document).ready(function() { var grid5 = 5; var grid4 = 4; var grid3 = 3; var owlRelated = $('.product-grid.related.carousel'); owlRelated.owlCarousel({ itemsCustom: [ [0, 1], [350, 2], [550, 3], [1025, <?php echo $cosyone_grid_related; ?>]], pagination: false, navigation:true, slideSpeed:500, scrollPerPage:false, navigationText: [ "<div class='slide_arrow_prev'><i class='fa fa-angle-left'></i></div>", "<div class='slide_arrow_next'><i class='fa fa-angle-right'></i></div>"] }); }); </script> <script type="text/javascript"> $('.quantity_button.plus').on('click', function(){ var oldVal = $('input.quantity').val(); var newVal = (parseInt($('input.quantity').val(),10) +1); $('input.quantity').val(newVal); }); $('.quantity_button.minus').on('click', function(){ var oldVal = $('input.quantity').val(); if (oldVal > 1) { var newVal = (parseInt($('input.quantity').val(),10) -1); } else { newVal = 1; } $('input.quantity').val(newVal); }); </script> <?php if ($special_date_end > 0) { ?> <script type="text/javascript" src="catalog/view/theme/cosyone/js/countdown/jquery.countdown.min.js"></script> <script type="text/javascript"> $('.offer').countdown({ until: <?php echo $special_date_end ?>, layout: '{desc}<i>{dn}</i> {dl} <i>{hn}</i> {hl} <i>{mn}</i> {ml} <i>{sn}</i> {sl}', description: '<span class="main_font"><?php echo $text_expire ?></span> ' }); </script> <?php } ?> <script type="text/javascript"> $(".to_review").click(function() { $('html, body').animate({ scrollTop: $("#tab-review").offset().top }, 1000); }); </script> <!-- Default scrips below --> <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']) { $('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart').load('index.php?route=common/cart/info #cart > *'); //Added } } }); }); //--></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').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '</div>'); } if (json['success']) { $('#review').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" src="//s7.addthis.com/js/300/addthis_widget.js"></script> <script type="text/javascript" src="index.php?route=product/livepriceupdate/js&product_id=<?php echo $product_id; ?>"></script> </div> <?php echo $footer; ?> Надіслати Поділитися на інших сайтах More sharing options...
Prorab337 Опубліковано: 24 квітня 2015 Автор Share Опубліковано: 24 квітня 2015 Спасибо, заработало. И опции меняют цену и количество. С количество только если вписать число и клацнуть мышкой по пустому месту то меняет, а у меня кнопки -/+ вот они не срабатывают на изменение цены.Ну всеравно большое спасибо, как поставить + в репутацию? Надіслати Поділитися на інших сайтах More sharing options... destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Никак, благодарности достаточно. Надіслати Поділитися на інших сайтах More sharing options... Створіть аккаунт або увійдіть для коментування Ви повинні бути користувачем, щоб залишити коментар Створити обліковий запис Зареєструйтеся для отримання облікового запису. Це просто! Зареєструвати аккаунт Вхід Уже зареєстровані? Увійдіть тут. Вхід зараз Share More sharing options... Передплатники 0
destreser Опубліковано: 24 квітня 2015 Share Опубліковано: 24 квітня 2015 Никак, благодарности достаточно. Надіслати Поділитися на інших сайтах More sharing options...
Recommended Posts