s.elettronew Posted September 12, 2022 Share Posted September 12, 2022 Hi guys, I need to put a multiple sort parameters in the page of category. Actually, i sort my products with "sales" parameters. But i would like add to sales, also "quantity DESC". But i don't understand how can i edit this , because in my front controller "ProductListingFrontController.php" is used a Hook called actionProductSearchProviderRunQueryAfter and i don't know how it work. $encodedSortOrder = 'product.sales.DESC'; Hook::exec('actionProductSearchProviderRunQueryAfter', array('query' => $query->setSortOrder(SortOrder::newFromString( $encodedSortOrder )))); Ideally a would like obtein this result: "SELECT... FROM .....ORDER BY sales DESC, quantity DESC, but how can i do this in my front controller? 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