Symon81
Newbie-
Posts
45 -
Joined
-
Last visited
Content Type
Profiles
Forums
Marketplace
Articles
FAQ
Our New
Store
Blogs
module__dplus_manager
Everything posted by Symon81
-
ERR_TOO_MANY_REDIRECTS только в Chrome
Symon81 replied to Symon81's topic in Opencart 2.x: General questions
сделал то что вы предложили и Запустите браузер Chrome на компьютере. Нажмите на значок с тремя точками в правом верхнем углу экрана Настройки. Внизу выберите Дополнительные. В разделе "Конфиденциальность и безопасность" нажмите Настройки контента. Выберите Файлы cookie Все файлы cookie и данные сайта. С помощью поисковой строки в правом верхнем углу экрана найдите нужный сайт. Справа от названия сайта нажмите на значок "Удалить" . не отбирает второй этап, то есть если перевязка - стерильность и так далее, если перчатки то материал и т.д. -
ERR_TOO_MANY_REDIRECTS только в Chrome
Symon81 replied to Symon81's topic in Opencart 2.x: General questions
попробуйте отобрать стерильность пожалуйста -
Уважаемые программисты, столкнулся с проблемой в гугл хром: Я установил базовый фильтр товаров в OpenCart © 2009-2019 Version 2.3.0.2 и немного изменил его в общем то вот сайт и получается если я отбираю по производителю все хорошо, но если я отбираю по атрибутам или фильтрам пишет ошибку ERR_TOO_MANY_REDIRECTS очистите куки Сначала я так и сделал по инструкции гугл хром. И почитал информацию на сайтах. 301 перенаправлял на 302 и назад. Но ошибка не проходит. Главное что в интернет эксплоуре и firefox все нормально, проблема только chrome. Кто знает подскажите пожалуйста в чем может быть проблема, может кто то сталкивался с такой же ситуацией.
-
в общем мысль я уловил и все починил, всем спасибо!
-
да спасибо версия opencart 2.3.0.2 пользуюсь vqmod но данный вариант не помог, кнопка осталась, убрались только все красивые иконки и стили на данной странице, а при замене контролер product.php вылазиет ошибка 500
-
я не пойму, я вижу его в /var/www/html/system/storage/modification/catalog/view/theme/default/template/product.tpl а /var/www/html/catalog/view/theme/default/template/product.tpl его нету, как так? куда исчезло 2 строки? куда он сохраняет, в самом модуле написано, что он заменит /var/www/html/catalog/view/theme/default/template/product.tpl строки, но в этом файле таких строк просто нету. Какая то мистика
-
vqmod я его скопировал туда и он появился в модификациях
-
vqmod я его скопировал туда и он появился в модификациях
-
в общем нашел когда то бесплатный модуль buy now - для теста поставил в vqnod все супер работало, 2 кнопки - купить заказать, а теперь удалить не могу и разработчик молчит( я его по советам форума удалил, почистил кэш, но кнопка все на том же месте только без функционала теперь (( ссылка на оф сайт с модулем
-
спасибо
-
всю таблицу надо залить другим цветом, не могу найти где, получается он хочет bootstrap.css, а в том файле ничего нету( через stylesheet.css тоже не краситься( помогите плиз
-
Здравствуйте подскажите, как изменить цвет элемента на него указывает стрелка на скриншоте
-
Цена вопроса?
-
Спасибо большое Я прошел по пунктам 1. Да у меня уже был такой модуль 2. Настройки правильные, везде где HTTPS добавлена буква s к http:// => https:// в админском везде добавлена 3. Да - пункт SSL включен в админке магазина 4. Странно, но факт, проверил сервер через https://www.sslshopper.com/ - показывает, что все отлично работает 5. Поддержка хостинга это я 6. Почему же не работает сие? Вроде все правильно настроено...
-
Здравствуйте уважаемые форумчане! Столкнулся с проблемой, переход с http:// на https:// Тоесть при https://мой_домен.ру работает, а при https://www.мой_домен.ру выдает ошибку 500 Так же появилась проблема с ЧПУ и SEO PRO - включаешь ЧПУ и больше нет страниц после главной, отключаешь все работает, но страницы с id и ииндексами уже не первый форум читаю, переделывал .htaccess много раз, но все тщетно: в домене стоят записи @ A XXXXXX www A XXXXXX В апаче выставил AllowOverride - чтобы читался .htaccess Может кто в курсе как и что поправить, напишите мне пожалуйста Вот сам файл .htaccess AllowOverride All Options +FollowSymlinks #Options +SymLinksIfOwnerMatch # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Require all denied </FilesMatch> # SEO URL Settings RewriteEngine on RewriteBase / RewriteCond %{HTTP:PORT} !^443$ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R] RewriteCond %{HTTP_HOST} ^www.fixmed\.ru$ [NC] RewriteRule ^(.*)$ https://fixmed.ru/$1 [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ExpiresActive On ExpiresDefault "access plus 1 hour" AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
-
http://fixmed.ru мой тестовый сайт Не понимаю, через какое то время зайти сразу не могу -раньше такого не было, на серваке посмотрел настройки питания, ухода в сон, поставил в биосе S1, сделал blank -0, в общем режима ожидания вроде недолжно быть. Может в самом опенкарте что? Верия опенкарта 2.3 Кто может сталкивался? подскажите что может быть?
-
Версия Опенкарт 2.3.2 Подскажите пожалуйста, поставил связку модулей - "Нет в наличии" и "Под заказ" Получил проблему в карточке товара появилась дополнительная кнопка - Под заказ, которую я не могу найти как переименовать и как ее сделать с условием if else Сейчас я выложу чего я хочу добиться. Это файл из /system/storage/modification/catalog/view/theme/default/template/product/product.tpl в нем есть все ссылки, дальше еще я выложу файл из /catalog/view/theme/default/template/product/product.tpl (оригинал) и в конце /system/storage/modification/catalog/view/theme/default/template/product/product.tpl (оригинал) Пометка места в 1 файле <!-- Чтобы заработал этот кусок кода --> в остальных 2-х файлах <!-- Купить в 1 клик --> Выложил все файлы, вдруг чего будет не хватать. Кто разбирается помогите пожалуйста. <?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; ?>"><?php echo $content_top; ?> <div class="row"> <?php if ($column_left || $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } else { ?> <?php $class = 'col-sm-8'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <?php if ($thumb || $images) { ?> <ul class= <?php if ($prod_quant>0) echo "'thumbnails'"; else echo "'thumbnails'"; ?> > <?php if ($thumb) { ?> <li><a class="thumbnail" href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <?php if ($images) { ?> <?php foreach ($images as $image) { ?> <li class="image-additional"><a class="thumbnail" href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>"> <img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <?php } ?> </ul> <?php } ?> <ul class="nav nav-tabs"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-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 } ?> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="table table-bordered"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><strong><?php echo $attribute_group['name']; ?></strong></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 class="form-horizontal" id="form-review"> <div id="review"></div> <h2><?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="<?php echo $customer_name; ?>" id="input-name" class="form-control" /> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label" for="input-review"><?php echo $entry_review; ?></label> <textarea name="text" rows="5" id="input-review" class="form-control"></textarea> <div class="help-block"><?php echo $text_note; ?></div> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <?php echo $entry_bad; ?> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <?php echo $entry_good; ?></div> </div> <?php echo $captcha; ?> <div class="buttons clearfix"> <div class="pull-right"> <button type="button" id="button-review" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary"><?php echo $button_continue; ?></button> </div> </div> <?php } else { ?> <?php echo $text_login; ?> <?php } ?> </form> </div> <?php } ?> </div> </div> <?php if ($column_left || $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } else { ?> <?php $class = 'col-sm-4'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <div class="btn-group"><!--желание / сравнение наверху--> <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i></button> <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fa fa-exchange"></i></button> </div> <h1><?php echo $heading_title; ?></h1> <ul class="list-unstyled"> <?php if ($manufacturer) { ?> <li><?php echo $text_manufacturer; ?> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a></li> <?php } ?> <li><?php echo $text_model; ?> <?php echo $model; ?></li> <?php if ($reward) { ?> <li><?php echo $text_reward; ?> <?php echo $reward; ?></li> <?php } ?> <li><?php echo $text_stock; ?> <?php echo $stock; ?></li> </ul> <?php if ($price) { ?> <ul class="list-unstyled"> <?php if (!$special) { ?> <li> <h2><?php echo $price; ?></h2> </li> <?php } else { ?> <li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li> <li> <h2><?php echo $special; ?></h2> </li> <?php } ?> <?php if ($tax) { ?> <li><?php echo $text_tax; ?> <?php echo $tax; ?></li> <?php } ?> <?php if ($points) { ?> <li><?php echo $text_points; ?> <?php echo $points; ?></li> <?php } ?> <?php if ($discounts) { ?> <li> <hr> </li> <?php foreach ($discounts as $discount) { ?> <li><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></li> <?php } ?> <?php } ?> </ul> <?php } ?> <div id="product"> <?php if ($options) { ?> <hr> <h3><?php echo $text_option; ?></h3> <?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 if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php } ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label"><?php echo $option['name']; ?></label> <div id="input-option<?php echo $option['product_option_id']; ?>"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="checkbox"> <label> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" /> <?php if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php } ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> </div> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <textarea name="option[<?php echo $option['product_option_id']; ?>]" rows="5" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control"><?php echo $option['value']; ?></textarea> </div> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label"><?php echo $option['name']; ?></label> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-default btn-block"><i class="fa fa-upload"></i> <?php echo $button_upload; ?></button> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" id="input-option<?php echo $option['product_option_id']; ?>" /> </div> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group date"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="YYYY-MM-DD" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group datetime"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="YYYY-MM-DD HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group time"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php } ?> <?php } ?> <?php if ($recurrings) { ?> <hr> <h3><?php echo $text_payment_recurring; ?></h3> <div class="form-group required"> <select name="recurring_id" class="form-control"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($recurrings as $recurring) { ?> <option value="<?php echo $recurring['recurring_id']; ?>"><?php echo $recurring['name']; ?></option> <?php } ?> </select> <div class="help-block" id="recurring-description"></div> </div> <?php } ?> <div class="form-group"> <label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label> <div class="input-group-btn"> <button class="minus"> - </button> <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="5" id="input-quantity" class="form-control" /> <button class="plus"> + </button> </div> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <br /> <a class="btn btn-primary btn-lg btn-block" data-pdqo-item="<?php echo $product_id; ?>" onclick="pdqoObject(this);" />Быстрый заказ</a> <?php if ($prod_quant>0) echo "<button type='button' id='button-cart' data-loading-text='$text_loading' class='btn btn-primary btn-lg btn-block'>$button_cart</button>"; else echo "<button type='button' id='button-cart' data-loading-text='$text_loading' class='btn btn-primary btn-lg btn-block' disabled>$button_not</button>"; ?> <!-- Чтобы заработал этот кусок кода --> <?php if ($prod_quant>0) echo "<a class='btn btn-primary btn-lg btn-block' data-pdqo-item='$product_id' onclick='pdqoObject(this);' />Быстрый заказ</a>" else echo "<input type='button' value='Купить' id='buy-now' class='button btn btn-primary btn-lg btn-block' />"; ?> <!-- этот ---> <!-- купить в 1 клик--> </div> <?php if ($minimum > 1) { ?> <div class="alert alert-info"><i class="fa fa-info-circle"></i> <?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="rating"> <p> <?php for ($i = 1; $i <= 5; $i++) { ?> <?php if ($rating < $i) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } ?> <?php } ?> <a href="" onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;"><?php echo $reviews; ?></a> / <a href="" onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;"><?php echo $text_write; ?></a></p> <hr> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style" data-url="<?php echo $share; ?>"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_button_pinterest_pinit"></a> <a class="addthis_counter addthis_pill_style"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-515eeaf54693130e"></script> <!-- AddThis Button END --> </div> <?php } ?> </div> </div> <?php if ($products) { ?> <h3><?php echo $text_related; ?></h3> <div class="row"> <?php $i = 0; ?> <?php foreach ($products as $product) { ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-xs-8 col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-xs-6 col-md-4'; ?> <?php } else { ?> <?php $class = 'col-xs-6 col-sm-3'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <div class="product-thumb transition"> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div> <div class="caption"> <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4> <p><?php echo $product['description']; ?></p> <?php if ($product['rating']) { ?> <div class="rating"> <?php for ($j = 1; $j <= 5; $j++) { ?> <?php if ($product['rating'] < $j) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($product['price']) { ?> <p class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </p> <?php } ?> </div> <div class="button-group"> <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span> <i class="fa fa-shopping-cart"></i></button><!--рекомендуемые товары кнопка купить--> <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button> <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button> </div> </div> </div> <?php if (($column_left && $column_right) && (($i+1) % 2 == 0)) { ?> <div class="clearfix visible-md visible-sm"></div> <?php } elseif (($column_left || $column_right) && (($i+1) % 3 == 0)) { ?> <div class="clearfix visible-md"></div> <?php } elseif (($i+1) % 4 == 0) { ?> <div class="clearfix visible-md"></div> <?php } ?> <?php $i++; ?> <?php } ?> </div> <?php } ?> <?php if ($tags) { ?> <p><?php echo $text_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 } ?> </p> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> </div> <script type="text/javascript"><!-- $('select[name=\'recurring_id\'], input[name="quantity"]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=\'product_id\'], input[name=\'quantity\'], select[name=\'recurring_id\']'), dataType: 'json', beforeSend: function() { $('#recurring-description').html(''); }, success: function(json) { $('.alert, .text-danger').remove(); if (json['success']) { $('#recurring-description').html(json['success']); } } }); }); //--></script> <script type="text/javascript"><!-- $('#button-cart').on('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'), dataType: 'json', beforeSend: function() { $('#button-cart').button('loading'); }, complete: function() { $('#button-cart').button('reset'); }, success: function(json) { $('.alert, .text-danger').remove(); $('.form-group').removeClass('has-error'); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } else { element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } } } if (json['error']['recurring']) { $('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>'); } // Highlight any found errors $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $('.breadcrumb').after('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart > ul').load('index.php?route=common/cart/info ul li'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); //--></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').val(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); } } }); }); $(document).ready(function() { $('.thumbnails').magnificPopup({ type:'image', delegate: 'a', gallery: { enabled:true } }); }); //--></script> <script>$(document).ready(function() { $('#buy-now').bind('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', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>'); } } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); window.location.href = 'index.php?route=checkout/cart'; } } }); }); });</script> <?php echo $footer; ?> /catalog/view/theme/default/template/product/product.tpl (оригинал) <?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; ?>"><?php echo $content_top; ?> <div class="row"> <?php if ($column_left || $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } else { ?> <?php $class = 'col-sm-8'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <?php if ($thumb || $images) { ?> <ul class="thumbnails"> <?php if ($thumb) { ?> <li><a class="thumbnail" href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <?php if ($images) { ?> <?php foreach ($images as $image) { ?> <li class="image-additional"><a class="thumbnail" href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>"> <img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <?php } ?> </ul> <?php } ?> <ul class="nav nav-tabs"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-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 } ?> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="table table-bordered"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><strong><?php echo $attribute_group['name']; ?></strong></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 class="form-horizontal" id="form-review"> <div id="review"></div> <h2><?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="<?php echo $customer_name; ?>" id="input-name" class="form-control" /> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label" for="input-review"><?php echo $entry_review; ?></label> <textarea name="text" rows="5" id="input-review" class="form-control"></textarea> <div class="help-block"><?php echo $text_note; ?></div> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <?php echo $entry_bad; ?> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <?php echo $entry_good; ?></div> </div> <?php echo $captcha; ?> <div class="buttons clearfix"> <div class="pull-right"> <button type="button" id="button-review" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary"><?php echo $button_continue; ?></button> </div> </div> <?php } else { ?> <?php echo $text_login; ?> <?php } ?> </form> </div> <?php } ?> </div> </div> <?php if ($column_left || $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } else { ?> <?php $class = 'col-sm-4'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <div class="btn-group"><!--желание / сравнение наверху--> <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i></button> <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fa fa-exchange"></i></button> </div> <h1><?php echo $heading_title; ?></h1> <ul class="list-unstyled"> <?php if ($manufacturer) { ?> <li><?php echo $text_manufacturer; ?> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a></li> <?php } ?> <li><?php echo $text_model; ?> <?php echo $model; ?></li> <?php if ($reward) { ?> <li><?php echo $text_reward; ?> <?php echo $reward; ?></li> <?php } ?> <li><?php echo $text_stock; ?> <?php echo $stock; ?></li> </ul> <?php if ($price) { ?> <ul class="list-unstyled"> <?php if (!$special) { ?> <li> <h2><?php echo $price; ?></h2> </li> <?php } else { ?> <li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li> <li> <h2><?php echo $special; ?></h2> </li> <?php } ?> <?php if ($tax) { ?> <li><?php echo $text_tax; ?> <?php echo $tax; ?></li> <?php } ?> <?php if ($points) { ?> <li><?php echo $text_points; ?> <?php echo $points; ?></li> <?php } ?> <?php if ($discounts) { ?> <li> <hr> </li> <?php foreach ($discounts as $discount) { ?> <li><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></li> <?php } ?> <?php } ?> </ul> <?php } ?> <div id="product"> <?php if ($options) { ?> <hr> <h3><?php echo $text_option; ?></h3> <?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 if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php } ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label"><?php echo $option['name']; ?></label> <div id="input-option<?php echo $option['product_option_id']; ?>"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="checkbox"> <label> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" /> <?php if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php } ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> </div> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <textarea name="option[<?php echo $option['product_option_id']; ?>]" rows="5" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control"><?php echo $option['value']; ?></textarea> </div> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label"><?php echo $option['name']; ?></label> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-default btn-block"><i class="fa fa-upload"></i> <?php echo $button_upload; ?></button> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" id="input-option<?php echo $option['product_option_id']; ?>" /> </div> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group date"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="YYYY-MM-DD" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group datetime"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="YYYY-MM-DD HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group time"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php } ?> <?php } ?> <?php if ($recurrings) { ?> <hr> <h3><?php echo $text_payment_recurring; ?></h3> <div class="form-group required"> <select name="recurring_id" class="form-control"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($recurrings as $recurring) { ?> <option value="<?php echo $recurring['recurring_id']; ?>"><?php echo $recurring['name']; ?></option> <?php } ?> </select> <div class="help-block" id="recurring-description"></div> </div> <?php } ?> <div class="form-group"> <label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label> <div class="input-group-btn"> <button class="minus"> - </button> <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="5" id="input-quantity" class="form-control" /> <button class="plus"> + </button> </div> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <br /> <button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button> <!-- купить в 1 клик--> </div> <?php if ($minimum > 1) { ?> <div class="alert alert-info"><i class="fa fa-info-circle"></i> <?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="rating"> <p> <?php for ($i = 1; $i <= 5; $i++) { ?> <?php if ($rating < $i) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } ?> <?php } ?> <a href="" onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;"><?php echo $reviews; ?></a> / <a href="" onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;"><?php echo $text_write; ?></a></p> <hr> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style" data-url="<?php echo $share; ?>"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_button_pinterest_pinit"></a> <a class="addthis_counter addthis_pill_style"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-515eeaf54693130e"></script> <!-- AddThis Button END --> </div> <?php } ?> </div> </div> <?php if ($products) { ?> <h3><?php echo $text_related; ?></h3> <div class="row"> <?php $i = 0; ?> <?php foreach ($products as $product) { ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-xs-8 col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-xs-6 col-md-4'; ?> <?php } else { ?> <?php $class = 'col-xs-6 col-sm-3'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <div class="product-thumb transition"> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div> <div class="caption"> <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4> <p><?php echo $product['description']; ?></p> <?php if ($product['rating']) { ?> <div class="rating"> <?php for ($j = 1; $j <= 5; $j++) { ?> <?php if ($product['rating'] < $j) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($product['price']) { ?> <p class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </p> <?php } ?> </div> <div class="button-group"> <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span> <i class="fa fa-shopping-cart"></i></button><!--рекомендуемые товары кнопка купить--> <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button> <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button> </div> </div> </div> <?php if (($column_left && $column_right) && (($i+1) % 2 == 0)) { ?> <div class="clearfix visible-md visible-sm"></div> <?php } elseif (($column_left || $column_right) && (($i+1) % 3 == 0)) { ?> <div class="clearfix visible-md"></div> <?php } elseif (($i+1) % 4 == 0) { ?> <div class="clearfix visible-md"></div> <?php } ?> <?php $i++; ?> <?php } ?> </div> <?php } ?> <?php if ($tags) { ?> <p><?php echo $text_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 } ?> </p> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> </div> <script type="text/javascript"><!-- $('select[name=\'recurring_id\'], input[name="quantity"]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=\'product_id\'], input[name=\'quantity\'], select[name=\'recurring_id\']'), dataType: 'json', beforeSend: function() { $('#recurring-description').html(''); }, success: function(json) { $('.alert, .text-danger').remove(); if (json['success']) { $('#recurring-description').html(json['success']); } } }); }); //--></script> <script type="text/javascript"><!-- $('#button-cart').on('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'), dataType: 'json', beforeSend: function() { $('#button-cart').button('loading'); }, complete: function() { $('#button-cart').button('reset'); }, success: function(json) { $('.alert, .text-danger').remove(); $('.form-group').removeClass('has-error'); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } else { element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } } } if (json['error']['recurring']) { $('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>'); } // Highlight any found errors $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $('.breadcrumb').after('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart > ul').load('index.php?route=common/cart/info ul li'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); //--></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').val(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); } } }); }); $(document).ready(function() { $('.thumbnails').magnificPopup({ type:'image', delegate: 'a', gallery: { enabled:true } }); }); //--></script> <?php echo $footer; ?> /system/storage/modification/catalog/view/theme/default/template/product/product.tpl (оригинал) <?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; ?>"><?php echo $content_top; ?> <div class="row"> <?php if ($column_left || $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } else { ?> <?php $class = 'col-sm-8'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <?php if ($thumb || $images) { ?> <ul class= <?php if ($prod_quant>0) echo "'thumbnails'"; else echo "'thumbnails'"; ?> > <?php if ($thumb) { ?> <li><a class="thumbnail" href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <?php if ($images) { ?> <?php foreach ($images as $image) { ?> <li class="image-additional"><a class="thumbnail" href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>"> <img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></li> <?php } ?> <?php } ?> </ul> <?php } ?> <ul class="nav nav-tabs"> <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li> <?php if ($attribute_groups) { ?> <li><a href="#tab-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 } ?> </ul> <div class="tab-content"> <div class="tab-pane active" id="tab-description"><?php echo $description; ?></div> <?php if ($attribute_groups) { ?> <div class="tab-pane" id="tab-specification"> <table class="table table-bordered"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><strong><?php echo $attribute_group['name']; ?></strong></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 class="form-horizontal" id="form-review"> <div id="review"></div> <h2><?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="<?php echo $customer_name; ?>" id="input-name" class="form-control" /> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label" for="input-review"><?php echo $entry_review; ?></label> <textarea name="text" rows="5" id="input-review" class="form-control"></textarea> <div class="help-block"><?php echo $text_note; ?></div> </div> </div> <div class="form-group required"> <div class="col-sm-12"> <label class="control-label"><?php echo $entry_rating; ?></label> <?php echo $entry_bad; ?> <input type="radio" name="rating" value="1" /> <input type="radio" name="rating" value="2" /> <input type="radio" name="rating" value="3" /> <input type="radio" name="rating" value="4" /> <input type="radio" name="rating" value="5" /> <?php echo $entry_good; ?></div> </div> <?php echo $captcha; ?> <div class="buttons clearfix"> <div class="pull-right"> <button type="button" id="button-review" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary"><?php echo $button_continue; ?></button> </div> </div> <?php } else { ?> <?php echo $text_login; ?> <?php } ?> </form> </div> <?php } ?> </div> </div> <?php if ($column_left || $column_right) { ?> <?php $class = 'col-sm-6'; ?> <?php } else { ?> <?php $class = 'col-sm-4'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <div class="btn-group"><!--желание / сравнение наверху--> <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i></button> <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fa fa-exchange"></i></button> </div> <h1><?php echo $heading_title; ?></h1> <ul class="list-unstyled"> <?php if ($manufacturer) { ?> <li><?php echo $text_manufacturer; ?> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a></li> <?php } ?> <li><?php echo $text_model; ?> <?php echo $model; ?></li> <?php if ($reward) { ?> <li><?php echo $text_reward; ?> <?php echo $reward; ?></li> <?php } ?> <li><?php echo $text_stock; ?> <?php echo $stock; ?></li> </ul> <?php if ($price) { ?> <ul class="list-unstyled"> <?php if (!$special) { ?> <li> <h2><?php echo $price; ?></h2> </li> <?php } else { ?> <li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li> <li> <h2><?php echo $special; ?></h2> </li> <?php } ?> <?php if ($tax) { ?> <li><?php echo $text_tax; ?> <?php echo $tax; ?></li> <?php } ?> <?php if ($points) { ?> <li><?php echo $text_points; ?> <?php echo $points; ?></li> <?php } ?> <?php if ($discounts) { ?> <li> <hr> </li> <?php foreach ($discounts as $discount) { ?> <li><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></li> <?php } ?> <?php } ?> </ul> <?php } ?> <div id="product"> <?php if ($options) { ?> <hr> <h3><?php echo $text_option; ?></h3> <?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 if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php } ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label"><?php echo $option['name']; ?></label> <div id="input-option<?php echo $option['product_option_id']; ?>"> <?php foreach ($option['product_option_value'] as $option_value) { ?> <div class="checkbox"> <label> <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" /> <?php if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php } ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> </label> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> </div> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <textarea name="option[<?php echo $option['product_option_id']; ?>]" rows="5" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control"><?php echo $option['value']; ?></textarea> </div> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label"><?php echo $option['name']; ?></label> <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-default btn-block"><i class="fa fa-upload"></i> <?php echo $button_upload; ?></button> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" id="input-option<?php echo $option['product_option_id']; ?>" /> </div> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group date"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="YYYY-MM-DD" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group datetime"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="YYYY-MM-DD HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>"> <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label> <div class="input-group time"> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-date-format="HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" /> <span class="input-group-btn"> <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button> </span></div> </div> <?php } ?> <?php } ?> <?php } ?> <?php if ($recurrings) { ?> <hr> <h3><?php echo $text_payment_recurring; ?></h3> <div class="form-group required"> <select name="recurring_id" class="form-control"> <option value=""><?php echo $text_select; ?></option> <?php foreach ($recurrings as $recurring) { ?> <option value="<?php echo $recurring['recurring_id']; ?>"><?php echo $recurring['name']; ?></option> <?php } ?> </select> <div class="help-block" id="recurring-description"></div> </div> <?php } ?> <div class="form-group"> <label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label> <div class="input-group-btn"> <button class="minus"> - </button> <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="5" id="input-quantity" class="form-control" /> <button class="plus"> + </button> </div> <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" /> <br /> <a class="btn btn-primary btn-lg btn-block" data-pdqo-item="<?php echo $product_id; ?>" onclick="pdqoObject(this);" />Быстрый заказ</a> <?php if ($prod_quant>0) echo "<button type='button' id='button-cart' data-loading-text='$text_loading' class='btn btn-primary btn-lg btn-block'>$button_cart</button>"; else echo "<button type='button' id='button-cart' data-loading-text='$text_loading' class='btn btn-primary btn-lg btn-block' disabled>$button_not</button>"; ?> <input type="button" value="Купить" id="buy-now" class="button btn btn-primary btn-lg btn-block" /> <!-- купить в 1 клик--> </div> <?php if ($minimum > 1) { ?> <div class="alert alert-info"><i class="fa fa-info-circle"></i> <?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($review_status) { ?> <div class="rating"> <p> <?php for ($i = 1; $i <= 5; $i++) { ?> <?php if ($rating < $i) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } ?> <?php } ?> <a href="" onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;"><?php echo $reviews; ?></a> / <a href="" onclick="$('a[href=\'#tab-review\']').trigger('click'); return false;"><?php echo $text_write; ?></a></p> <hr> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style" data-url="<?php echo $share; ?>"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_button_pinterest_pinit"></a> <a class="addthis_counter addthis_pill_style"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-515eeaf54693130e"></script> <!-- AddThis Button END --> </div> <?php } ?> </div> </div> <?php if ($products) { ?> <h3><?php echo $text_related; ?></h3> <div class="row"> <?php $i = 0; ?> <?php foreach ($products as $product) { ?> <?php if ($column_left && $column_right) { ?> <?php $class = 'col-xs-8 col-sm-6'; ?> <?php } elseif ($column_left || $column_right) { ?> <?php $class = 'col-xs-6 col-md-4'; ?> <?php } else { ?> <?php $class = 'col-xs-6 col-sm-3'; ?> <?php } ?> <div class="<?php echo $class; ?>"> <div class="product-thumb transition"> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div> <div class="caption"> <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4> <p><?php echo $product['description']; ?></p> <?php if ($product['rating']) { ?> <div class="rating"> <?php for ($j = 1; $j <= 5; $j++) { ?> <?php if ($product['rating'] < $j) { ?> <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } else { ?> <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> <?php } ?> <?php } ?> </div> <?php } ?> <?php if ($product['price']) { ?> <p class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </p> <?php } ?> </div> <div class="button-group"> <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span> <i class="fa fa-shopping-cart"></i></button><!--рекомендуемые товары кнопка купить--> <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button> <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button> </div> </div> </div> <?php if (($column_left && $column_right) && (($i+1) % 2 == 0)) { ?> <div class="clearfix visible-md visible-sm"></div> <?php } elseif (($column_left || $column_right) && (($i+1) % 3 == 0)) { ?> <div class="clearfix visible-md"></div> <?php } elseif (($i+1) % 4 == 0) { ?> <div class="clearfix visible-md"></div> <?php } ?> <?php $i++; ?> <?php } ?> </div> <?php } ?> <?php if ($tags) { ?> <p><?php echo $text_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 } ?> </p> <?php } ?> <?php echo $content_bottom; ?></div> <?php echo $column_right; ?></div> </div> <script type="text/javascript"><!-- $('select[name=\'recurring_id\'], input[name="quantity"]').change(function(){ $.ajax({ url: 'index.php?route=product/product/getRecurringDescription', type: 'post', data: $('input[name=\'product_id\'], input[name=\'quantity\'], select[name=\'recurring_id\']'), dataType: 'json', beforeSend: function() { $('#recurring-description').html(''); }, success: function(json) { $('.alert, .text-danger').remove(); if (json['success']) { $('#recurring-description').html(json['success']); } } }); }); //--></script> <script type="text/javascript"><!-- $('#button-cart').on('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'), dataType: 'json', beforeSend: function() { $('#button-cart').button('loading'); }, complete: function() { $('#button-cart').button('reset'); }, success: function(json) { $('.alert, .text-danger').remove(); $('.form-group').removeClass('has-error'); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { element.parent().after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } else { element.after('<div class="text-danger">' + json['error']['option'][i] + '</div>'); } } } if (json['error']['recurring']) { $('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>'); } // Highlight any found errors $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $('.breadcrumb').after('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); $('html, body').animate({ scrollTop: 0 }, 'slow'); $('#cart > ul').load('index.php?route=common/cart/info ul li'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); //--></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').val(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); } } }); }); $(document).ready(function() { $('.thumbnails').magnificPopup({ type:'image', delegate: 'a', gallery: { enabled:true } }); }); //--></script> <script>$(document).ready(function() { $('#buy-now').bind('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', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>'); } } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); window.location.href = 'index.php?route=checkout/cart'; } } }); }); });</script> <?php echo $footer; ?>
-
Как исправить первую страницу сайта
Symon81 replied to Symon81's topic in Opencart 2.x: General questions
))) ну я только с апреля в веб залез, мало чего понимаю, хотел у асов поинтересоваться. Да после кеша вроде стало все работать. Спасибо. -
Чет я как ни настраиваю .htaccess он мне то с www то без отключает значки когда я первый раз попадаю на сайт, как можно исправить чтобы в обоих случаях значки присутствовали. # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +SymLinksIfOwnerMatch # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Require all denied ## For apache 2.2 and older, replace "Require all denied" with these two lines : # Order deny,allow # Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.medskom\.ru$ [NC] RewriteRule ^(.*)$ http://medskom.ru/$1 [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none
-
Вывод имени залогиневшегося пользователя
Symon81 replied to Symon81's topic in Opencart 2.x: General questions
не это грубо, тут можно из коробки все сделать проще, но все равно спасибо большое! -
Вывод имени залогиневшегося пользователя
Symon81 replied to Symon81's topic in Opencart 2.x: General questions
блин, ребят, я все сделал сам -
Здравствуйте, у меня опенкарт 2.0.3 в catalog\controller\common\header.php есть такая строка $data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', true), $this->customer->getFirstName(), $this->url->link('account/logout', '', true)); как я понимаю она в переменную $_['text_logged'] записывает имя и фамилию пользователя, а в catalog\controller\common\header.tpl <li class="dropdown"><a href="<?php echo $account; ?>" title="<?php echo $text_account; ?>" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_account; ?></span> <span class="caret"></span></a> их выводить должна, тоесть надо изменить только catalog\language\ru-ru\common\header.php данный языковой файл я пишу в нем после $_['text_logged'] = 'Вы вошли как <a href="%s">%s</a> <b>(</b> <a href="%s">Выйти</a> <b>)</b>'; и он не выводит ни имени ни фамилии, помогите разобраться
-
Вот это радио кнопка, но onclick на ней не меняет кол-во товара <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" /> <?php if ($option_value['image']) { ?> <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> а вот полоска с + и - <button class="minus">-</button> <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="0" id="input-quantity" class="form-control" /> <button class="plus">+</button> хочет чтобы страница перегружалась