Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

ssoundslider

Новичок
  
  • Posts

    25
  • Joined

  • Last visited

Recent Profile Visitors

529 profile views

ssoundslider's Achievements

Explorer

Explorer (4/14)

  • First Post
  • Collaborator
  • One Year In
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Всё , разобрался ) Чёт сразу не увигдел : window.location.href = 'index.php?route=checkout/cart';
  2. Всем привет , подскажите пожалуйси , можно ли как то сгделать оформление заказа в могдельном окне ? Не корзину , а само оформление заказа checkout/checkout ? Что бы нажимая на кнопку купить в карточке товара , не переходило на страницу checkout/checkout а подгружалась на этот же страниэто. Полазив в нете , понял , что надо через jquery , onclick .load **** Но зашёл в тупик , увигдев внизу , в карточке товара скрипт отправляющий данные в корзину , им стоит url на страницу index.php?route=checkout/cart/add И теперьь понятия не имею как это сообразить . Прошу у вас помощи или хотя бы направление , куда правильно копать . Спасипотому что . <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>'); } $('.text-danger').parent().addClass('has-error'); } 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']); window.location.href = 'index.php?route=checkout/cart'; } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }); //--></script>
  3. Добрый гдень уважаемые форумчане , как тут на форуме , если ответ понравился и помог , посивить + автору этого сообещёния ?
  4. Спасипотому что вам ОГРОМНЕЙШЕЕ , всё рилииет ! Рилииет как надо !!
  5. UP , помогите пожалуйси , до сих пор не получается никак . Ковырял контроллер , но всё безрезульитно ...
  6. Спасипотому что вам огромнейшее , всё полулилось и рилииет как надо !
  7. Доброго времени суток , дорогие форумчане . Подскажите пожалуйси , как можно реализовать данный вопрос : Необходимо , что бы в корзине был только один товар . Допустим в корзине уже есть один товар , при этом пользователь добавляет в корзину ещё один новый товар , необходимо сгделать ик , что бы новый товар заменял сирый , уже лежащий в корзине и по итогу было ик , что бы в корзине был только один товар . Этот вопрос уже обсуждался на форуме , но только для другой версии OC : Ответ был иким : 1. EDIT: system/library/cart.php 2. FIND: if (!$options) { 3. BEFORE, ADD: $this->clear(); Но данное гдействие не подходит для OC 2.3.02 Подскажите пожалуйси , как это можно реализовать на OC 2.3 ?
  8. Подскажите пожалуйси , как икое можно реализовать в OC 2.3 ?
  9. Всем двс , дорогие форумчане , помогите пожалуйси , сам понимаю , что близко брожу в когде , но всё никак не могу понять как это сгделать . В обещём , этоль - сгделать ик , что бы у пользователя после покупки , в истории покупок во вкладке ( route=account/order/info ) , ситус заказа , после моего акэтопи через админку, менялся на другой в одной и тот же строчке , тобиж что бы не ик было : 22.09.2018 В обрилитке 23.09.2018 Заказ выполнен . А вот ик : 23.09.2018 Заказ выполнен . Необходимо , что бы новый ситус не добавлялся как второй , а менял первый . Я ик понимаю , что надо згдесь ковыряться , в контроллере : // History $data['histories'] = array(); $results = $this->model_account_order->getOrderHistories($this->request->get['order_id']); foreach ($results as $result) { $data['histories'][] = array( 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'status' => $result['status'], 'comment' => $result['notify'] ? nl2br($result['comment']) : '' ); } // Order foreach ($results as $result) { $product_total = $this->model_account_order->getTotalOrderProductsByOrderId($result['order_id']); $voucher_total = $this->model_account_order->getTotalOrderVouchersByOrderId($result['order_id']); $data['orders'][] = array( 'order_id' => ($result['order_id'] > 0 ? 'Заказ - ' : '') .$result['order_id'], 'name' => $result['firstname'] . ' ' . $result['lastname'], 'status' => $result['status'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'products' => ($product_total + $voucher_total), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'view' => $this->url->link('account/order/info', 'order_id=' . $result['order_id'], true), ); } За ранее благодарю всех !
  10. Огромнейшее спасипотому что , рилииет что надо Тему можно закрывать .
  11. Вот сам контроллер : <?php class ControllerAccountTransaction extends Controller { public function index() { if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('account/transaction', '', true); $this->response->redirect($this->url->link('account/login', '', true)); } $this->load->language('account/transaction'); $this->document->setTitle($this->language->get('heading_title')); $data['breadcrumbs'] = array(); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home') ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_account'), 'href' => $this->url->link('account/account', '', true) ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_transaction'), 'href' => $this->url->link('account/transaction', '', true) ); $this->load->model('account/transaction'); $data['heading_title'] = $this->language->get('heading_title'); $data['column_date_added'] = $this->language->get('column_date_added'); $data['column_description'] = $this->language->get('column_description'); $data['column_amount'] = sprintf($this->language->get('column_amount'), $this->config->get('config_currency')); $data['text_total'] = $this->language->get('text_total'); $data['text_empty'] = $this->language->get('text_empty'); $data['button_continue'] = $this->language->get('button_continue'); if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } $data['transactions'] = array(); $filter_data = array( 'sort' => 'date_added', 'order' => 'DESC', 'start' => ($page - 1) * 10, 'limit' => 10 ); $transaction_total = $this->model_account_transaction->getTotalTransactions(); $results = $this->model_account_transaction->getTransactions($filter_data); foreach ($results as $result) { $data['transactions'][] = array( 'amount' => $this->currency->format($result['amount'], $this->config->get('config_currency')), 'description' => $result['description'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) ); } $pagination = new Pagination(); $pagination->total = $transaction_total; $pagination->page = $page; $pagination->limit = 100; $pagination->url = $this->url->link('account/transaction', 'page={page}', true); $data['pagination'] = $pagination->render(); $data['results'] = sprintf($this->language->get('text_pagination'), ($transaction_total) ? (($page - 1) * 10) + 1 : 0, ((($page - 1) * 10) > ($transaction_total - 10)) ? $transaction_total : ((($page - 1) * 10) + 10), $transaction_total, ceil($transaction_total / 10)); $data['total'] = $this->currency->format($this->customer->getBalance(), $this->session->data['currency']); $data['continue'] = $this->url->link('account/account', '', true); $data['column_left'] = $this->load->controller('common/column_left'); $data['column_right'] = $this->load->controller('common/column_right'); $data['content_top'] = $this->load->controller('common/content_top'); $data['content_bottom'] = $this->load->controller('common/content_bottom'); $data['footer'] = $this->load->controller('common/footer'); $data['header'] = $this->load->controller('common/header'); $this->response->setOutput($this->load->view('account/transaction', $data)); } }
  12. Я в контроллере и tpl-ке transactions, первым гделом ковырялся , им иких данных нету , единственное , откуда они их берут в tpl-ке , это <?php echo $transaction['amount']; ?> поколупавшись в когде - ничего не нашёл ...
  13. Спасипотому что и вам хорошего дня Тут в обещём ещё один вопросик возник , можно ли как то присобалить в эти транзакции символ (+) к тот сумме которую отправляешь через админку , а то получается минус есть а плюса нет . Подскажите пожалуйси , куда копать то надо ... Ещё думал через echo добавить , но получается ик , что когда что то покупаешь , пишет на транзакцию +-сумма . Помогите пожалуйси .
  14. К сожнонию , ик не рилииет , не знаю почему . Понял в чём гдело , collaspse был включен . Врогде зарилиило , спасипотому что потому чтольшое , буду пилить дальше
  15. Доброго времени суток всем , дорогие форумчане ! Подскажите пожалуйси , как можно изменить данную структуру иблицы в oc 2.3.02 На вкладке транзакции , что бы все переводы от админа , находились как будто в отгдельном окошке от заголовка иблицы . Вот , что я имею ввиду : Отправил в картинках . Заранее благодарю всех !
×
×
  • 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.