manishjoy / magento2-catalog-sortby

Free Magento 2 Extension to Add Advance Sorting Options (Popularity and Rating) to Catalog | TheCodingTutor
https://manishjoy.github.io/
13 stars 1 forks source link

Sort by rating is not working #1

Open magento1994 opened 4 years ago

magento1994 commented 4 years ago

2 exception(s): Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'rating_summary' in order clause is ambiguous, query was: SELECT e., cat_index.position AS cat_index_position, price_index.price, price_index.tax_class_id, price_index.final_price, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS minimal_price, price_index.min_price, price_index.max_price, price_index.tier_price, at_rating_summary.rating_summary, review_entity_summary., stock_status_index.stock_status AS is_salable FROM catalog_product_entity AS e INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=4 INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = '1' LEFT JOIN review_entity_summary AS at_rating_summary ON (at_rating_summary.entity_pk_value=e.entity_id) AND (at_rating_summary.entity_type = '1') AND (at_rating_summary.store_id = '1') LEFT JOIN review_entity_summary ON e.entity_id = review_entity_summary.entity_pk_value INNER JOIN cataloginventory_stock_status AS stock_status_index ON e.entity_id = stock_status_index.product_id INNER JOIN search_tmp_5e32b0aa1615b5_68557917 AS search_result ON e.entity_id = search_result.entity_id WHERE ((stock_status_index.stock_status = 1)) AND (e.created_in <= 1) AND (e.updated_in > 1) GROUP BY e.entity_id ORDER BY rating_summary desc, e.created_at desc, at_rating_summary.rating_summary ASC, e.entity_id DESC LIMIT 9 Exception #1 (PDOException): SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'rating_summary' in order clause is ambiguous

magento1994 commented 4 years ago

Magento version 2.3.2

upperclifftarunb commented 2 years ago

Any solution?