Unknown column 'product_shop.id_image' in 'group statement'SELECT DISTINCT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`link_rewrite`, pl.`name`,
MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` manufacturer_name, 1 position,
DATEDIFF(
p.`date_add`,
DATE_SUB(
NOW(),
INTERVAL 1000 DAY
)
) > 0 new
FROM `ps_product` p
INNER JOIN `ps_product_lang` pl ON (
p.`id_product` = pl.`id_product`
AND pl.`id_lang` = 1 AND pl.id_shop = 1
)
LEFT JOIN ps_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1)
LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN ps_image_shop image_shop
ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1)
LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 1)
LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`)
LEFT JOIN `ps_product_tag` pt ON (p.`id_product` = pt.`id_product`)
LEFT JOIN `ps_tag` t ON (pt.`id_tag` = t.`id_tag` AND t.`id_lang` = 1)
LEFT JOIN `ps_category_product` cp ON (cp.`id_product` = p.`id_product`)
LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = cp.`id_category`)
LEFT JOIN `ps_category_shop` cs ON (cg.`id_category` = cs.`id_category` AND cs.`id_shop` = 1)
LEFT
JOIN ps_stock_available stock
ON (stock.id_product = p.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 )
WHERE product_shop.`active` = 1
AND cs.`id_shop` = 1
AND cg.`id_group` = 1
AND t.`name` LIKE '%pierre%'
GROUP BY product_shop.id_image
ORDER BY position DESC
LIMIT 90,30
at line 607 in file classes/db/Db.php
601. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
602. }
603. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
604. {
605. if ($sql)
606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
607. throw new PrestaShopDatabaseException($this->getMsgError());
608. }
609. }
610.
611. /**
301. if ($sql instanceof DbQuery)
302. $sql = $sql->build();
303.
304. $this->result = $this->_query($sql);
305. if (_PS_DEBUG_SQL_)
306. $this->displayError($sql);
307. return $this->result;
308. }
309.
310. /**
311. * Execute an INSERT query
Argument [0] SELECT DISTINCT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`link_rewrite`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` manufacturer_name, 1 position, DATEDIFF( p.`date_add`, DATE_SUB( NOW(), INTERVAL 1000 DAY ) ) > 0 new FROM `ps_product` p INNER JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 1 ) LEFT JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN ps_image_shop image_shop ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1) LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) LEFT JOIN `ps_product_tag` pt ON (p.`id_product` = pt.`id_product`) LEFT JOIN `ps_tag` t ON (pt.`id_tag` = t.`id_tag` AND t.`id_lang` = 1) LEFT JOIN `ps_category_product` cp ON (cp.`id_product` = p.`id_product`) LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = cp.`id_category`) LEFT JOIN `ps_category_shop` cs ON (cg.`id_category` = cs.`id_category` AND cs.`id_shop` = 1) LEFT JOIN ps_stock_available stock ON (stock.id_product = p.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 ) WHERE product_shop.`active` = 1 AND cs.`id_shop` = 1 AND cg.`id_group` = 1 AND t.`name` LIKE '%pierre%' GROUP BY product_shop.id_image ORDER BY position DESC LIMIT 90,30
476. {
477. $this->last_cached = true;
478. return $result;
479. }
480.
481. $this->result = $this->query($sql);
482. if (!$this->result)
483. return false;
484.
485. $this->last_cached = false;
486. if (!$array)
Argument [0] SELECT DISTINCT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`link_rewrite`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` manufacturer_name, 1 position, DATEDIFF( p.`date_add`, DATE_SUB( NOW(), INTERVAL 1000 DAY ) ) > 0 new FROM `ps_product` p INNER JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 1 ) LEFT JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN ps_image_shop image_shop ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1) LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) LEFT JOIN `ps_product_tag` pt ON (p.`id_product` = pt.`id_product`) LEFT JOIN `ps_tag` t ON (pt.`id_tag` = t.`id_tag` AND t.`id_lang` = 1) LEFT JOIN `ps_category_product` cp ON (cp.`id_product` = p.`id_product`) LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = cp.`id_category`) LEFT JOIN `ps_category_shop` cs ON (cg.`id_category` = cs.`id_category` AND cs.`id_shop` = 1) LEFT JOIN ps_stock_available stock ON (stock.id_product = p.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 ) WHERE product_shop.`active` = 1 AND cs.`id_shop` = 1 AND cg.`id_group` = 1 AND t.`name` LIKE '%pierre%' GROUP BY product_shop.id_image ORDER BY position DESC LIMIT 90,30
658. WHERE id_customer = '.(int)$id_customer.')').'
659. AND t.`name` LIKE \'%'.pSQL($tag).'%\'
660. GROUP BY product_shop.id_image
661. ORDER BY position DESC'.($orderBy ? ', '.$orderBy : '').($orderWay ? ' '.$orderWay : '').'
662. LIMIT '.(int)(($pageNumber - 1) * $pageSize).','.(int)$pageSize;
663. if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql))
664. return false;
665.
666. return Product::getProductsProperties((int)$id_lang, $result);
667. }
668. }
Argument [0] SELECT DISTINCT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`link_rewrite`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` manufacturer_name, 1 position, DATEDIFF( p.`date_add`, DATE_SUB( NOW(), INTERVAL 1000 DAY ) ) > 0 new FROM `ps_product` p INNER JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 1 ) LEFT JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_image` i ON (i.`id_product` = p.`id_product`) LEFT JOIN ps_image_shop image_shop ON (image_shop.id_image = i.id_image AND image_shop.id_shop = 1 AND image_shop.cover=1) LEFT JOIN `ps_image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = 1) LEFT JOIN `ps_manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) LEFT JOIN `ps_product_tag` pt ON (p.`id_product` = pt.`id_product`) LEFT JOIN `ps_tag` t ON (pt.`id_tag` = t.`id_tag` AND t.`id_lang` = 1) LEFT JOIN `ps_category_product` cp ON (cp.`id_product` = p.`id_product`) LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = cp.`id_category`) LEFT JOIN `ps_category_shop` cs ON (cg.`id_category` = cs.`id_category` AND cs.`id_shop` = 1) LEFT JOIN ps_stock_available stock ON (stock.id_product = p.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 ) WHERE product_shop.`active` = 1 AND cs.`id_shop` = 1 AND cg.`id_group` = 1 AND t.`name` LIKE '%pierre%' GROUP BY product_shop.id_image ORDER BY position DESC LIMIT 90,30
101. }
102. else if (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag))
103. {
104. $nbProducts = (int)(Search::searchTag($this->context->language->id, $tag, true));
105. $this->pagination($nbProducts);
106. $result = Search::searchTag($this->context->language->id, $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay);
107. Hook::exec('actionSearch', array('expr' => $tag, 'total' => count($result)));
108. $this->context->smarty->assign(array(
109. 'search_tag' => $tag,
110. 'products' => $result, // DEPRECATED (since to 1.4), not use this: conflict with block_cart module
111. 'search_products' => $result,
Argument [0] 1 Argument [1] pierre Argument [2] Argument [3] 4 Argument [4] 30 Argument [5] Argument [6]
161.
162. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
163. $this->initHeader();
164.
165. if ($this->viewAccess())
166. $this->initContent();
167. else
168. $this->errors[] = Tools::displayError('Access denied.');
169.
170. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))
171. $this->initFooter();
343. // Execute hook dispatcher
344. if (isset($params_hook_action_dispatcher))
345. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
346.
347. // Running controller
348. $controller->run();
349. }
350. catch (PrestaShopException $e)
351. {
352. $e->displayMessage();
353. }
22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23. * International Registered Trademark & Property of PrestaShop SA
24. */
25.
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();
28.