steve07
Пользователь-
Постов
22 -
Зарегистрирован
-
Посещение
Информация о steve07
Посетители профиля
Блок последних пользователей отключён и не показывается другим пользователям.
Достижения steve07
-
тут все ок Array ( [filter_category_id] => 61 [filter_filter] => [sort] => p.sort_order [order] => ASC [start] => 0 [limit] => 10000 ) в results соответственно попадают все товары из категории id=61. А как получить массив с отфильтрованным списком никак не пойму. Помогите, пожалуйста. функция экспорта в PDF
-
Передать price и total товара в Simple Opencart 2.3
steve07 опубликовал тема в Доработка Функционала
На странице товара происходит расчет цены товара в зависимости от количества выбранных дней. Формула на странице товара считает все как надо. Необходимо, чтобы в модуль simple передавалась эта цена и итог товара, ну и соответственно оформлялся заказ как надо. ocstore 2.3 -
Есть календарь на сайте для выбора промежутка дат (суток) для бронирования определенного товара (date range picker js). Необходимо сделать запрет выбора промежутка дат в одни сутки, т.е.: при заказе с ПТ на СБ или с СБ на ВС должен добавляться один день в календаре, т.е запретить бронировать на одни сутки в эти дни недели, а также вывести сообщение-предупреждение об этом событии. От вас жду стоимость такой доработки. Сроки 1-3 дня.
-
не, наоборот, чтобы и маска была для ручного ввода, а также с помощью календаря выбирали дату. Сейчас когда с календаря дату выбирают, она передается в инпут, но сразу меняется на маску (_ _ _ _-_ _-_ _)
-
Есть инпут, к которому привязан airDatapicker. При выборе даты в календаре маска заменяет выбранную дату. Как можно поправить эту проблему? <div class="form-group required"> <label class="col-sm-4 col-xs-12 control-label" for="input-date"><?php echo $entry_data; ?></label> <div class="col-sm-8 col-xs-12"> <input type="text" name="date" value="<?php echo $date; ?>" id="input-date" class="form-control datecalendar" /> <div class="text-danger" id="error_date"></div> </div> </div> <script type="text/javascript"> $(function(){ $(".datecalendar").datepicker( { dateFormat: 'yyyy-mm-dd' } ).mask('9999-99-99'); }); </script>
-
Добрый день! Стоит задача, не создавая категории с урлом "shop", чтобы при переходе в любую из категорий в адрес подставлялось "shop/": site.ru/shop/category1 site.ru/shop/category2/product и т.д. может есть уже готовые решения?
-
как получить отфильтрованный массив товаров? Делаю со страницы категории экспорт товаров в PDF формат, в pdf попадают все товары if ($category_info) { /*// OCFilter start if (isset($this->request->get['filter_ocfilter'])) { $filter_ocfilter = $this->request->get['filter_ocfilter']; } else { $filter_ocfilter = ''; } // OCFilter end*/ if (isset($this->request->get['filter'])) { $filter = $this->request->get['filter']; } else { $filter = ''; } if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } if (isset($this->request->get['limit'])) { $limit = (int)$this->request->get['limit']; } else { $limit = $this->config->get($this->config->get('config_theme') . '_product_limit'); } require('system/library/mpdf/mpdf.php'); $data['heading_title'] = $category_info['name']; $data['text_refine'] = $this->language->get('text_refine'); $data['text_empty'] = $this->language->get('text_empty'); $data['text_quantity'] = $this->language->get('text_quantity'); $data['text_manufacturer'] = $this->language->get('text_manufacturer'); $data['text_model'] = $this->language->get('text_model'); $data['text_price'] = $this->language->get('text_price'); $data['products'] = array(); $filter_data = array( 'filter_category_id' => $category_id, 'filter_filter' => $filter, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $limit, 'limit' => 10000 ); /*// OCFilter start $filter_data['filter_ocfilter'] = $filter_ocfilter; // OCFilter end*/ // OCFilter start if ($this->registry->get('ocfilter') && $this->ocfilter->startup() && $this->ocfilter->api->useSubCategory() && $this->ocfilter->api->isSelected() && empty($filter_data['filter_sub_category'])) { $filter_data['filter_sub_category'] = true; } // OCFilter end $product_total = $this->model_catalog_product->getTotalProducts($filter_data); $results = $this->model_catalog_product->getProducts($filter_data); // Unit of measure → $this->load->model('extension/module/unit_of_measure'); $product_ids = array(); foreach ($results as $result) { $product_ids[] = $result['product_id']; } $units_result = $this->model_extension_module_unit_of_measure->getUnits($product_ids); // ← Unit of measure foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height')); } else { $image = $this->model_tool_image->resize('placeholder.png', $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height')); } if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) { $price = $result['price']; } else { $price = false; } if ((float)$result['special']) { $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']); if ($this->currency->has($this->config->get('config_currency2')) && ($this->config->get('config_currency2') != $this->session->data['currency'])) { $special .= ' (' . $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->config->get('config_currency2')) . ')'; } } else { $special = false; } $data['products'][] = array( 'unit_of_measure' => isset($units_result[$result['product_id']]) ? html_entity_decode($units_result[$result['product_id']], ENT_QUOTES, 'UTF-8') : '', 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'model' => $result['model'], 'collection' => $result['collection'], 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']), 'price' => (int)$price . ' руб', 'special' => $special, 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url) ); } // $template = 'product/category'; //$this->load->library('mpdf/mpdf'); $headerHTML = ' <div style="float: left; width: 340px; text-align: left"> <a target="_blank" href="' . HTTPS_SERVER . '"><img style="max-width:100%;max-height:180px" src="/image/'.$this->config->get('config_logo').'" /></a> </div> <div style="float: right; width: 340px; text-align: right; color: #808180"> ' . nl2br($this->config->get('config_address')) . '<br/> ' . $this->config->get('config_telephone') . '<br/> ' . $this->config->get('config_email') . '<br/> <a style="color:blue; text-decoration:none;" target="_blank" href="' . HTTPS_SERVER . '">' . HTTPS_SERVER . '</a> </div> <div class="clear"></div> <hr> '; //print_r($this->config); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category_price.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/category_price.tpl'; } else { $this->template = 'default/template/product/category_price.tpl'; } $today = date("d.m.Y"); $mpdf = new mPDF('utf-8', 'A4', 7, 'Helvetica', 20, 5, 35, 5); $mpdf->name = $category_info['name'] . '.pdf'; $mpdf->SetHTMLHeader($headerHTML); $mpdf->WriteHTML($this->load->view('product/category_price.tpl', $data)); $mpdf->Output('Прайс_' . $today . '.pdf', 'D'); }
-
Здравствуйте! Накидал немного функционал в "локализация" -> "Адрес магазина" выбирается в каждом магазине федеральный округ. Все используемые округа я вывел программно в виде табов. А как раскидать сами магазины по этим табам? возможно как-то привязаться по id федерального округа? <?php if ($all_FO) { ?> <ul class="nav nav-tabs"> <?php foreach($all_FO as $fo) { ?> <li id="fo_<?php echo $fo['fo_id']; ?>"> <a href="#fo-<?php echo $fo['fo_id']; ?>" data-toggle="tab"><?php echo $fo['fo_name']; ?></a></li> <?php } ?> </ul> <?php } ?> <?php if ($locations) { ?> <div class="tab-content"> <?php foreach ($locations as $location) { ?> <div id="fo-<?php echo $location['federal_okrug_id']; ?>" class="location_list tab-pane fade active in"> <div class="location_item"> <div class="location_name"> <div data-objectid="<?php echo $location['location_id']; ?>" class="location_map"><span>Показать на карте <svg class="icon_svg"><use xlink:href="image/catalog/sprite.svg#treugol"></use></svg></span><svg class="icon_svg"><use xlink:href="image/catalog/sprite.svg#map_icon"></use></svg></div> <a href="<?php echo $location['href']; ?>"><?php echo $location['name']; ?></a> </div> <div class="location_address"><?php echo $location['address']; ?></div> </div> </div> <?php } ?> </div> <?php } ?>
-
if(isset($parts[1])) { if(isset($item['russian_tracking_no']) && isset($query_order->row['payment_country_id']) && $query_order->row['payment_country_id'] == 176 && empty($query_order_nrsdek->row['nr_sdek']) && $checks[$item['russian_tracking_no']] != '1') { $this->setOrderStatus($parts[0],$item['russian_tracking_no']); $this->log->write('СТАТУС ОБНОВЛЕН! Письмо (заказ '. $parts[0] . ') отправлено на ' . $email); $checks[$item['russian_tracking_no']] = '1'; } else { $this->log->write('Письмо (заказ '. $parts[0] . ') НЕ отправлено'); } } Этот код у меня выполняется в цикле, получаю из учетной системы по API данные (трек номер) на каждую позицию (лот) в заказе . Как правило, трек номер один и тот же на все товары в заказе, но бывает что и разные. Тем самым мне надо сделать проверку, чтобы при обновлении трек номера у одной позиции в заказе письмо отправлялось, а при обновлении у следующих позиций письма уже не отправлялись. Так вот, я сделал проверку, $checks[$item['russian_tracking_no']] != '1', и в конце цикла я присваиваю этой переменной значение 1. Но при первом проходе в логи валится ошибка: как мне правильно сделать проверку или переписать условие?