-
Posts
352 -
Joined
-
Last visited
Content Type
Profiles
Forums
Marketplace
Articles
FAQ
Our New
Store
Blogs
module__dplus_manager
Everything posted by abonnent
-
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Да, спасибо =) -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Спасибо =) Все понятно. А как в таком случае вывести не количество, а сумму (если оставить только один знак %) ? -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Нашел в чем дело. Как я и предполагал дело было в этом: $_['text_items'] = '%s товар(ов) - %s'; Подключался файл через модификатор, в котором был просто знак % -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
А, это только для php должно быть -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Эм, но если в языковом файле оставить только один % , то будет выводиться только количество -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
А как он разбирается на части? В смысле в языковом файле ведь узано: % товар(ов) % -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Это ясно. Думал он и общую сумму выводит -
количество товара и общая сумма в шапке
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Дело в том, что у меня в этой переменной только количество. Куда цена девается ума не приложу. -
Всем привет. Объясните, пожалуйста, как передается в шапку количество и общая стоимость товара? Количество понятно, за это отвечает эта строка: $('#cart > button').html('<span id="cart-total"><i class="fa fa-shopping-cart"></i> ' + json['total'] + '</span>'); А как передается общая сумма? Есть этот код: $('#cart > ul').load('index.php?route=common/cart/info ul li'); Но я не совсем понимаю как это работает.
-
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Спасибо. Заработало =) -
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
key - pavautosearch_module -
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
ой, простите) pavautosearch -
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
{"1":{"class":"autosearch","limit":"6","show_category":"0","show_image":"1","show_price":"1"}} -
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
не я делал этот модуль, но настройки его сохраняются именно там. Если этот модуль сделан как-то не так, то что нужно сделать, чтобы вытащить его настройки из этой сетки (oc_settings)? -
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Извините за глупость, но где это вставить? <?php class ControllerExtensionModulePavautosearch extends Controller { private $mdata = array(); public function index($setting){ echo '<div style="display:none">'; echo '<pre>'; print_r($setting); echo '</pre>'; echo '</div>'; // pavo 2.2 fix $this->load->language('extension/module/themecontrol'); $config_theme = $this->config->get('theme_default_directory'); $this->mdata['objlang'] = $this->language; $this->mdata['ourl'] = $this->url; $this->mdata['sconfig'] = $this->config; $this->mdata['themename'] = $config_theme; // pavo 2.2 fix static $module = 0; $this->load->language('extension/module/pavautosearch'); $this->load->model('tool/image'); $this->load->model('catalog/category'); $this->load->model('catalog/manufacturer'); $this->mdata['objlang'] = $this->language; if (file_exists('catalog/view/theme/' . $config_theme . '/stylesheet/pavautosearch.css')) { $this->document->addStyle('catalog/view/theme/' . $config_theme . '/stylesheet/pavautosearch.css'); } else { $this->document->addStyle('catalog/view/theme/default/stylesheet/pavautosearch.css'); } $this->mdata['additional_class'] = isset($setting['class'])?$setting['class']:''; $this->mdata['limit'] = isset($setting['limit'])?$setting['limit']:5; $this->mdata['show_category'] = isset($setting['show_category'])?$setting['show_category']:'1'; $this->mdata['show_image'] = isset($setting['show_image'])?$setting['show_image']:'1'; $this->mdata['show_price'] = isset($setting['show_price'])?$setting['show_price']:'1'; $this->mdata['categories'] = $this->mdata["manufacturers"] = array(); if($this->mdata['show_category']){ // 3 Level Category Search $this->mdata['categories'] = array(); $this->mdata['category_id'] = 0; $categories_1 = $this->model_catalog_category->getCategories(0); foreach ($categories_1 as $category_1) { $level_2_data = array(); $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']); foreach ($categories_2 as $category_2) { $level_3_data = array(); $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']); foreach ($categories_3 as $category_3) { $level_3_data[] = array( 'category_id' => $category_3['category_id'], 'name' => $category_3['name'], ); } $level_2_data[] = array( 'category_id' => $category_2['category_id'], 'name' => $category_2['name'], 'children' => $level_3_data ); } $this->mdata['categories'][] = array( 'category_id' => $category_1['category_id'], 'name' => $category_1['name'], 'children' => $level_2_data ); } } $this->mdata['module'] = $module++; return $this->load->view('extension/module/pavautosearch', $this->mdata); } public function autocomplete() { $json = array(); $this->load->language('product/category'); if (isset($this->request->get['filter_name']) || isset($this->request->get['filter_manufacturer_id']) || isset($this->request->get['filter_category_id'])) { $this->load->model('tool/image'); $this->load->model('catalog/product'); if (isset($this->request->get['filter_name'])) { $filter_name = $this->request->get['filter_name']; } else { $filter_name = ''; } if (isset($this->request->get['filter_category_id'])) { $filter_category_id = $this->request->get['filter_category_id']; } else { $filter_category_id = ''; } if (isset($this->request->get['description'])) { $description = $this->request->get['description']; } else { $description = ''; } if (isset($this->request->get['sub_category'])) { $sub_category = $this->request->get['sub_category']; } else { $sub_category = ''; } if (isset($this->request->get['limit'])) { $limit = $this->request->get['limit']; } else { $limit = 20; } if (isset($this->request->get['width'])) { $width = $this->request->get['width']; } else { $width = 100; } if (isset($this->request->get['height'])) { $height = $this->request->get['height']; } else { $height = 100; } $data = array( 'filter_name' => $filter_name, 'filter_tag' => $filter_name, 'filter_description' => $description, 'filter_sub_category' => $sub_category, 'filter_category_id' => $filter_category_id, 'start' => 0, 'limit' => $limit ); $results = $this->model_catalog_product->getProducts($data); $total = $this->model_catalog_product->getTotalProducts($data); foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $width, $height); } else { $image = false; } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']); } 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']); } else { $special = false; } if ($this->config->get('config_tax')) { $tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price'], $this->session->data['currency']); } else { $tax = false; } $json[] = array( 'total' => $total, 'product_id' => $result['product_id'], 'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')), 'model' => $result['model'], 'image' => $image, 'link' => $this->url->link('product/product','product_id='.$result['product_id']), 'special' => $special, 'tax' => $tax, 'price' => $price ); } } $this->response->setOutput(json_encode($json)); } } ?> это контроллер модуля. -
[Решено] Переменная settings
abonnent replied to abonnent's topic in Opencart 2.x: General questions
Не совсем понял что сделать. Это $this->config->get('mymodule_status'); добавить в контроллере модуля? -
Всем привет. Есть модуль, который получает некую переменную $setting , в этой переменной должны идти настройки модуля, которые находятся в сетке oc_setting. Настройки там есть, но в переменную они почему-то не поступают. Где можно посмотреть откуда она идет? Смотрю в других модулях, там точно также в ф-цию index() передается переменная $settings, но там все работает.
-
блин, у меня ошибка 500. в чем может быть дело?
-
Array ( [keywords] => Array ( [vouchers] => account/voucher [wishlist] => account/wishlist [my-account] => account/account [cart] => checkout/cart [checkout] => checkout/checkout [login] => account/login [logout] => account/logout [order-history] => account/order [newsletter] => account/newsletter [specials] => product/special [affiliates] => affiliate/account [gift-vouchers] => checkout/voucher [brands] => product/manufacturer [contact-us] => information/contact [request-return] => account/return/insert [sitemap] => information/sitemap [forgot-password] => account/forgotten [downloads] => account/download [returns] => account/return [transactions] => account/transaction [create-account] => account/register [compare-products] => product/compare [search] => product/search [edit-account] => account/edit [change-password] => account/password [address-book] => account/address [reward-points] => account/reward [edit-affiliate-account] => affiliate/edit [change-affiliate-password] => affiliate/password [affiliate-payment-options] => affiliate/payment [affiliate-tracking-code] => affiliate/tracking [affiliate-transactions] => affiliate/transaction [affiliate-logout] => affiliate/logout [affiliate-forgot-password] => affiliate/forgotten [create-affiliate-account] => affiliate/register [affiliate-login] => affiliate/login [add-return] => account/return/add [] => common/home [apple] => manufacturer_id=8 [test] => product_id=42 [about_us] => information_id=4 [laptop-notebook] => category_id=18 [macs] => category_id=46 [windows] => category_id=45 [component] => category_id=25 [mouse] => category_id=29 [monitor] => category_id=28 [test1] => category_id=35 [test2] => category_id=36 [printer] => category_id=30 [scanner] => category_id=31 [web-camera] => category_id=32 [tablet] => category_id=57 [software] => category_id=17 [smartphone] => category_id=24 [camera] => category_id=33 [mp3-players] => category_id=34 [test11] => category_id=43 [test12] => category_id=44 [test15] => category_id=47 [test16] => category_id=48 [test17] => category_id=49 [test18] => category_id=50 [test19] => category_id=51 [test20] => category_id=52 [test25] => category_id=58 [test21] => category_id=53 [test22] => category_id=54 [test23] => category_id=55 [test24] => category_id=56 [test4] => category_id=38 [test5] => category_id=37 [test6] => category_id=39 [test7] => category_id=40 [test8] => category_id=41 [test9] => category_id=42 [canon-eos-5d] => product_id=30 [htc-touch-hd] => product_id=28 [macbook] => product_id=43 [macbook-air] => product_id=44 [macbook-pro] => product_id=45 [nikon-d300] => product_id=31 [palm-treo-pro] => product_id=29 [product-8] => product_id=35 [samsung-galaxy-tab-10-1] => product_id=49 [samsung-syncmaster-941bw] => product_id=33 [sony-vaio] => product_id=46 [iphone] => product_id=40 [ipod-classic] => product_id=48 [ipod-nano] => product_id=36 [ipod-shuffle] => product_id=34 [ipod-touch] => product_id=32 [canon] => manufacturer_id=9 [htc] => manufacturer_id=5 [hewlett-packard] => manufacturer_id=7 [palm] => manufacturer_id=6 [sony] => manufacturer_id=10 [pc] => category_id=26 [mac] => category_id=27 [desktops] => category_id=20 [imac] => product_id=41 [hp-lp3065] => product_id=47 [delivery] => information_id=6 [privacy] => information_id=3 [terms] => information_id=5 ) [queries] => Array ( [account/voucher] => vouchers [account/wishlist] => wishlist [account/account] => my-account [checkout/cart] => cart [checkout/checkout] => checkout [account/login] => login [account/logout] => logout [account/order] => order-history [account/newsletter] => newsletter [product/special] => specials [affiliate/account] => affiliates [checkout/voucher] => gift-vouchers [product/manufacturer] => brands [information/contact] => contact-us [account/return/insert] => request-return [information/sitemap] => sitemap [account/forgotten] => forgot-password [account/download] => downloads [account/return] => returns [account/transaction] => transactions [account/register] => create-account [product/compare] => compare-products [product/search] => search [account/edit] => edit-account [account/password] => change-password [account/address] => address-book [account/reward] => reward-points [affiliate/edit] => edit-affiliate-account [affiliate/password] => change-affiliate-password [affiliate/payment] => affiliate-payment-options [affiliate/tracking] => affiliate-tracking-code [affiliate/transaction] => affiliate-transactions [affiliate/logout] => affiliate-logout [affiliate/forgotten] => affiliate-forgot-password [affiliate/register] => create-affiliate-account [affiliate/login] => affiliate-login [account/return/add] => add-return [common/home] => [manufacturer_id=8] => apple [product_id=42] => test [information_id=4] => about_us [category_id=18] => laptop-notebook [category_id=46] => macs [category_id=45] => windows [category_id=25] => component [category_id=29] => mouse [category_id=28] => monitor [category_id=35] => test1 [category_id=36] => test2 [category_id=30] => printer [category_id=31] => scanner [category_id=32] => web-camera [category_id=57] => tablet [category_id=17] => software [category_id=24] => smartphone [category_id=33] => camera [category_id=34] => mp3-players [category_id=43] => test11 [category_id=44] => test12 [category_id=47] => test15 [category_id=48] => test16 [category_id=49] => test17 [category_id=50] => test18 [category_id=51] => test19 [category_id=52] => test20 [category_id=58] => test25 [category_id=53] => test21 [category_id=54] => test22 [category_id=55] => test23 [category_id=56] => test24 [category_id=38] => test4 [category_id=37] => test5 [category_id=39] => test6 [category_id=40] => test7 [category_id=41] => test8 [category_id=42] => test9 [product_id=30] => canon-eos-5d [product_id=28] => htc-touch-hd [product_id=43] => macbook [product_id=44] => macbook-air [product_id=45] => macbook-pro [product_id=31] => nikon-d300 [product_id=29] => palm-treo-pro [product_id=35] => product-8 [product_id=49] => samsung-galaxy-tab-10-1 [product_id=33] => samsung-syncmaster-941bw [product_id=46] => sony-vaio [product_id=40] => iphone [product_id=48] => ipod-classic [product_id=36] => ipod-nano [product_id=34] => ipod-shuffle [product_id=32] => ipod-touch [manufacturer_id=9] => canon [manufacturer_id=5] => htc [manufacturer_id=7] => hewlett-packard [manufacturer_id=6] => palm [manufacturer_id=10] => sony [category_id=26] => pc [category_id=27] => mac [category_id=20] => desktops [product_id=41] => imac [product_id=47] => hp-lp3065 [information_id=6] => delivery [information_id=3] => privacy [information_id=5] => terms ) ) это все что есть
-
if ($route == 'product/category'){ if (!empty($this->cache_data['queries']['product/category'])){ $category_path = $this->cache_data['queries']['product/category'] . '/'; } else { $category_path = 'category/'; echo '<pre>'; print_r($this->cache_data); echo '</pre>'; } } else { $category_path = false; } вот это условие if (!empty($this->cache_data['queries']['product/category'])){ заведомо невыполнимо ведь, т.к. такого ключа нет. зачем же оно?
-
а в этом массиве $this->cache_data['queries'] у вас есть product/category ?
-
странно
-
if ($route == 'product/product'){ if (!empty($this->cache_data['queries']['product/product'])){ $category_path = '/' . $this->cache_data['queries']['product/product'] . '/'; } else { $category_path = 'product/'; } } else { $category_path = false; } при переходе на страницу с товаром пишет, что нет такой страницы =(
-
Вопрос. Урл изменил, но теперь пишет, что такой страницы нет. Это как обойти?
-
есть встроенный или какой-то сторонний?