How to sort products in category by price but out of stock be on the end on category? I want to show first stock items sorted by price.
I edit catalog/controller/product/category.php
but I can't make quantity argument.
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
//$sort = 'p.date_added';
$sort = 'p.price';
}
if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
//$order = 'DESC';
$order = 'ASC';
}
Opencart 1.5.4