This isn't always the best option, I've changed the default sort order of the LoveMoissanite.com store to be by Rating (Highest First) - which makes a bit more sense, since you want visitors to see the highest-rating items first, since these are likely to be your most popular products.
By default, for items with no rating - they are shown by Product ID order, the order you've added them to your shop.
(this is also helpful, since usually you'll add different versions of the same item, or related items one after another).
So, example:
http://www.lovemoissanite.com/Moissanit ... -Brilliant
It's really really simple to do.
Open up:
\catalog\controller\product\category.php
Line 64 forward:
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
// $sort = 'pd.name';
$sort = 'rating'; // sort by rating by default
}
if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
//$order = 'ASC';
$order = 'DESC'; // sort rating Descending by default
}
Additionally, as OpenCart is built so well, the "sort" drop down on your site will also now default to show "Rating (highest first)"
Done