Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Ilya2223

Новачок
  
  • Публікації

    22
  • З нами

  • Відвідування

Відвідувачі профілю

Блок відвідувачів профілю відключений і не буде доступний широкому іншим користувачам

Ilya2223's Achievements

Explorer

Explorer (4/14)

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

Recent Badges

0

Репутація

  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(

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.