Opencart 1.5.6.4 (шаблон нестандартный) Дело в том, что покупатели ленивые, читать не любят и лишние движения для них не нужны. Я над ценой товара сделала надпись красным цветом минимальное количество для заказа, а они все равно не видят ничего. Как реализовать такую возможность, чтобы в поле "Количество" сразу устанавливалась цифра минимального количества для заказа? Или же хотя бы всплывало окно с предупреждением при нажатии на меньшее количество для заказа, а то у меня по умолчанию в одном товаре стоит 6, покупатель выбирая 1 шт. нажимает на "Купить" и просто затемняется полностью экран темно-серым, т.е. никаких надписей и никаких уведомлений нет. Покупатель такое точно не поймет
В catalog/view/theme/ВАША_ТЕМА/template/product/product.tpl найдите input[name="quantity"] и в значении укажите value="<?php echo $minimum; ?>". Это все, что можно посоветовать при имеющихся данных. Для подробностей покажите код файла product.tpl
Код: <?php $this->load->model('catalog/product'); $this->data['modules'] = array(); if (isset($this->request->post['stylemod_module'])) { $this->data['modules'] = $this->request->post['stylemod_module']; } elseif ($this->config->get('stylemod_module')) { $this->data['modules'] = $this->config->get('stylemod_module'); } $this->document->addStyle('catalog/view/theme/3dtemplates/js/jquery/colorbox/colorbox.css'); $limit_days_new_product = 31; $limit_viewed_popular_product = 50; $timestamp = time(); $date_time_array = getdate($timestamp); $hours = $date_time_array['hours']; $minutes = $date_time_array['minutes']; $seconds = $date_time_array['seconds']; $month = $date_time_array['mon']; $day = $date_time_array['mday']; $year = $date_time_array['year']; foreach ($this->data['modules'] as $module) { IF (isset($module['kolvo_prosmotr_product_popular_stikers'])) {$limit_viewed_popular_product = $module['kolvo_prosmotr_product_popular_stikers'];} } foreach ($this->data['modules'] as $module) { IF (isset($module['kolvo_dney_product_new_stikers'])) {$limit_days_new_product = $module['kolvo_dney_product_new_stikers'];} } $resul = $this->model_catalog_product->getProduct($product_id); $timestamp = mktime($hours, $minutes, $seconds, $month,$day - $limit_days_new_product, $year); If ($resul['price']!=0) {$priceecho=round((($resul['price'] - $resul['special'])/$resul['price'])*100, 0);} else {$priceecho='';} if ((float)$resul['special']) {if ($resul['price'] > 0) {$sale = ' ' . '-' .$priceecho. ' % ' . ' ';} else {$sale = false;}} else {$sale = false;} if (($resul['date_available']) > strftime('%Y-%m-%d',$timestamp)) {$new = '<div class="stiker-new-product"></div>';} else {$new = false;} if (($resul['viewed']) > ($limit_viewed_popular_product)) {$popular = '<div class="stiker-popular-product"></div>';} else {$popular = false;} $this->load->model('tool/image'); if ($resul['image']) { $thumb1 = $this->model_tool_image->resize($resul['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')); } else { $thumb1 = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')); } $ress = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($ress as $res) { $imags[] = array( 'popup' => $this->model_tool_image->resize($res['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')), 'thumb' => $this->model_tool_image->resize($res['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')), 'thumb_zoom' => $this->model_tool_image->resize($res['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')) ); } ?> <?php $showzoom="1"; $display_new_stickers='1'; $display_popular_stickers='1'; $display_special_stickers='1'; ?> <?php $module_row = 0; ?> <?php foreach ($this->data['modules'] as $module) { ?> <?php IF (isset($module['zoom_setting_product'])) {if ($module['zoom_setting_product'] == '1') {$showzoom='1';} } ?> <?php IF (isset($module['zoom_setting_product'])) {if ($module['zoom_setting_product'] == '0') {$showzoom='0';} } ?> <?php IF (isset($module['new_stikers_product'])) {if ($module['new_stikers_product'] == '1') {$display_new_stickers="1";} } ?> <?php IF (isset($module['new_stikers_product'])) {if ($module['new_stikers_product'] == '0') {$display_new_stickers="0";} } ?> <?php IF (isset($module['special_stikers_product'])) {if ($module['special_stikers_product'] == '1') {$display_special_stickers="1";} } ?> <?php IF (isset($module['special_stikers_product'])) {if ($module['special_stikers_product'] == '0') {$display_special_stickers="0";} } ?> <?php IF (isset($module['popular_stikers_product'])) {if ($module['popular_stikers_product'] == '1') {$display_popular_stickers="1";} } ?> <?php IF (isset($module['popular_stikers_product'])) {if ($module['popular_stikers_product'] == '0') {$display_popular_stickers="0";} } ?> <?php } ?> <?php echo $header; ?><?php echo $column_left; ?><!--<div class="your-class">--><?php echo $column_right; ?><!--</div>--> <div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $i=> $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><?php if($i+1<count($breadcrumbs)) { ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } else { ?><?php echo $breadcrumb['text']; ?><?php } ?> <?php } ?> </div> <div class="share"> <!-- AddThis Button BEGIN --> <div class="share42init" data-image="<?php echo $thumb; ?>"></div> <script type="text/javascript" src="catalog/view/javascript/jquery/share42/share42.js"></script> <!-- AddThis Button END --> </div> <div class="product-info"> <?php if ($thumb || $images) { ?> <div class="content_h1"><h1><?php echo $heading_title; ?></h1></div> <div class="left"> <?php if ($thumb) { ?> <?php if ($showzoom=="1") { ?> <?php foreach ($images as $image) { ?> <div class="view-images"> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a> </div> <?php } ?> <div class="view-images"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class = "colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div> <?php } ?> <div class="image"> <?php if ($showzoom=="1") { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class = 'cloud-zoom' id='zoom1' rel="position: 'inside' ,showTitle:false, adjustX:0, adjustY:0"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a> <?php if ($display_special_stickers=="1") {echo $sale;} ?><?php if ($display_new_stickers=="1") {echo $new;} ?><?php if ($display_popular_stickers=="1") { echo $popular;} ?> <?php } ?> <?php if ($showzoom=="0") { ?> <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class = "cloud-zoom" ><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a> <?php if ($display_special_stickers=="1") {echo $sale;} ?><?php if ($display_new_stickers=="1") {echo $new;} ?><?php if ($display_popular_stickers=="1") { echo $popular;} ?> <?php } ?> </div> <?php } ?> <?php if ($images) { ?> <div class="image-additional"> <a href="#" class="zoom_additional" data-image="<?php echo $popup; ?>" data-zoom-image="<?php echo $popup; ?>" /> <div id="carousel-p"> <ul class="jcarousel-skin-opencart"> <?php foreach ($images as $image) { ?> <li> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom-gallery" rel="useZoom: 'zoom1', smallImage: '<?php echo $image['popup']; ?>' "><img src="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> </li> <?php } ?> </ul> </div> </div> </div> <?php } ?> <div class="right"> <div class="description"> <div class="dostavka_info n_inf" ><p style="color: #DD5371; font-size: 14px; font-weight: bold; margin-bottom: 1px; margin-left: 0px;margin-right: 0px; text-align: center">Бесплатная доставка от 2700 ₽ или по курсу к рублю</p></div> <span style="font-family:Calibri;font-size: 1.2em;">ДОСТАВКА:</span> почтой в регион <a id="" style="font size=+0.3; font-weight: bold;color:#3933c7"> <?php echo $city_name ?></a> - <a id="shipping_cost_on_product_page" style="font size=+0.4; font-weight: bold;color:#3933c7"><?php echo $shipping_cost ?></a><br /> <?php if ($manufacturer) { ?><span style="font-family:Calibri;font-size: 1.2em;"><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br /><?php } ?> <span style="font-family:Calibri;font-size: 1.2em;"><?php echo $text_model; ?></span><a style="font-size: 12px;"> <?php echo $model; ?></a><br /> <span style="font-family:Calibri;font-size: 1.2em;">АРТИКУЛ:</span><a style="font-size: 12px;"> <?php echo $sku; ?></a><br /> <?php if ($minimum > 1) { ?><span style="font-family:Calibri;font-size: 1.2em;">ПРИМЕЧАНИЕ:</span><a style="font-size: 12px!important;"> <?php echo $text_minimum; ?></a><br /><?php } ?> <?php if ($reward) { ?><span style="font-family:Calibri;font-size: 1.2em;"><?php echo $text_reward; ?></span><a style="font-size: 12px;"> <?php echo $reward; ?></a><br /><?php } ?> <?php if ($ean) { ?><span style="font-family:Calibri;font-size: 1.2em;"><?php echo $text_ean; ?></span><a style="font-size: 12px;"> <?php echo $ean; ?></a><br /><?php } ?> <?php if ($ean) { ?><span style="font-family:Calibri;font-size: 1.2em;"><?php echo $text_upc; ?></span><a style="font-size: 12px;"> <?php echo $upc; ?></a><br /><?php } ?> <span style="font-family:Calibri;font-size: 1.2em;"><?php echo $text_stock; ?></span><a style="font-size: 12px;"> <?php echo $stock; ?></a><br /> <?php if ($review_status) { ?> <div class="review"> <div> <span style="font-family:Calibri;font-size: 1.2em;">ОТЗЫВОВ:</span><?php echo $reviews; ?> <img style="vertical-align: center;" src="catalog/view/theme/3dtemplates/image/stars-ellow-<?php echo $rating; ?>.png"><a style="font-size: 13px;" onclick="$('a[href=\'#tab-review\']').trigger('click');">написать отзыв</a><br /> </div> </div> <?php } ?> </div> <div class="skidka_tovar"> <?php if ($discounts) { ?> <div class="disc"> <p>Скидка!</p> <?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?> <?php } ?> </div> <?php } ?> </div> <?php if ($price) { ?> <div class="price"> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <span class="price-new"><?php echo $special; ?></span> <span class="price-old"><?php echo $price; ?></span> <?php } ?> <br /> <?php if ($tax) { ?> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br /> <?php } ?> <?php if ($points) { ?> <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span> <?php } ?> </div> <?php } ?> </br> <?php if ($options) { ?> <div class="options"> <script type="text/javascript"><!-- $(document).ready(function() { $("#text_111").keyup(function () { var new_length = $(this).val().replace(/\s+/g,"").length; if(new_length > 0) { $(".quantity-productcart").val(new_length); } }).keyup(); }); </script> <div id="pokaz_opciya">ВЫБЕРИТЕ КОМПЛЕКТАЦИЮ, МОДЕЛЬ ИЛИ ЦВЕТ</div> <br /> <?php $b=0; ?> <?php foreach ($options as $option) { ?> <?php $b=$b+1; ?> <?php if ($option['type'] == 'radio' or $option['type'] == 'select') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php $i=0; foreach ($option['option_value'] as $option_value) { $i++; if($i==1) { $chek='checked="checked"';} else {$chek='';}?> <input style="margin-bottom: 1px!important;margin-top: 1px!important;" type="radio" <?php echo $chek; ?> name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-1<?php echo $option_value['product_option_value_id']; ?>" class="none" /> <?php { ?> <label for="option-value-1<?php echo $option_value['product_option_value_id']; ?>" class="noquantityselect"><?php echo $option_value['name']; ?></label> <?php } ?> <?php } ?> </div> <script type="text/javascript"><!-- $(document).ready(function() { $('label.noselect<?php echo $b; ?>').click(function(){ $('label.yesselect<?php echo $b; ?>').removeClass('yesselect<?php echo $b; ?>').addClass('noselect<?php echo $b; ?>'); $(this).removeClass('noselect<?php echo $b; ?>').addClass('yesselect<?php echo $b; ?>'); }); }); //--></script> <?php } ?> <?php if ($option['type'] == 'checkbox') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php $i=0; foreach ($option['option_value'] as $option_value) { $i++; if($i==1) { $chek='checked="checked"';} else {$chek='';} ?> <input style="margin-bottom: 1px!important;margin-top: 1px!important;" type="checkbox" <?php echo $chek; ?> 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']; ?>" /> <br /> <?php } ?> </div> <br /> <?php } ?> <?php if ($option['type'] == 'image') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required" style="display:none">*</span> <?php } ?> <p class="opct" style="color: #808080!important; line-height: 18px; font-size: 12px; font-weight: bold!important; margin-bottom: -12px"><?php echo $option['name']; ?>:</p><br style="margin-bottom: -1px;" /> <style> input[type="radio"]:checked+label{ border: 2px solid #E14000; } input[type="radio"]:disabled+label{ opacity: 0.3; } </style> <div class="option-image" style="width:100%"> <?php $chek='checked="checked"'; foreach ($option['option_value'] as $option_value) { ?> <div class="opcii" style="margin-bottom: 1px!important;margin-top: 0px!important;"> <input <?php if (!isset($option_value['subtract']) || !isset($option_value['quantity']) || !($option_value['subtract'] && !$option_value['quantity'])) {echo $chek; $chek = '';} ?> style="display:none " 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 class="d_al" style="width:47px; height: 47px; " data-alt=" <?php echo $option_value['name']; ?>" for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img class="wert" width="41px" src="image/<?php echo $option_value['image']; ?>" title="<?php echo $option_value['name']; ?>" /></label></div> <?php } ?> </div> </div> <br /> <?php } ?> <?php if ($option['type'] == 'text') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <span class="bold"><?php echo $option['name']; ?>:</span><br style="margin-bottom: 6px;" /> <input type="text" id="text_111" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" /> <span id="count"></span> </div> <br /> <?php } ?> <?php if ($option['type'] == 'textarea') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <span class="bold"><?php echo $option['name']; ?>:</span><br style="margin-bottom: 6px;" /> <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea> </div> <br /> <?php } ?> <?php if ($option['type'] == 'file') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <span class="bold"><?php echo $option['name']; ?>:</span><br style="margin-bottom: 6px;" /> <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button"> <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'date') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <span class="bold"><?php echo $option['name']; ?>:</span><br style="margin-bottom: 6px;" /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'datetime') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <span class="bold"><?php echo $option['name']; ?>:</span><br style="margin-bottom: 6px;" /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" /> </div> <br /> <?php } ?> <?php if ($option['type'] == 'time') { ?> <div id="option-<?php echo $option['product_option_id']; ?>" class="option"> <?php if ($option['required']) { ?> <span class="required">*</span> <?php } ?> <span class="bold"><?php echo $option['name']; ?>:</span><br style="margin-bottom: 6px;" /> <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" /> </div> <br /> <?php } ?> <?php } ?> </div> <?php } ?> <div class="cart"> <div class="cart-inside"> <div style="margin-top: 20px; margin-bottom: 10px;"><?php echo $text_qty; ?><br /> <?php $mini=1; ?> <input type="hidden" name="minimum" size="4" value="<?php echo $minimum; ?>" /> <span id="minus" class="quantity-operator">-</span> <input class="quantity-productcart" type="text" style="width:36px!important;" name="quantity" size="2" value="1" /> <span id="plus" class="quantity-operator">+</span> <input type="hidden" name="product_id" size="4" value="<?php echo $product_id; ?>" /> <?php if ($minimum > 1) { ?> <div class="minimum" style="font-weight: bold; font-size: 16px"><?php echo $text_minimum; ?></div> <?php } ?> </div> <?php if ($stock != 'Нет в наличии') { ?> <div class="cartbutton"> <input type="button" value="Купить сейчас" title="Купить в один клик" id="button-cart" class="buttons" /></div> <?php } else { ?> <div class="nocartbutton"> <input type="button" value="Товара нет в наличии!" id="button-ne-cart" class="buttonss" /></div> <?php } ?> <?php if ($quantity > 0) { ?> <div class=""> <input type="button" value="Добавить в корзину" title="Положить товар в корзину" id="button-cart2" class="buttons2" /> </div> <span class="links"><a style="font-weight: bold; font-size: 16px" onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br /> <?php } ?> </div> <?php } ?> </div> </div> </div> <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a> <?php if ($attribute_groups){ ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if ($products) { ?> <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a> <?php } ?> <?php if (isset($product_additionals)){ ?> <?php $id_tab = 0; ?> <?php foreach($product_additionals as $additional){ ?> <a href="#additional-<?php echo $id_tab; ?>"><?php echo $additional['name']; ?></a> <?php $id_tab++; ?> <?php } ?> <?php } ?> </div> <div id="tab-description" class="tab-content"><?php echo $description; ?> <a title="Купить в один клик" onclick="addToCart('<?php echo $product_id; ?>');" class="buttons22" ></a> <div class="prim"> <noindex><p style="font-size: 12px;">Если после нажатия на "Купить" не происходит переход на оформление заказа, а открывается эта же страница, то необходимо вверху (сразу под ценой) выбрать опцию!<p></noindex> </div> </div> <?php if($product_additionals){ ?> <?php $id_tab = 0; ?> <?php foreach($product_additionals as $additional){ ?> <div id="additional-<?php echo $id_tab; ?>" class="tab-content"><?php echo html_entity_decode($additional['description'], ENT_QUOTES, 'UTF-8'); ?></div> <?php $id_tab++; ?> <?php } ?> <?php } ?> <?php if ($attribute_groups) { ?> <div id="tab-attribute" class="tab-content"> <table class="attribute"> <?php foreach ($attribute_groups as $attribute_group) { ?> <thead> <tr> <td colspan="2"><?php echo $attribute_group['name']; ?></td> </tr> <tbody <?php if ($result_colorbg==0) { ?>class="whiter"<?php } ?>> <?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 id="tab-review" class="tab-content"> <div id="review"></div> <h2 id="review-title"><?php echo $text_write; ?></h2> <b><?php echo $entry_name; ?></b><br /> <input type="text" name="name" value="" /> <br /> <br /> <b><?php echo $entry_review; ?></b> <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea> <span style="font-size: 11px;"><?php echo $text_note; ?></span><br /> <br /> <b><?php echo $entry_rating; ?></b> <span><?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><?php echo $entry_good; ?></span><br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input style="position: relative; bottom: 10px!important;" type="text" name="captcha" autocomplete="off" value="" style="margin-top: 4px;" /> <img src="index.php?route=product/product/captcha" alt="" id="captcha" /> <a href="#" id="captcha_reload2"><img src="catalog/view/theme/3dtemplates/image/kn-capcha.png"></a> <br style="clear:both;" /> <div class="buttons"> <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div> </div> </div> <?php } ?> <?php if ($products) { ?> <div id="tab-related" class="tab-content"> <div style="color: #016158; font-size: 23px; text-align: center; font-weight:bold; font-family: Arial,Helvetica,sans-serif"> <br /></div> <div style="color: #016158; font-size: 23px; text-align: center; font-weight:bold; font-family: Arial,Helvetica,sans-serif">Товары, которые Вас также могут заинтересовать</div> </div> <?php } ?> <?php if ($products) { ?> <div id="123456" style="position: relative"> <div class="box-heading ">ПОХОЖИЕ ТОВАРЫ</div> <?php $n = 300; ?> <div id="owl-example3" class="owl-carousel"> <?php foreach ($products as $product) { ?> <?php $n = $n + 1; ?> <div> <div class="image relative images_image<?php echo $n; ?>"> <?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" id="images<?php echo $n; ?>" /></a> <?php } else { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $no_image; ?>" alt="<?php echo $product['name']; ?>" /></a> <?php } ?> <a href="<?php echo $product['href']; ?>"><div class="while"></div><div class="shadow_price1 shadow_price1<?php echo $n; ?>"></div><div class="shadow_price2 shadow_price2<?php echo $n; ?>"></div></a> <a href="<?php echo $product['href']; ?>"> <div class="price<?php if ($product['special']) { ?> special_styles <?php } ?> price<?php echo $n; ?>"> <?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> </a> </div> <?php $m = 3000; ?> <div class="name" style=" min-height: 40px;"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div style="width: 100%; margin: 0;" class="cart full_width"> <input style="height: 35px; border-radius: 0 !important;"type="button" value="<?php echo $button_cart; ?><?php if ($product['special']) { echo $sale; } ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /> </div> <script type="text/javascript"> $(document).ready(function() { $('.images_image<?php echo $n; ?>').hover( function() { setTimeout(function() { $('.price<?php echo $n; ?>').animate({"margin-left": "-=185px"}, 500); $('.shadow_price2<?php echo $n; ?>').animate({"margin-left": "-=150px"}, 1000); $('.shadow_price1<?php echo $n; ?>').animate({"opacity": "0"}, 1500); },0); }, function() { setTimeout(function() { $('.shadow_price2<?php echo $n; ?>').animate({"margin-left": "+=150px"}, 400); $('.price<?php echo $n; ?>').animate({"margin-left": "+=185px"}, 500); $('.shadow_price1<?php echo $n; ?>').animate({"opacity": "1"}, 100); },300); } ); }); </script> </div> <?php } ?> <?php } ?> </div> </div> <script type="text/javascript"> $(document).ready(function() { /* $("#owl-example3").owlCarousel({ navigation : true, slideSpeed : 200, paginationSpeed : 400, items: 4 }); */ var opts = $.parseJSON('[[0,1],[470,2],[760,2],[980,3],[1100,3],[1365,4],[1599,5],[1919,6]]'); $("#owl-example3").owlCarousel({ lazyLoad: true, itemsCustom: opts, autoPlay: true, touchDrag: false, stopOnHover: true, items: 4, itemsDesktop: [1199,3], navigation: true, scrollPerPage: true, navigationText: false, paginationSpeed: 400, margin: 20 }); }); </script> <?php if ($tags) { /* ?> <div class="tags"><b><?php echo $text_tags; ?></b> <?php for ($i = 0; $i < count($tags); $i++) { ?> <?php if ($i < (count($tags) - 1)) { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>, <?php } else { ?> <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a> <?php } ?> <?php } ?> </div> <?php */} ?> <?php echo $content_bottom; ?></div> <div class="overlay"></div> <script type="text/javascript"> $('.popup .close1, .overlay').click(function() { $('.overlay, .popup').hide(); }) </script/> <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox", width:"500px", height:"500px" }); }); //--></script> <script type="text/javascript" ><!-- $(document).ready(function() { $('.minus1').click(function () { var $input = $(this).parent().find('#cont'); var count = parseInt($input.val()) - 1; count = count < 1 ? 1 : count; $input.val(count); $input.change(); return false; }); $('.plus1').click(function () { var $input = $(this).parent().find('#cont'); $input.val(parseInt($input.val()) + 1); $input.change(); return false; }); }); //--></script> <script type="text/javascript"><!-- $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var popup_id = $('#' + $(this).attr("rel")); $(popup_id).show(); $('.overlay').show(); $('.popup').show(); } } } if (json['success']) { $('#cart-total, .cart-total').html(json['total']); $('#cartpopup .cart').load('index.php?route=module/cart .mini-cart-info', function() { $('#cartpopup .mini-cart-info td.remove img').each(function(i,e){ var $this = $(this); var product_id = $this.attr('onclick').match(/remove=(\d+(?::[\w=\+\\]+)?)/)[1]; this.onclick = function () { $('#cart').load('index.php?route=module/cart&remove=' + product_id + ' #cart > *', function(){$('.cart-total').text($('#cart-total').text());}); $this.parent().parent().hide(); if ($('#cartpopup .mini-cart-info tr').filter(':visible').length == 0) { $('#cartpopup').popup('hide'); } } }); $('#cartpopup').popup('show'); }); } } }); }); //--></script> <?php if ($options) { ?> <script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'file') { ?> <script type="text/javascript"><!-- new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', { action: 'index.php?route=product/product/upload', name: 'file', autoSubmit: true, responseType: 'json', onSubmit: function(file, extension) { $('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/3dtemplates/image/loading.gif" class="loading" style="padding-left: 5px;" />'); $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true); }, onComplete: function(file, json) { $('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false); $('.error').remove(); if (json['success']) { alert(json['success']); $('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']); } if (json['error']) { $('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>'); } $('.loading').remove(); } }); //--></script> <?php } ?> <?php } ?> <?php } ?> <script type="text/javascript"><!-- $('#review .pagination a').live('click', function() { $('#review').fadeOut('slow'); $('#review').load(this.href); $('#review').fadeIn('slow'); return false; }); $('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>'); $('#button-review').bind('click', function() { $.ajax({ url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-review').attr('disabled', true); $('#review-title').after('<div class="attention"><img src="catalog/view/theme/3dtemplates/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-review').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data['error']) { $('#review-title').after('<div class="warning">' + data['error'] + '</div>'); } if (data['success']) { $('#review-title').after('<div class="success">' + data['success'] + '</div>'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').attr('checked', ''); $('input[name=\'captcha\']').val(''); } } }); }); //--></script> <script type="text/javascript"><!-- $('#tabs a').tabs(); //--></script> <script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> <script type="text/javascript"><!-- $(document).ready(function() { if ($.browser.msie && $.browser.version == 6) { $('.date, .datetime, .time').bgIframe(); } $('.date').datepicker({dateFormat: 'yy-mm-dd'}); $('.datetime').datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'h:m' }); $('.time').timepicker({timeFormat: 'h:m'}); }); //--></script> <script> var counter = 1; var min = <?php echo $minimum; ?>; $('input[name="quantity"]').change(function () { var value = parseInt($(this).val()); var val = value % counter; if (val) { value = value - val; } $(this).val(value); if (isNaN(parseInt($(this).val()))) { $(this).val(min); } else { if ($(this).val() < min) { $(this).val(min); } } }); $('.quantity-operator').click (function () { if ($(this).attr('id') == 'minus') { if (parseInt($('input[name="quantity"]').val()) > min) { $('input[name="quantity"]').val(parseInt($('input[name="quantity"]').val()) - counter); } } else { $('input[name="quantity"]').val(parseInt($('input[name="quantity"]').val()) + counter); } if(typeof recalculateprice == 'function') { recalculateprice(); } }); </script> <script type="text/javascript"><!-- $('#carousel-p ul').jcarousel({ vertical: false, visible: 3, scroll: 1, //auto: 4, //animation: "slow", //wrap: "both" }); /* $(function () { $("SELECT").selectBox(); }); */ $('.zoom_additional').click( function() { $('#zoom_link1').attr('href',$(this).attr('data-zoom-image')); }); //--></script> <script type="text/javascript"><!-- $('#captcha_reload2').live('click', function(e) { d = new Date(); $("#captcha").attr("src", "index.php?route=product/product/captcha/?"+d.getTime()); e.preventDefault(); }); //--></script> <?php echo $footer; ?>
Как я и сказал ( к сожалению номера строки не видно) найдите строку Код: <input class="quantity-productcart" type="text" style="width:36px!important;" name="quantity" size="2" value="1" /> и замените ее на Код: <input class="quantity-productcart" type="text" style="width:36px!important;" name="quantity" size="2" value="<?php echo $minimum; ?>" /> P.S. В идеале, еще нужно скрипт кнопки "минус" отладить так, чтобы ниже минимума значение не ставилось.