Hola a todos
Hace poco nos dimos cuenta que la barra de busquedas de la tienda no mostraba resultados... es un PS 1.7.6.7 con plantilla warehouse a su ultima version.
Al activar el modo debug vemos este erros:
[PrestaShopDatabaseException]
Key 'id_product' doesn't exist in table 'product_attribute_shop'<br /><br /><pre>SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` manufacturer_name ,( SELECT SUM(weight) FROM prstshp_search_word sw LEFT JOIN prstshp_search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = 1 AND sw.id_shop = 1 AND si.id_product = p.id_product AND (sw.word LIKE '%moet%') ) position, DATEDIFF( p.`date_add`, DATE_SUB( "2020-08-27 00:00:00", INTERVAL 150 DAY ) ) > 0 new, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, IFNULL(product_attribute_shop.`id_product_attribute`,0) id_product_attribute FROM prstshp_product p INNER JOIN prstshp_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) INNER JOIN `prstshp_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 1 ) LEFT JOIN `prstshp_product_attribute_shop` product_attribute_shop FORCE INDEX (id_product) ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1) LEFT JOIN prstshp_stock_available stock ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 AND stock.id_shop_group = 0 ) LEFT JOIN `prstshp_manufacturer` m FORCE INDEX (PRIMARY) ON m.`id_manufacturer` = p.`id_manufacturer` LEFT JOIN `prstshp_image_shop` image_shop FORCE INDEX (id_product) ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1) LEFT JOIN `prstshp_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1) WHERE p.`id_product` IN (3718,4214,5271,5313,5585,5586,5587) GROUP BY product_shop.id_product ORDER BY position desc LIMIT 0,24</pre>
at line 769 in file classes/db/Db.php
DbCore->displayError - [line 385 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 613 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 374 - classes/Search.php] - [3 Arguments]
SearchCore::find - [line 85 - src/Adapter/Search/SearchProductSearchProvider.php] - [9 Arguments]
PrestaShop\PrestaShop\Adapter\Search\SearchProductSearchProvider->runQuery - [line 308 - classes/controller/ProductListingFrontController.php] - [2 Arguments]
ProductListingFrontControllerCore->getProductSearchVariables - [line 580 - classes/controller/ProductListingFrontController.php]
ProductListingFrontControllerCore->doProductSearch - [line 82 - controllers/front/listing/SearchController.php] - [2 Arguments]
SearchControllerCore->initContent - [line 292 - classes/controller/Controller.php]
ControllerCore->run - [line 515 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]
Es una tienda que se ha montado nueva pero que está importando datos de catalogo de un CRM por lo que sospecho que los del CRM han metido la pata. Pero aun así no tengo la certeza, en cualquier caso.... alguien podría echarnos una mano? 🙄
Gracias!!!