wagood Posted February 12, 2009 Share Posted February 12, 2009 версия PrestShop 1.1.0.5версия Statssales 1.0В модуле Statssales для вывода графиков по умолчанию подписи выводятся на французком языке. Уж не знаю для чего это сделано, но тупо подставляется в sql запрос id_lang=2Решается так в modules/statssales.php :БЫЛО 1: public function hookAdminStatsModules($params) { $totals = $this->getTotals(); $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); $result = Db::getInstance()->ExecuteS(' SELECT osl.`name`, COUNT(oh.`id_order`) as total FROM `'._DB_PREFIX_.'order_state` os LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = 2) ... СТАЛО 1: public function hookAdminStatsModules($params) { $id_lang = $params['cookie']->id_lang; $totals = $this->getTotals(); $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); $result = Db::getInstance()->ExecuteS(' SELECT osl.`name`, COUNT(oh.`id_order`) as total FROM `'._DB_PREFIX_.'order_state` os LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.$id_lang.') ... БЫЛО 2: private function getStatesData() { $result = Db::getInstance()->ExecuteS(' SELECT osl.`name`, COUNT(oh.`id_order`) as total FROM `'._DB_PREFIX_.'order_state` os LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = 2) ... СТАЛО 2: private function getStatesData() { global $cookie; $id_lang = (isset($cookie->id_lang) ? intval($cookie->id_lang) : Configuration::get('PS_LANG_DEFAULT')); $result = Db::getInstance()->ExecuteS(' SELECT osl.`name`, COUNT(oh.`id_order`) as total FROM `'._DB_PREFIX_.'order_state` os LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.$id_lang.') ... Link to comment Share on other sites More sharing options...
megabait Posted March 26, 2009 Share Posted March 26, 2009 tut malenkie problemy s zapyatymi oni ne tam stoyali v poslednih strokah ispravlenij LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = .`$id_lang.) Link to comment Share on other sites More sharing options...
Recommended Posts