swissup / module-search-mysql-legacy

102 stars 32 forks source link

Product sorting not working anymore #16

Closed jeroentiem closed 1 year ago

jeroentiem commented 1 year ago

After i select the mysql-legacy option the category product sorting is not working anymore, when i switch to elasticsearch 7 it's working again. I don't want to use es so if there is a solution for this.

iloa08 commented 1 year ago

Same here, waiting for any solution, thank you.

0m3r commented 1 year ago

I can't reproduce it on my Magento instance.

https://github.com/swissup/module-search-mysql-legacy/assets/412612/49e54c95-b084-4900-95de-dd07cf18bb49

Знімок екрана з 2023-05-23 14-21-48

Maybe you guys @jeroentiem @iloa08 use some third-party extensions for layered navigation. Give me more information plz

iloa08 commented 1 year ago

Thanks for watching. Could you do the same by adding special-price please ? (moreover, we can't see price of article on your video)

0m3r commented 1 year ago

What do you mean? Do you mean order by special price or product with special prices? Please send me your detailed explanation.

P.S. Sort by pricing work fine for me.

https://github.com/swissup/module-search-mysql-legacy/assets/412612/5fcbc081-bec4-414a-b045-3dc2153dbd44

iloa08 commented 1 year ago

Sorry for my english, so could you try to sort by price when you have special price in your listing.

0m3r commented 1 year ago

Work fine for me Знімок екрана з 2023-05-23 15-56-10

p.s. Don't forget to run re-index after adding a special price to a product

bin/magento indexer:reindex catalog_product_price
iloa08 commented 1 year ago

Could you please try with more articles with different discount.

Maybe a problem with tax+special price.

0m3r commented 1 year ago

Please provide step-by-step instructions to reproduce it.

iloa08 commented 1 year ago

Could you try with only special prices in the listing ?

Here are some examples for my part : OK - no special price : https://www.cycles-zanet.com/atelier/outillage.html OK - just one special price : https://www.cycles-zanet.com/vtc-velos-ville/vtc-electriques.html OK - special prices : https://www.cycles-zanet.com/electronique.html NOT OK : only special prices : https://www.cycles-zanet.com/promotions.html NOT OK - special prices : https://www.cycles-zanet.com/bonneterie/casques.html

Thanks.

0m3r commented 1 year ago

Unfortunately, I can't reproduce it.

https://github.com/swissup/module-search-mysql-legacy/assets/412612/14e88e9a-d506-4edc-8285-130864c38f8c

jeroentiem commented 1 year ago

I'm using Amasty layered navigation. Please use Position for sorting.

iloa08 commented 1 year ago

your store uses a custom "special price" attribute : no, the special price is the special price from MAGENTO 2 (class price-container price-final_price tax weee) you forget to run bin/magento index: reindex : no reindex is ok (check it one more time) you use a custom third-party module for navigation : this module does not change the order - even if this module is uninstall the problem is still here

You don't have try with only special prices in the listing (all products with a special price - with different discount)

Thank you.

0m3r commented 1 year ago

@iloa08 you need to debug it by yourself because I can't reproduce it. Find where your product collection apply sort params - Magento\Catalog\Block\Product\ProductList\Toolbar::setCollection what collection object uses var_dump(get_class($collection)); in my case, it's - Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection

@jeroentiem Sorry I don't support Amasty extensions, try to contact Amasty team