Unknown column 'controller' in 'where clause'<br /><br /><pre>SELECT type, id_value, filter_show_limit, filter_type FROM acjg_layered_category
WHERE controller = 'category'
AND id_category = 2845
AND id_shop = 1
GROUP BY `type`, id_value ORDER BY position 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.
608. }
609.
610. return $this->execute($sql, $use_cache);
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
56. if (empty($this->filters)) {
57. $this->filters = $this->database->executeS(
58. 'SELECT type, id_value, filter_show_limit, filter_type FROM ' . _DB_PREFIX_ . 'layered_category
59. WHERE controller = \'' . $query->getQueryType() . '\'
60. AND id_category = ' . ($query->getQueryType() == 'category' ? (int) $query->getIdCategory() : 0) . '
61. AND id_shop = ' . $idShop . '
62. GROUP BY `type`, id_value ORDER BY position ASC'
63. );
64. }
65.
66. return $this->filters;
258. }
259.
260. $searchFilters = [];
261.
262. // Get filters configured in module settings for the current query
263. $configuredFilters = $this->provider->getFiltersForQuery($query, $idShop);
264.
265. /*
266. * Parses submitted encoded facets from (URL) string into a nice array.
267. *
268. * Facets are set to the URL with a textual representation. This unfortunately does not
158.
159. /**
160. * Get currently selected filters. In the query, it's passed as encoded URL string,
161. * we make it an array. All filters in the URL that are no longer valid are removed.
162. */
163. $facetedSearchFilters = $this->filtersConverter->createFacetedSearchFiltersFromQuery($query);
164.
165. // Initialize the search mechanism
166. $context = $this->module->getContext();
167. $facetedSearch = $this->searchFactory->build($context);
168.
306.
307. // We're ready to run the actual query!
308.
309. /** @var ProductSearchResult $result */
310. $result = $provider->runQuery(
311. $context,
312. $query
313. );
314.
315. Hook::exec('actionProductSearchProviderRunQueryAfter', [
316. 'query' => $query,
14. $variables = $this->getAjaxProductSearchVariables();
15. if(!Configuration::get('STSN_REMOVE_PRODUCTS_VARIABLE'))
16. unset($variables['products']);
17. $this->ajaxDie(json_encode($variables));
18. } else {
19. $variables = $this->getProductSearchVariables();
20. $this->context->smarty->assign(array(
21. 'listing' => $variables,
22. ));
23. $this->setTemplate($template, $params, $locale);
24. }
143. ) {
144. $this->doProductSearch(
145. 'catalog/listing/category',
146. [
147. 'entity' => 'category',
148. 'id' => $this->category->id,
149. ]
150. );
151. }
152. }
153.
301. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
302. $this->initHeader();
303. }
304.
305. if ($this->viewAccess()) {
306. $this->initContent();
307. } else {
308. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
309. }
310.
311. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
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. }
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();