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

karapuzz

Newbie
  
  • Posts

    19
  • Joined

  • Last visited

Information

  • Gender
    Мужчина
  • City:
    Киев

Recent Profile Visitors

2,367 profile views
  • Tom

karapuzz's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

1

Reputation

  1. Добрый день. Вопрос по модулю - у меня так же страница списка заказов модифицирована, и почта и номер телефона клиента выводятся немного по другому. Добавил руками ссылку вида : <a href="<?php echo $telephone_url; ?>" class="btn btn-primary btn-xs" target="_blank"><i class="fa fa-search"></i> <?php echo $order['telephone']; ?></a> в в order_list.tpl Но ссылка на поиск по номеру телефона не работает, выдает ошибку - <a href="Notice Undefined variable: telephone_url in /home/*****/public_html/system/storage/modification/admin/view/template/sale/order_list.tpl on line 183 "class="btn btn-primary btn-xs" target="_blank"><i class="fa fa-search"></i> *******</a> Насколько я понимаю, он не видит переменную урла номера телефона, хотя в контроллере order.php эта вставка в модификаторах есть - проверял много раз. Подскажите, куда копать и в чем может быть проблема? Заранее спасибо.
  2. ошибся - модуль отлично работает с опциями. Проблема возникла с шаблоном Journal - в нем свой встроенный модуль обновления цены в зависимости от опций. У кого такая же проблема - решение под спойлером.
  3. А можно как-то дописать\реализовать выбор валют для опций? Иначе смысл работы модуля для товаров с опциями сразу теряется. Возможно за доплату разумную.
  4. Отличный мод! помогает, почти моментально, представить покупателю полный обьем каталога. Существует ли возможность подружить Ваш мод с кастомным шаблоном для категории, есть необходимость выводить кастомные категории. С возможностью выводить свои шаблоны категорий, Вашему моду, вообще не было бы цены.
  5. Сабж. Собственно, если магазин получает трафик не из контекста, а из прямого слива трафика - скажем из социалок, или тизеров. Как можно отследить конвертабельность такого трафика? Да, через метрику или аналитикс можно узнать как сконвертился именно их трафик, а как узнать количество заказов по другим потокам? Предлагаем варианты, думаю актуально.
  6. Может я тупой - пробовал менять некоторые строки - выдает сразу ошибку. Работает только основной вариант этого файла. Выкладываю его ниже - может быть кто-то подскажет, где прописать нужно.В идеале должен быть редирект на /index.php?route=checkout/success. <?php class ControllerCheckoutCheckout extends Controller { public function index() { $this->language->load('checkout/checkout'); $this->document->setTitle($this->language->get('heading_title')); // Инициируем переменные для шаблона // 1. Языковые переменные $this->data['text_your_details'] = $this->language->get('text_your_details'); $this->data['entry_firstname'] = $this->language->get('entry_firstname'); $this->data['entry_address_1'] = $this->language->get('entry_address_1'); $this->data['entry_telephone'] = $this->language->get('entry_telephone'); $this->data['entry_email'] = $this->language->get('entry_email'); $this->data['text_comments'] = $this->language->get('text_comments'); $this->data['button_checkout'] = $this->language->get('button_checkout'); $err = false; // 2. Получаем данные формы и проверяем корректность $firstname = ''; $this->data['error_firstname'] = ''; if(isset($_POST['firstname'])) { $firstname = addslashes(strip_tags($_POST['firstname'])); if( strlen($firstname) < 2 ) { $this->data['error_firstname'] = $this->language->get('error_firstname'); $err = true; } } $this->data['firstname'] = $firstname; $address_1 = ''; $this->data['error_address_1'] = ''; if(isset($_POST['address_1'])) { $address_1 = addslashes(strip_tags($_POST['address_1'])); if( strlen($address_1) < 3 || strlen($address_1) > 128 ) { $this->data['error_address_1'] = $this->language->get('error_address_1'); $err = true; } } $this->data['address_1'] = $address_1; $telephone = ''; $this->data['error_telephone'] = ''; if(isset($_POST['telephone'])) { $telephone = addslashes(strip_tags($_POST['telephone'])); if( strlen($telephone) < 7 ) { $this->data['error_telephone'] = $this->language->get('error_telephone'); $err = true; } } $this->data['telephone'] = $telephone; $email = ''; $this->data['error_email'] = ''; if(isset($_POST['email'])) { $email = addslashes(strip_tags($_POST['email'])); if($email && !preg_match('/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/i', $email)) { $this->data['error_email'] = $this->language->get('error_email'); $err = true; } } $this->data['email'] = $email; $comment = ''; if(isset($_POST['comment'])) { $comment = addslashes(strip_tags($_POST['comment'])); } $this->data['comment'] = $comment; if($err) { $this->data['error_warning'] = $this->language->get('error_warning'); } else { $this->data['error_warning'] = ''; } $this->data['url'] = $this->url->link('checkout/checkout', '', 'SSL'); $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); // Если данные уже были введены и они соответствуют щаблону то добавляем заказ в базу if( $err == false && isset($_POST['submited']) && $_POST['submited'] == 1 ) { $total = 0; $data['invoice_prefix'] = $this->config->get('config_invoice_prefix'); $data['store_id'] = $this->config->get('config_store_id'); $data['store_name'] = $this->config->get('config_name'); if ($data['store_id']) { $data['store_url'] = $this->config->get('config_url'); } else { $data['store_url'] = HTTP_SERVER; } $data['customer_id'] = 0; $data['customer_group_id'] = $this->config->get('config_customer_group_id'); $data['firstname'] = $firstname; $data['lastname'] = ''; $data['email'] = $email; $data['telephone'] = $telephone; $data['fax'] = ''; $data['payment_firstname'] = $firstname; $data['payment_lastname'] = ''; $data['payment_company'] = ''; $data['payment_address_1'] = $address_1; $data['payment_address_2'] = ''; $data['payment_city'] = 'Yekaterinburg'; $data['payment_postcode'] = '620000'; $data['payment_zone'] = 'Yekaterinburg'; $data['payment_zone_id'] = '2807'; $data['payment_country'] = 'Russian Federation'; $data['payment_country_id'] = '176'; $data['payment_address_format'] = ''; $data['payment_method'] = 'Cash On Delivery'; $data['shipping_firstname'] = $firstname; $data['shipping_lastname'] = ''; $data['shipping_company'] = ''; $data['shipping_address_1'] = $address_1; $data['shipping_address_2'] = ''; $data['shipping_city'] = 'Yekaterinburg'; $data['shipping_postcode'] = '620000'; $data['shipping_zone'] = 'Yekaterinburg'; $data['shipping_zone_id'] = '2807'; $data['shipping_country'] = 'Russian Federation'; $data['shipping_country_id'] = '176'; $data['shipping_address_format'] = ''; $data['shipping_method'] = ''; $product_data = array(); foreach ($this->cart->getProducts() as $product) { $option_data = array(); foreach ($product['option'] as $option) { if ($option['type'] != 'file') { $option_data[] = array( 'product_option_id' => $option['product_option_id'], 'product_option_value_id' => $option['product_option_value_id'], 'product_option_id' => $option['product_option_id'], 'product_option_value_id' => $option['product_option_value_id'], 'option_id' => $option['option_id'], 'option_value_id' => $option['option_value_id'], 'name' => $option['name'], 'value' => $option['option_value'], 'type' => $option['type'] ); } else { $this->load->library('encryption'); $encryption = new Encryption($this->config->get('config_encryption')); $option_data[] = array( 'product_option_id' => $option['product_option_id'], 'product_option_value_id' => $option['product_option_value_id'], 'product_option_id' => $option['product_option_id'], 'product_option_value_id' => $option['product_option_value_id'], 'option_id' => $option['option_id'], 'option_value_id' => $option['option_value_id'], 'name' => $option['name'], 'value' => $encryption->decrypt($option['option_value']), 'type' => $option['type'] ); } } $product_data[] = array( 'product_id' => $product['product_id'], 'name' => $product['name'], 'model' => $product['model'], 'option' => $option_data, 'download' => $product['download'], 'quantity' => $product['quantity'], 'subtract' => $product['subtract'], 'price' => $product['price'], 'total' => $product['total'], ); $total += $product['total']; } // Gift Voucher if (isset($this->session->data['vouchers']) && $this->session->data['vouchers']) { foreach ($this->session->data['vouchers'] as $voucher) { $product_data[] = array( 'product_id' => 0, 'name' => $voucher['description'], 'model' => '', 'option' => array(), 'download' => array(), 'quantity' => 1, 'subtract' => false, 'price' => $voucher['amount'], 'total' => $voucher['amount'], 'tax' => 0 ); } } $totals = array(); $tatals[0]['code'] = 'sub_total'; $tatals[0]['title'] = 'Sub-Total'; $tatals[0]['text'] = $total; $tatals[0]['value'] = $total; $tatals[0]['sort_order'] = 1; $tatals[1]['code'] = 'shipping'; $tatals[1]['title'] = 'Flat Rate'; $tatals[1]['text'] = '0.00'; $tatals[1]['value'] = 0; $tatals[1]['sort_order'] = 3; $tatals[2]['code'] = 'total'; $tatals[2]['title'] = 'Total'; $tatals[2]['text'] = $total; $tatals[2]['value'] = $total; $tatals[2]['sort_order'] = 9; $data['products'] = $product_data; $data['totals'] = $tatals; $data['comment'] = $comment; $data['total'] = $total; $data['reward'] = $this->cart->getTotalRewardPoints(); if (isset($this->request->cookie['tracking'])) { $this->load->model('affiliate/affiliate'); $affiliate_info = $this->model_affiliate_affiliate->getAffiliateByCode($this->request->cookie['tracking']); if ($affiliate_info) { $data['affiliate_id'] = $affiliate_info['affiliate_id']; $data['commission'] = ($total / 100) * $affiliate_info['commission']; } else { $data['affiliate_id'] = 0; $data['commission'] = 0; } } else { $data['affiliate_id'] = 0; $data['commission'] = 0; } $data['language_id'] = $this->config->get('config_language_id'); $data['currency_id'] = $this->currency->getId(); $data['currency_code'] = $this->currency->getCode(); $data['currency_value'] = $this->currency->getValue($this->currency->getCode()); $data['ip'] = $this->request->server['REMOTE_ADDR']; $this->load->model('checkout/order'); $order_id = $this->model_checkout_order->create($data); $this->model_checkout_order->confirm2( $order_id ); if (isset($order_id)) { $this->cart->clear(); unset($this->session->data['shipping_method']); unset($this->session->data['shipping_methods']); unset($this->session->data['payment_method']); unset($this->session->data['payment_methods']); unset($this->session->data['guest']); unset($this->session->data['comment']); unset($this->session->data['order_id']); unset($this->session->data['coupon']); unset($this->session->data['voucher']); unset($this->session->data['vouchers']); } $this->language->load('checkout/success'); $this->document->setTitle($this->language->get('heading_title')); $this->data['breadcrumbs'] = array(); $this->data['breadcrumbs'][] = array( 'href' => $this->url->link('common/home'), 'text' => $this->language->get('text_home'), 'separator' => false ); $this->data['breadcrumbs'][] = array( 'href' => $this->url->link('checkout/cart'), 'text' => $this->language->get('text_basket'), 'separator' => $this->language->get('text_separator') ); $this->data['breadcrumbs'][] = array( 'href' => $this->url->link('checkout/checkout', '', 'SSL'), 'text' => $this->language->get('text_checkout'), 'separator' => $this->language->get('text_separator') ); $this->data['breadcrumbs'][] = array( 'href' => $this->url->link('checkout/success'), 'text' => $this->language->get('text_success'), 'separator' => $this->language->get('text_separator') ); $this->data['heading_title'] = $this->language->get('heading_title'); if ($this->customer->isLogged()) { $this->data['text_message'] = sprintf($this->language->get('text_customer'), $this->url->link('account/account', '', 'SSL'), $this->url->link('account/order', '', 'SSL'), $this->url->link('account/download', '', 'SSL'), $this->url->link('information/contact')); } else { $this->data['text_message'] = sprintf($this->language->get('text_guest'), $this->url->link('information/contact')); } $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['continue'] = $this->url->link('common/home'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) { $this->template = $this->config->get('config_template') . '/template/common/success.tpl'; } else { $this->template = 'default/template/common/success.tpl'; } } else { $this->template = 'default/template/checkout/checkout.tpl'; } $this->response->setOutput($this->render()); } } ?>
  7. Вариант интересен))))А если покупатель не успеет ввести данные?)))) Нет,спасибо)
  8. Сделал на сайте упрощенную форму заказа - скачал чей-то хак с этого форума. Когда покупатель начинает оформлять заказ, ссылка у сайта такая - site.ru/index.php?route=checkout/checkout После того как пользователь заполняет данные о себе, и жмет подтвердить, ссылка остается такой же - site.ru/index.php?route=checkout/checkout. Как сделать, чтобы его редиректило на другую страницу? Привожу файл site.ru/catalog/view/theme/default/template/checkout/checkout.tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?> <div id="content"><?php echo $content_top; ?> <form action="<?php echo $url; ?>" name="checkout" method="post"> <?php if ($error_warning) { ?> <div class="warning"><?php echo $error_warning; ?></div> <?php } ?> <h2><?php echo $text_your_details; ?></h2> <span class="required">*</span> <?php echo $entry_firstname; ?><br /> <input type="text" name="firstname" value="<?php echo $firstname; ?>" class="large-field" /><br /> <?php if ($error_firstname) { ?> <span class="error"><?php echo $error_firstname; ?></span> <?php } ?> <span class="required">*</span> <?php echo $entry_telephone; ?><br /> <input type="text" name="telephone" value="<?php echo $telephone; ?>" class="large-field" /><br /> <?php if ($error_telephone) { ?> <span class="error"><?php echo $error_telephone; ?></span> <?php } ?> <span class="required">*</span> <?php echo $entry_address_1; ?><br /> <input type="text" name="address_1" value="<?php echo $address_1; ?>" class="large-field" /><br /> <?php if ($error_address_1) { ?> <span class="error"><?php echo $error_address_1; ?></span> <?php } ?> <?php echo $entry_email; ?><br /> <input type="text" name="email" value="<?php echo $email; ?>" class="large-field" /><br /> <?php if ($error_email) { ?> <span class="error"><?php echo $error_email; ?></span> <?php } ?> <?php echo $text_comments; ?><br /> <textarea name="comment" rows="5" style="width: 300px"><?php echo $comment; ?></textarea> <div class="buttons"> <div class="left"><a onclick="document.forms['checkout'].submit()" class="button"><span><?php echo $button_checkout; ?></span></a></div> </div> <input type="hidden" name="submited" value="1"> </form> </div> <?php echo $footer; ?>
  9. . ' (' . $product_total . ')' - вот это. У вас вначале точка пропущена. Хз сильно ли повлияет, лучше удалить.
  10. Тоже письма не доходят. Никто не сталкивался разве?
  11. Решено.Может кому-то нужно будет. Файл site.ru/catalog/controller/module/category.php Меняем: 'name' => $child['name'] . ' (' . $product_total . ')', НА 'name' => $child['name'] , 'name' => $category['name'] . ' (' . $product_total . ')', НА 'name' => $category['name'] ,
Guest
×
  • 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.