TransWikia.com

How to sort by popularity in magento 2 product list?

Magento Asked on February 10, 2021

I want to sort products by popularity and discount(high to low).

How can I achieve?

One Answer

You can use native table for select popularity and discount:

report_viewed_product_index - products popularity (SUM(index_id) GROUP BY product_id)

catalog_product_index_price - discount = final_price - price

Answered by Alex on February 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP