SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cl.additional_description' in 'field list'
at line 151 in file classes/db/DbPDO.php
146. protected function _query($sql)
147. {
148. try {
149. return $this->link->query($sql);
150. } catch (\PDOException $exception) {
151. throw new PrestaShopException($exception->getMessage(), (int) $exception->getCode(), $exception);
152. }
153. }
154.
155. /**
156. * Returns the next row from the result set.
372. {
373. if ($sql instanceof DbQuery) {
374. $sql = $sql->build();
375. }
376.
377. $this->result = $this->_query($sql);
378.
379. if (!$this->result && $this->getNumberError() == 2006) {
380. $this->connect();
381. $this->result = $this->_query($sql);
382. }
609. }
610.
611. return $this->execute($sql, $use_cache);
612. }
613.
614. $this->result = $this->query($sql);
615.
616. if (!$this->result) {
617. $result = false;
618. } else {
619. if (!$array) {
892. ' . Shop::addSqlAssociation('category', 'c') . '
893. LEFT JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = ' . (int) $idLang . ' ' . Shop::addSqlRestrictionOnLang('cl') . ')
894. ' . $sqlGroupsJoin . '
895. WHERE `id_parent` = ' . (int) $this->id . '
896. ' . ($active ? 'AND `active` = 1' : '') . '
897. ' . $sqlGroupsWhere . '
898. GROUP BY c.`id_category`
899. ORDER BY `level_depth` ASC, category_shop.`position` ASC');
900.
901. foreach ($result as &$row) {
902. $row['id_image'] = Tools::file_exists_cache($this->image_dir . $row['id_category'] . '.jpg') ? (int) $row['id_category'] : Language::getIsoById($idLang) . '-default';
295. public function recurseLiteCategTree($maxDepth = 3, $currentDepth = 0, $idLang = null, $excludedIdsArray = null, $format = 'default')
296. {
297. $idLang = null === $idLang ? Context::getContext()->language->id : (int) $idLang;
298.
299. $children = [];
300. $subcats = $this->getSubCategories($idLang, true);
301. if (($maxDepth == 0 || $currentDepth < $maxDepth) && count($subcats)) {
302. foreach ($subcats as $subcat) {
303. if (!$subcat['id_category']) {
304. break;
305. } elseif (!is_array($excludedIdsArray) || !in_array($subcat['id_category'], $excludedIdsArray)) {
54. $this->setTemplate('cms/sitemap');
55. }
56.
57. public function getCategoriesLinks()
58. {
59. return [Category::getRootCategory()->recurseLiteCategTree(0, 0, null, null, 'sitemap')];
60. }
61.
62. /**
63. * @return array
64. */
43. 'pages' => $this->trans('Pages', [], 'Shop.Theme.Catalog'),
44. 'links' => [
45. 'offers' => $this->getOffersLinks(),
46. 'pages' => $this->getPagesLinks(),
47. 'user_account' => $this->getUserAccountLinks(),
48. 'categories' => $this->getCategoriesLinks(),
49. ],
50. ]
51. );
52.
53. parent::initContent();
314. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
315. $this->initHeader();
316. }
317.
318. if ($this->viewAccess()) {
319. $this->initContent();
320. } else {
321. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
322. }
323.
324. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
505.
506. // Execute hook dispatcher
507. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
508.
509. // Running controller
510. $controller->run();
511.
512. // Execute hook dispatcher after
513. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
514. } catch (PrestaShopException $e) {
515. $e->displayMessage();
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();