Unknown column 'category_shop.name' in 'order clause'<br /><br /><pre>
SELECT c.*, cl.`id_lang`, cl.`name`, cl.`description`, cl.`link_rewrite`, cl.`meta_title`, cl.`meta_keywords`, cl.`meta_description`
FROM `ps_category` c
INNER JOIN ps_category_shop category_shop
ON (category_shop.id_category = c.id_category AND category_shop.id_shop = 1)
LEFT JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = 2 AND cl.id_shop = 1 )
LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = c.`id_category`)
WHERE `id_parent` = 244
AND `active` = 1
AND cg.`id_group` =1
GROUP BY c.`id_category`
ORDER BY `level_depth` ASC, category_shop.`name` ASC</pre>
at line 769 in file classes/db/Db.php
764. if ($webservice_call && $errno) {
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. }
771.
772. throw new PrestaShopDatabaseException($this->getMsgError());
773. }
774. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
Argument [0] SELECT c.*, cl.`id_lang`, cl.`name`, cl.`description`, cl.`link_rewrite`, cl.`meta_title`, cl.`meta_keywords`, cl.`meta_description` FROM `ps_category` c INNER JOIN ps_category_shop category_shop ON (category_shop.id_category = c.id_category AND category_shop.id_shop = 1) LEFT JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = 2 AND cl.id_shop = 1 ) LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE `id_parent` = 244 AND `active` = 1 AND cg.`id_group` =1 GROUP BY c.`id_category` ORDER BY `level_depth` ASC, category_shop.`name` ASC
608. || stripos($sql, 'dumpfile') !== false
609. ) {
610. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
Argument [0] SELECT c.*, cl.`id_lang`, cl.`name`, cl.`description`, cl.`link_rewrite`, cl.`meta_title`, cl.`meta_keywords`, cl.`meta_description` FROM `ps_category` c INNER JOIN ps_category_shop category_shop ON (category_shop.id_category = c.id_category AND category_shop.id_shop = 1) LEFT JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = 2 AND cl.id_shop = 1 ) LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE `id_parent` = 244 AND `active` = 1 AND cg.`id_group` =1 GROUP BY c.`id_category` ORDER BY `level_depth` ASC, category_shop.`name` ASC
914. ' . Shop::addSqlAssociation('category', 'c') . '
915. LEFT JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = ' . (int) $idLang . ' ' . Shop::addSqlRestrictionOnLang('cl') . ')
916. ' . $sqlGroupsJoin . '
917. WHERE `id_parent` = ' . (int) $this->id . '
918. ' . ($active ? 'AND `active` = 1' : '') . '
919. ' . $sqlGroupsWhere . '
920. GROUP BY c.`id_category`
921. ORDER BY `level_depth` ASC, category_shop.`name` ASC');
922.
923. if (!empty($result)) {
924. foreach ($result as &$row) {
Argument [0] SELECT c.*, cl.`id_lang`, cl.`name`, cl.`description`, cl.`link_rewrite`, cl.`meta_title`, cl.`meta_keywords`, cl.`meta_description` FROM `ps_category` c INNER JOIN ps_category_shop category_shop ON (category_shop.id_category = c.id_category AND category_shop.id_shop = 1) LEFT JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = 2 AND cl.id_shop = 1 ) LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE `id_parent` = 244 AND `active` = 1 AND cg.`id_group` =1 GROUP BY c.`id_category` ORDER BY `level_depth` ASC, category_shop.`name` ASC
204. }
205.
206. // tagat fonction modifiée
207. protected function getTemplateVarSubCategories()
208. {
209. $subCategories = $this->category->getSubCategories($this->context->language->id);
210.
211. // Vérifier si $subCategories est un tableau
212. if (!is_array($subCategories)) {
213. // Si ce n'est pas un tableau, retourner un tableau vide
214. return array();
Argument [0] 2
123. $categoryVar = $filteredCategory['object'];
124. }
125.
126. $this->context->smarty->assign([
127. 'category' => $categoryVar,
128. 'subcategories' => $this->getTemplateVarSubCategories(),
129. ]);
130. }
131.
132. /**
133. * {@inheritdoc}
282. /**
283. * Starts the controller process (this method should not be overridden!).
284. */
285. public function run()
286. {
287. $this->init();
288. if ($this->checkAccess()) {
289. // setMedia MUST be called before postProcess
290. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
291. $this->setMedia();
292. }
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
35. }
36. }
37. // ~~end-pagecacheultimate~~ Do not remove this comment, pagecache will update it automatically
38.
39. require dirname(__FILE__).'/config/config.inc.php';
40. Dispatcher::getInstance()->dispatch();