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

fatalex

Newbie
  
  • Posts

    32
  • Joined

  • Last visited

Recent Profile Visitors

1,168 profile views

fatalex's Achievements

Explorer

Explorer (4/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Добрый день! Нужна возможность показа акционного товара в корзине юзверю, но только после возвращения его в корзину. Когда заходит впервые - акционный товар не показываем. Данный модуль это может или что-то другое подскажите? Версия opencart 1.5
  2. Спасибо, помогло, была ошибка в строке <div class="checkout"><a id="button-confirm" class="button" href="<?php echo $cart; ?>"><span><?php echo $text_cart; ?></span></a> <a id="button-confirm" class="button" href="<?php echo $checkout; ?>"><span><?php echo $text_checkout; ?></span></a></div> а надо было: <div class="checkout"><a class="button" href="<?php echo $cart; ?>"><span><?php echo $text_cart; ?></span></a> <a class="button" href="<?php echo $checkout; ?>"><span><?php echo $text_checkout; ?></span></a></div>
  3. log почему-то высвечивает только ошибки, связанные с module/callme.tpl и module/featured.tpl.... Перезалил оба файла - не помогло....
  4. В tpl листинг такой <?php } ?> <div id="payment-method"> <div class="checkout-heading"><div class="marker-chekout"><?php echo $text_checkout_payment_method; ?></div></div> <div class="checkout-content"></div> </div> <div id="confirm"> <div class="checkout-heading"><div class="marker-chekout"><?php echo $text_checkout_confirm; ?></div></div> <div class="checkout-content"></div> </div> </div> <?php echo $content_bottom; ?></div> Далее идут скрипты Со скриптами вроде всё норм... х.з. где ещё смотреть
  5. Кнопка в принципе не нажимается... Такое ошущение, что ничего не подвязано. Есть ещё один сайт на том же ядре и том же серваке, там всё работает. Может что-то перезалить оттуда?) папки model и controller уже перезалил, безрезультатно. Какой tpl отвечает за этот 6-ой этап? checkout.tpl? Какой конкретно скрипт?
  6. На шестом шаге при оформлении товара в корзине не работает кнопка " Подтверждение заказа".... В какую сторону копать?
  7. По сути вторая форма обратной связи с отсылкой на почту админа. Сейчас выкину листинг product.php $this->data['tab_question'] = $this->language->get('tab_question'); $this->data['text_ask'] = $this->language->get('text_ask'); $this->data['entry_name_ask'] = $this->language->get('entry_name_ask'); $this->data['entry_email_ask'] = $this->language->get('entry_email_ask'); $this->data['entry_phone_ask'] = $this->language->get('entry_phone_ask'); $this->data['error_phone_ask'] = $this->language->get('error_phone_ask'); $this->data['entry_question_ask'] = $this->language->get('entry_question_ask'); public function write1() { $this->language->load('product/product'); $this->load->model('catalog/askquestion'); $json = array(); if ((utf8_strlen($this->request->post['name1']) < 3) || (utf8_strlen($this->request->post['name1']) > 25)) { $json['error'] = $this->language->get('error_name_ask'); } if ((utf8_strlen($this->request->post['phone']) < 6)) { $json['error'] = $this->language->get('error_phone_ask'); } if ((utf8_strlen($this->request->post['email']) < 6) || (utf8_strlen($this->request->post['email']) > 35)) { $json['error'] = $this->language->get('error_email_ask'); } if ((utf8_strlen($this->request->post['text1']) < 15) || (utf8_strlen($this->request->post['text1']) > 1000)) { $json['error'] = $this->language->get('error_text_ask'); } if (!isset($this->session->data['captcha1']) || ($this->session->data['captcha1'] != $this->request->post['captcha1'])) { $json['error'] = $this->language->get('error_captcha_ask'); } if (($this->request->server['REQUEST_METHOD'] == 'POST') && !isset($json['error'])) { $this->model_catalog_askquestion->addAskquestion($this->request->get['product_id'], $this->request->post); $json['success'] = $this->language->get('text_success_ask'); } $this->response->setOutput(json_encode($json)); } public function captcha1() { $this->load->library('captcha1'); $captcha1 = new Captcha1(); $this->session->data['captcha1'] = $captcha1->getCode(); $captcha1->showImage(); } public function captcha() { $this->load->library('captcha'); $captcha = new Captcha(); $this->session->data['captcha'] = $captcha->getCode(); $captcha->showImage(); } public function upload() { $this->language->load('product/product'); $json = array(); if (!empty($this->request->files['file']['name'])) { $filename = basename(preg_replace('/[^a-zA-Z0-9\.\-\s+]/', '', html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8'))); if ((strlen($filename) < 3) || (strlen($filename) > 64)) { $json['error'] = $this->language->get('error_filename'); } $allowed = array(); $filetypes = explode(',', $this->config->get('config_upload_allowed')); foreach ($filetypes as $filetype) { $allowed[] = trim($filetype); } if (!in_array(substr(strrchr($filename, '.'), 1), $allowed)) { $json['error'] = $this->language->get('error_filetype'); } if ($this->request->files['file']['error'] != UPLOAD_ERR_OK) { $json['error'] = $this->language->get('error_upload_' . $this->request->files['file']['error']); } } else { $json['error'] = $this->language->get('error_upload'); product.tpl <div id="tab-askquestion" class="tab-content" style="border: 1px solid #000;"> <div id="askquestion"></div> <h2 id="askquestion-title" style="text-transform:none;"><?php echo $text_ask; ?> <?php echo $model; ?> </h2> <br /> <img src="./image/name.png" align="absmiddle" /> <b><?php echo $entry_name_ask; ?></b><br /> <input type="text" name="name1" value="" /> <br /> <br /> <img src="./image/phone.png" align="absmiddle" /> <b><?php echo $entry_phone_ask; ?></b><br /> <input type="text" name="phone" value="" /> <br /> <br /> <img src="./image/email.png" align="absmiddle" /> <b><?php echo $entry_email_ask; ?></b><br /> <input type="text" name="email" value="" /> <br /> <br /> <img src="./image/question.png" align="absmiddle" /> <b><?php echo $entry_question_ask; ?></b> <textarea name="text1" cols="40" rows="8" style="width: 98%;"></textarea> <br /> <br /> <b><?php echo $entry_captcha; ?></b><br /> <input type="text" name="captcha1" value="" /> <br /> <img src="index.php?route=product/product/captcha1" alt="" id="captcha1" /><br /> <br /> <div class="buttons"> <div class="right"><a id="button-askquestion" class="button"><span><?php echo $button_continue; ?></span></a></div> </div> </div> <script type="text/javascript"> $('#button-askquestion').bind('click', function() { $.ajax({ type: 'POST', url: 'index.php?route=product/product/write1&product_id=<?php echo $product_id; ?>', dataType: 'json', data: 'name1=' + encodeURIComponent($('input[name=\'name1\']').val()) + '&email=' + encodeURIComponent($('input[name=\'email\']').val()) + '&phone=' + encodeURIComponent($('input[name=\'phone\']').val()) + '&text1=' + encodeURIComponent($('textarea[name=\'text1\']').val()) + '&captcha1=' + encodeURIComponent($('input[name=\'captcha1\']').val()), beforeSend: function() { $('.success, .warning').remove(); $('#button-askquestion').attr('disabled', true); $('#askquestion-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>'); }, complete: function() { $('#button-askquestion').attr('disabled', false); $('.attention').remove(); }, success: function(data) { if (data.error) { $('#askquestion-title').after('<div class="warning">' + data.error + '</div>'); } if (data.success) { $('#askquestion-title').after('<div class="success">' + data.success + '</div>'); $('input[name=\'name1\']').val(''); $('input[name=\'email\']').val(''); $('input[name=\'phone\']').val(''); $('textarea[name=\'text1\']').val(''); $('input[name=\'captcha1\']').val(''); } } }); }); </script> В файле на который ссылается контроллер, сейчас следующее ask_question.php <?php class ModelCatalogAskquestion extends Model { public function addAskquestion($product_id, $data) { $this->load->model('catalog/product'); $product_info = $this->model_catalog_product->getProduct($product_id); $message ='<b>Product:</b> <a href="'.($this->url->link('product/product', '&product_id=' . $this->request->get['product_id'])).'">'.(strip_tags($product_info['name'])).'</a><br />'; $message.='<b>Name:</b> '.(strip_tags($data['name1'])).'<br />'; $message.='<b>Email:</b> '.(strip_tags($data['email'])).'<br /><br />'; $message.='<b>Question:</b> <br />'; $message.=(strip_tags($data['text1']))."<br /><br />"; $mail = new Mail($this->config->get('config_mail_protocol'), $this->config->get('config_smtp_host'), $this->config->get('config_smtp_username'), html_entity_decode($this->config->get('config_smtp_password')), $this->config->get('config_smtp_port'), $this->config->get('config_smtp_timeout')); $mail->setTo(array($this->config->get('config_email'))); $mail->setFrom(strip_tags($data['email'])); $mail->setSender(strip_tags($data['name1'])); $mail->setSender(strip_tags($data['phone'])); $mail->setSubject((strip_tags($data['name1'])). ' wants to ask you something about ' .(strip_tags($product_info['name']))); $mail->setHtml($message); $mail->send(); } } ?> Где еще можно порыть поискать причину.
  8. Здравствуйте уважаемые форумчане. Продолжаю осваивать opencart. И вот появился ещё один вопрос. Есть вкладка запроса в карточке товара. Имелись поля имя, email, text_area... Вот добавил поле для ввода телефона и столкнулся с тем, что значение этого поля не прилетает на e-mail, с остальными полями всё вроде норм. Вроде и в контроллер всё добавил и в папке language поля дописал, ну и в product.tpl соответственно переменные ввёл. Но на email по-прежнему значения из этого поля не прилетают. Подскажите пожалуйста, что ещё проверить, в какую сторону копать.
  9. Exploits Рано радовался) Что-то не получается... Куда конкретно прописать код? в tpl выводить <?php echo $total_cart_price ?> ?
  10. Пока вывел через это $this->cart->getTotal(); Продолжаю кастомить корзину. Exploits спасибо огромное, попробую.
  11. Хочу сделать вывод общей стоимости всех товаров в корзине, но вот не знаю какую переменную запросить, помогите пожалуйста. Вывести надо только общую стоимость и ничего больше.
  12. Ещё одна проблемка вылезла... После добавления любого товара в корзину, корзина менят свои стили и cart.tpl подтягивается откудо-то ещё. После обновления страницы все стили норм, cart.tpl тянет нужные значения. После добавления товара опять та же ситуация...
  13. Вроде получилось, спасибо. А как теперь убрать из вот этого $data['text_items'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total)); вывод значения getSubTotal(), сохранив при этом всё остальное? Убирать из language? или переписывать chekout? Если последнее, то что конкретно там убивать?
×
×
  • 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.