aimeos / ai-client-jsonapi

Aimeos frontend JSON API
GNU Lesser General Public License v3.0
28 stars 6 forks source link

Products Sort and Filter #7

Closed exemplari closed 3 years ago

exemplari commented 3 years ago

Environment

Version : 2020.10
Operating system: linux ubuntu on docker

Describe the bug Trying to filter products by category and sort them, at the same time

To Reproduce /jsonapi/product?sort=price&include=price,media this request is properly sorted by price

/jsonapi/product?sort=price&filter[f_catid]=4&include=price,media this request is not properly sorted by price the sort property is ignored when the filter category is present

Expected behavior Should sort by price and filter by category?

Screenshots na

Additional context

aimeos commented 3 years ago

Thank you for your bug report. Sorting added by filters had a higher precedence than the passed sorting: https://github.com/aimeos/ai-client-jsonapi/commit/ed4ff97b159d3fd588f577b00e3c1ed0e2fcdd37 This has been fixed and you can test executing:

composer req aimeos/ai-client-html:2020.10.x-dev
exemplari commented 3 years ago

that worked. thanks for these quick response.