Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

fanatic

Users
  • Posts

    4,905
  • Joined

  • Last visited

Everything posted by fanatic

  1. как вариант, создать 2 категории Cyхие корма, но с уникальным ceo url
  2. .img-responsive { margin-left: auto; margin-right: auto; } как вариант
  3. если еще актуально, покажите задание
  4. <script type="text/javascript"> $(function () { $("#input-meta-description<?php echo $language['language_id']; ?>").on('input', function () { var max = 250; var val = $(this).val(); var count = val.length; if (count >= max) { var str = val.substr(0, max); $(this).val(str); $('#err').html('Максимум ' + max + ' символов'); $('#res').html('Осталось: 0 символов'); } else { $('#err').html(''); $('#res').html('Осталось: ' + (max - count) + 'символов(а)'); } }) }) </script> <div class="form-group"> <label class="col-sm-2 control-label" for="input-meta-description<?php echo $language['language_id']; ?>"><?php echo $entry_meta_description; ?></label> <div class="col-sm-10"> <textarea name="product_description[<?php echo $language['language_id']; ?>][meta_description]" rows="5" placeholder="<?php echo $entry_meta_description; ?>" id="input-meta-description<?php echo $language['language_id']; ?>" class="form-control"><?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['meta_description'] : ''; ?></textarea> </div> <div id="res"></div> <div id="err"></div> </div>
  5. пример подсчета, и запрет вводить больше 15 символов <script type="text/javascript"> $(function(){ $('#std').on('input',function(){ var max = 15; var val = $(this).val(); var count = val.length; if(count >= max){ var str = val.substr(0,max); $(this).val(str); $('#error').html('Максимум '+max+' символов'); $('#res').html('Введено: '+str.length+ 'символов(а)'); } else{ $('#error').html(''); $('#res').html('Введено: '+count+ 'символов(а)'); } }) }) </script> <style> .error{ color:red; } </style> <form method="post"> <label>Проверка ввода количества символов</label> <input id="std" type="text" name="test"><br> <p id="res"></p> <p id="error" class="error"></p> </form>
  6. файл catalog\controller\information\contact.php if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $mail = new Mail(); $mail->protocol = $this->config->get('config_mail_protocol'); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8'); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($this->config->get('config_email')); $mail->setFrom($this->request->post['email']); $mail->setSender(html_entity_decode($this->request->post['name'], ENT_QUOTES, 'UTF-8')); $mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8')); $message = '<p>Имя: '.$this->request->post['name'].'</p>';//добавляем имя $message .= '<p>Email: '.$this->request->post['email'].'</p>';//добавляем email $message .= '<p>Cообщение: '.$this->request->post['enquiry'].'</p>';// и сообщение $mail->setHtml($message);//меняем метод для отправки html $mail->send(); $this->response->redirect($this->url->link('information/contact/success')); } в писме будет - имя, email и сообщение
  7. почему, просто не прописать стили, в существующий файл стилей?
  8. если закомментировать в catalog\controller\api\customer.php, и оставить поле email пустым будет fatal Fatal error: Uncaught exception 'Exception' with message 'Error: E-Mail to required!' in D:\openserver\OpenServer\domains\opencart2\system\library\mail.php on line 60 потому как $this->model_checkout_order->addOrderHistory($order_id, $order_status_id); там, как я понимаю, происходит отправка сообщения о изменении заказа.(а мыла то нет)
  9. а у меня на 8.1 не ставится. пишет, что нужно еще кучу модулей
  10. если, я правильно поняд .owl-carousel .owl-wrapper-outer { overflow: hidden; position: relative; width: 90%;//размер margin-left:auto; margin-right:auto; } \catalog\view\javascript\jquery\owl-carousel\owl.carousel.css
  11. как-то так <!--<div class="btn-group hidden-xs"> <button type="button" id="list-view" class="btn btn-default" data-toggle="tooltip" title="<?php echo $button_list; ?>"><i class="fa fa-th-list"></i></button> <button type="button" id="grid-view" class="btn btn-default" data-toggle="tooltip" title="<?php echo $button_grid; ?>"><i class="fa fa-th"></i></button> </div>-->
  12. Спасибо, я так и понял (разобрал что происходит от indexa до контроллера)
  13. Васо, првильно ли я понял - когда в методе класса ControllerProductCategory мы обращаемся к несуществующему свойству $this->language, срабатывает __get родительского класса (abstract class Controller), который возвращает экземпляр класса Language, а затем запускаем метод load этого класса $this->language->load(‘product/category’);
  14. я знаю, что здесь есть, я не пойму, как в контроллере появляется возможность обращаться к language при помощи $this
  15. здравствуйте. если не сложно, объясните следующую строку $this->language->load(‘product/category’); насколько я знаю, $this предоставляет доступ к методам и свойствам в контексте класса. Допустим, вышеприведенная строка используется в классе ControllerProductCategory который наследуется от Controller, но в этих классах нет свойствв language. Или я что-то неправильно понимаю?
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.