vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
19 stars 13 forks source link

Price sorting doesn't work at the end on Category page #425

Open bohdan-karapet opened 3 years ago

bohdan-karapet commented 3 years ago

Current behavior

Products at the end on Category page are not sorted by price.

Expected behavior

All products should be sorted properly.

Steps to reproduce the issue

1) go to https://demo.vuestorefront.io/default-category-2 2) pick sorting "Price: Low to high" 3) scroll to the end of products list (after last products lazy load)

Version of Vue Storefront

Can you handle fixing this bug by yourself?

Which Release Cycle state this refers to? Info for developer. (doesn't apply to Next)

Pick one option.

Environment details

Additional information

lsliwaradioluz commented 3 years ago

When you choose to sort the category products by price, the "finalPrice" property of each product object is taken into consideration. The "Didi Sport Watch" product object simply has no "finalPrice" property and is therefore fetched at the end of the list. So I believe the bug is not in the code itself but in the data fetched from the api.

didi

Fifciu commented 3 years ago

Looks like it is already solved on the develop: https://test.storefrontcloud.io/default-category-2?sort=final_price Could you check it just for sure @bohdan-karapet ?