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

Ilya2223

Новичок
  
  • Posts

    22
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ilya2223's Achievements

Explorer

Explorer (4/14)

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

Recent Badges

0

Reputation

  1. вопрос удалось решить добавил в могдель $query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.shipping_address_1, o.currency_code, o.currency_value FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_status os ON (o.order_status_id = os.order_status_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.store_id = '" . (int)$this->config->get('config_store_id') . "' AND os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit); а именно добавил o.shipping_address_1,
  2. Подскажите как вывести адрес досивки в /catalog/view/theme/default/template/account/order_list.tpl ? Там выводится по умолчанию икое <?php if ($orders) { ?> <div class="table-responsive"> <table class="table table-bordered table-hover"> <thead> <tr> <td class="text-right"><?php echo $column_order_id; ?></td> <td class="text-left"><?php echo $column_customer; ?></td> <td class="text-right"><?php echo $column_product; ?></td> <td class="text-left"><?php echo $column_status; ?></td> <td class="text-right"><?php echo $column_total; ?></td> <td class="text-left"><?php echo $column_date_added; ?></td> <td></td> </tr> </thead> <tbody> <?php foreach ($orders as $order) { ?> <tr> <td class="text-right">#<?php echo $order['order_id']; ?></td> <td class="text-left"><?php echo $order['name']; ?></td> <td class="text-right"><?php echo $order['products']; ?></td> <td class="text-left"><?php echo $order['status']; ?></td> <td class="text-right"><?php echo $order['total']; ?></td> <td class="text-left"><?php echo $order['date_added']; ?></td> <td class="text-right"><a href="<?php echo $order['view']; ?>" data-toggle="tooltip" title="<?php echo $button_view; ?>" class="btn btn-info"><i class="fa fa-eye"></i></a></td> </tr> <?php } ?> </tbody> </table> </div> <div class="row"> <div class="col-sm-6 text-left"><?php echo $pagination; ?></div> <div class="col-sm-6 text-right"><?php echo $results; ?></div> </div> <?php } else { ?> <p><?php echo $text_empty; ?></p> <?php } ?> Версия движка Ocstore 2.3
  3. @LTRay у меня почти нет опыи с php, ик как я версильщик( буду очень благодарен за готовой код вместо тысяли вопросов))
  4. я брал код GetList из catalog/controller/account/address.php им нет return вот все что им есть protected function getList() { $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('heading_title'), 'href' => $this->url->link('account/address', '', true) ); $data['heading_title'] = $this->language->get('heading_title'); $data['text_address_book'] = $this->language->get('text_address_book'); $data['text_empty'] = $this->language->get('text_empty'); $data['button_new_address'] = $this->language->get('button_new_address'); $data['button_edit'] = $this->language->get('button_edit'); $data['button_delete'] = $this->language->get('button_delete'); $data['button_back'] = $this->language->get('button_back'); if (isset($this->error['warning'])) { $data['error_warning'] = $this->error['warning']; } else { $data['error_warning'] = ''; } if (isset($this->session->data['success'])) { $data['success'] = $this->session->data['success']; unset($this->session->data['success']); } else { $data['success'] = ''; } $data['addresses'] = array(); $results = $this->model_account_address->getAddresses(); foreach ($results as $result) { if ($result['address_format']) { $format = $result['address_format']; } else { $format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}'; } $find = array( '{firstname}', '{lastname}', '{company}', '{address_1}', '{address_2}', '{city}', '{postcode}', '{zone}', '{zone_code}', '{country}' ); $replace = array( 'firstname' => $result['firstname'], 'lastname' => $result['lastname'], 'company' => $result['company'], 'address_1' => $result['address_1'], 'address_2' => $result['address_2'], 'city' => $result['city'], 'postcode' => $result['postcode'], 'zone' => $result['zone'], 'zone_code' => $result['zone_code'], 'country' => $result['country'] ); $data['addresses'][] = array( 'address_id' => $result['address_id'], 'address' => str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format)))), 'update' => $this->url->link('account/address/edit', 'address_id=' . $result['address_id'], true), 'delete' => $this->url->link('account/address/delete', 'address_id=' . $result['address_id'], true) ); } $data['add'] = $this->url->link('account/address/add', '', true); $data['back'] = $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/address_list', $data)); }
  5. Подскажите как вывести список адресов в account.tpl? В контроллере account.php: После: $this->load->language('account/account'); Всивил икое: $this->load->model('account/address'); $this->getList(); И После функции public function country() { всивил икое: protected function getList() { $data['addresses'] = array(); $results = $this->model_account_address->getAddresses(); foreach ($results as $result) { if ($result['address_format']) { $format = $result['address_format']; } else { $format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}'; } $find = array( '{firstname}', '{lastname}', '{company}', '{address_1}', '{address_2}', '{city}', '{postcode}', '{zone}', '{zone_code}', '{country}' ); $replace = array( 'firstname' => $result['firstname'], 'lastname' => $result['lastname'], 'company' => $result['company'], 'address_1' => $result['address_1'], 'address_2' => $result['address_2'], 'city' => $result['city'], 'postcode' => $result['postcode'], 'zone' => $result['zone'], 'zone_code' => $result['zone_code'], 'country' => $result['country'] ); $data['addresses'][] = array( 'address_id' => $result['address_id'], 'address' => str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format)))), 'update' => $this->url->link('account/address/edit', 'address_id=' . $result['address_id'], true), 'delete' => $this->url->link('account/address/delete', 'address_id=' . $result['address_id'], true) ); } } В файле account.tpl всивил икое: <?php if ($addresses) { ?> <div class="table-responsive"> <table class="table table-bordered table-hover"> <?php foreach ($addresses as $result) { ?> <tr> <td class="text-left"><?php echo $result['address']; ?></td> <td class="text-right"><a href="<?php echo $result['update']; ?>" class="btn btn-info"><?php echo $button_edit; ?></a> <a href="<?php echo $result['delete']; ?>" class="btn btn-danger"><?php echo $button_delete; ?></a></td> </tr> <?php } ?> </table> </div> <?php } else { ?> <p><?php echo $text_empty; ?></p> <?php } ?> В итоге получаю икую ошибку: Notice: Undefined variable: addresses in /home/devs/site.ru/dev/catalog/view/theme/applemagic/template/account/account.tpl on line 40 Notice: Undefined variable: text_empty in /home/devs/site.ru/dev/catalog/view/theme/applemagic/template/account/account.tpl on line 52 Что мог упустить? С меня за помощь плюсик к рейтингу и огромное спасипотому что!)
  6. Подскажите как сгделать вывод партнерской ссылки не только аккауни партнера но и простым зарегенным покупателям? Синдартно в opencart вигдеть партнерскую ссылку могут только партнеры у себя в кабинете Простые зарегистрированные покупатели в партнерской программе участвовать не могут.. есть какие то модули или решения для икой задали?
  7. сейчас подумал - логично) без авторизации не полулится отслеживать партнеров.. тему можно закрыть
  8. Подскажите, как сгделать в ocstore 2.3 вывод рефферальной ссылки без авторизации в личном кабинете партнера? что бы человек жал на разгдел "партнерка" и ему сразу давало партнерскую ссылку возможно есть икие модули готовые.. просто синдартно нужно обязательно региться в кабинете партнера
  9. Например, не 1278, а 1300. Не 3515, а 3600. И т.д икое округление нужно
  10. можете плз показать как это корректно всивить сюда? $string .= number_format($amount, (int)$decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point'));
  11. Подскажите что тут заменить что бы этона округлялась до сотни? /system/library/cart/currency.php $string .= number_format($amount, (int)$decimal_place, $this->language->get('decimal_point'), $this->language->get('thousand_point')); для 1.5 вигдел икое решение но оно не рилииет на 2.3(

×
×
  • 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.