laqmarc Posted January 30, 2024 Share Posted January 30, 2024 Hello, I would like to know if there is any way to filter by discount in the facets module. I have tried adding a case in private function addSearchFilters($selectedFilters) but it doesn't quite work for me. case 'offer': if ($orderDirection === 'desc') { $this->query->addOrderBy('(price - reduced_price) / price', 'DESC'); } else { $this->query->addOrderBy('(price - reduced_price) / price', 'ASC'); } break; But it doesn't work for me, I've been looking at the documentation but I'm quite lost. Any ideas? Greetings Link to comment Share on other sites More sharing options...
Musterheld Posted November 19, 2024 Share Posted November 19, 2024 Same here. Did you find a solution? Link to comment Share on other sites More sharing options...
vifen Posted November 26, 2024 Share Posted November 26, 2024 (edited) Hi, personally I don't know a way to do this. https://19216811.cam/ https://1921681001.id/ Edited December 5, 2024 by vifen (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now