When I make some search on my store for some product I keep getting this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'price_index.min_price' in 'field list', query was:
SELECT FLOOR(((price_index.min_price +(e.min_price*CASE e.tax_class_id WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 ELSE 0 END)) * 1) / 10) + 1 AS `range`, COUNT(*) AS `count` FROM `catalog_product_index_price` AS `e` INNER JOIN `catalogsearch_result` AS `search_result` ON search_result.product_id=e.entity_id AND search_result.query_id='33' INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(3, 4) AND cat_index.category_id = '3' WHERE ( e.website_id = '1' ) AND ( e.customer_group_id = 0) AND ((e.min_price +(e.min_price*CASE e.tax_class_id WHEN 4 THEN 0.2300 WHEN 5 THEN 0.2300 ELSE 0 END)) IS NOT NULL) GROUP BY `range`
Before was working, I didn't upgrade anything... In database I searched for the table name "price_index
" and I didn't found it, but I guess that the query is made internally so I can't fix it... I already was checking the file Price.php
but I can't find any solution to fix this...
app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php
Any Solution?
Edit: Already reindex all things and still the same...
Edit2: Is the problem from the database or from the magento code?