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

Ilya2223

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

    22
  • З нами

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

Усі публікації користувача Ilya2223

  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(
  12. Есть ocStore 3.0.2.0 с включенным SeoPro, подскажите что надо допилить в контроллере seopro что бы ссылки на товары содержали только последнюю категорию вложенности сейчас так: site.ru/category/subcategory/ТОВАР надо так: site.ru/subcategory/ТОВАР
  13. очень плохо разбираюсь в php вот нашел в моделе product.php нужную функцию: public function getProductRelated($product_id) { $product_data = array(); $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_related pr LEFT JOIN " . DB_PREFIX . "product p ON (pr.related_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pr.product_id = '" . (int)$product_id . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"); foreach ($query->rows as $result) { $product_data[$result['related_id']] = $this->getProduct($result['related_id']); } return $product_data; } подскажите, что в ней подправить что бы показывало стандартные рекомендуемые товары по артикулу?
  14. У меня есть много товаров с одинаковым артикулом, подскажите какое-то решение или модуль для автоматического вывода похожих товаров на основе артикула. То есть если артикул одинаковый, то мы выводим их друг у друга в похожих товарах) Как-то так)
  15. Подскажите как сделать вывод общей суммы всех заказов покупателя в личном кабинете account.tpl?
  16. Использую ocStore 3.0.2.0 и модуль simple checkout. Установил сегодня модуль Retailcrm, и теперь на странице оформления заказа выдает такое: Notice: Undefined index: country_id in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 146 Notice: Undefined index: zone_id in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 147 Notice: Undefined index: address_1 in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 150 Notice: Undefined index: address_2 in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 151 Notice: Undefined index: city in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 152 Notice: Undefined index: postcode in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 153 Notice: Undefined index: iso_code_2 in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 154 Notice: Undefined index: name in /var/www/site.ru/catalog/controller/extension/module/retailcrm.php on line 155 Данное сообщение говорит о том, что некорректно заполняются параметры адреса С меня тому кто поможет решить эту проблему плюсик в профиль и 500р на счет яндекс денег. Dот код из файла на который ругается: /** * Create customer on event * * @param int $customerId customer identificator * * @return void */ public function customer_create($parameter1, $parameter2 = null, $parameter3 = null) { $this->load->model('account/customer'); $this->load->model('localisation/country'); $this->load->model('localisation/zone'); $customerId = $parameter3; $customer = $this->model_account_customer->getCustomer($customerId); if ($this->request->post) { $country = $this->model_localisation_country->getCountry($this->request->post['country_id']); $zone = $this->model_localisation_zone->getZone($this->request->post['zone_id']); $customer['address'] = array( 'address_1' => $this->request->post['address_1'], 'address_2' => $this->request->post['address_2'], 'city' => $this->request->post['city'], 'postcode' => $this->request->post['postcode'], 'iso_code_2' => $country['iso_code_2'], 'zone' => $zone['name'] ); } if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/customer.php')) { $this->load->model('extension/retailcrm/custom/customer'); $this->model_extension_retailcrm_custom_customer->sendToCrm($customer, $this->retailcrmApiClient); } else { $this->load->model('extension/retailcrm/customer'); $this->model_extension_retailcrm_customer->sendToCrm($customer, $this->retailcrmApiClient); } }

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

Important Information

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