x3n0m0rph Posted January 7, 2018 Share Posted January 7, 2018 Hi, I am using prestashop 1.7.2.4, live shop now, and I am not able to use faceted search module becouse is messing up products order in categories. My settings: Shop Parameters -> Products -> Pagination -> Sort by: Product Quantity If I enable the faceted search module, this sorting method will not work - products will be automaticly sorted by oldest products first. All other sorting methods will work fine. This is a huge problem for me, becouse I have like 5.000 products and 60% of them are not in stock. I really need to show in stock products first. At the same time, I need Faceted Search to help my clients sort products easy. Please help - this is a live shop and I can not find a fix for this! Thank you 1 Link to comment Share on other sites More sharing options...
x3n0m0rph Posted January 13, 2018 Author Share Posted January 13, 2018 No help on this? ............... Link to comment Share on other sites More sharing options...
x3n0m0rph Posted January 14, 2018 Author Share Posted January 14, 2018 come on guys... no help here? is this forum so dead?! Link to comment Share on other sites More sharing options...
iDzine Posted June 16, 2018 Share Posted June 16, 2018 Hey, I've been looking in this issue also for a customer in the last days... Found a work-a-round if it's still needed for you? Open following file in \themes\your-theme\templates\catalog\_partials\sort-orders.tpl In the Dropdown-menu code change from <div class="dropdown-menu"> {foreach from=$listing.sort_orders item=sort_order} <a rel="nofollow" href="{$sort_order.url}" class="select-list {['current' => $sort_order.current, 'js-search-link' => true]|classnames}" > {$sort_order.label} </a> {/foreach} </div> To this <div class="dropdown-menu"> {foreach from=$listing.sort_orders item=sort_order} <a rel="nofollow" href="{$sort_order.url}" class="select-list " > {$sort_order.label} </a> {/foreach} </div> Hope it helps! Link to comment Share on other sites More sharing options...
rastavmp Posted December 15, 2018 Share Posted December 15, 2018 Hi!! I don't know if you resolved this problema, I had same problem in a shop with prestashop 1.7.4.4 version. I have been finding a solution, and I see that is a bug. But I resolved it changing ps_facetedsearch.php. In line 1358 (aprox.) change (I comented all this). //if (!Validate::isOrderBy($order_by)) { // $order_by = 'cp.position'; //} //if (!Validate::isOrderWay($order_way)) { // $order_way = 'ASC'; //} //$order_clause = $order_by . ' ' . $order_way; and i put this: $order_clause = 'stock.quantity DESC'; And now order by quantity!!! Sorry for my bas english.!! 1 Link to comment Share on other sites More sharing options...
capocopa Posted December 29, 2018 Share Posted December 29, 2018 On 12/16/2018 at 12:39 AM, rastavmp said: Hi!! I don't know if you resolved this problema, I had same problem in a shop with prestashop 1.7.4.4 version. I have been finding a solution, and I see that is a bug. But I resolved it changing ps_facetedsearch.php. In line 1358 (aprox.) change (I comented all this). //if (!Validate::isOrderBy($order_by)) { // $order_by = 'cp.position'; //} //if (!Validate::isOrderWay($order_way)) { // $order_way = 'ASC'; //} //$order_clause = $order_by . ' ' . $order_way; and i put this: $order_clause = 'stock.quantity DESC'; And now order by quantity!!! Sorry for my bas english.!! I perfectly fixed my problem with this thank you so much! 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