How can I change the default sort method?

The default sort order for category and brand pages is by Featured Products, which will sort according to the sort order as specified for the products, but you can also sort items in the following ways:

  • Newest Items
  • Bestselling
  • Alphabetical: A to Z
  • Alphabetical: Z to A
  • Avg. Customer Review
  • Price: Low to High
  • Price: High to Low
Please note that while we offer this tutorial and it is tested and working at the time of creation, any customization of or support for these types of articles is outside of our scope of support. If you require assistance with any design or customization, we recommend that you either visit our community forums or contact one of our fantastic design partners.

1.) Log in to your store's control panel.

2.) Click on Design.

1066_step1.png

3.) Click on the Template Files tab.

1066_step2.png

4.) Scroll down to the Snippets folder, and click the plus sign next to it.

2012-05-08_1159.png

5.) Find the CategorySortBox.html and click Edit on it.

2012-05-08_1159_001.png

6.) Paste the following code at the bottom of the file.

<script type="text/javascript">
if(document.URL == "%%GLOBAL_URL%%") {
document.CategorySortForm.sort[0].selected = "1";
document.forms["CategorySortForm"].submit();
}
else { }
</script>

2012-05-08_1201.png

7.) Now, add name="CategorySortForm" where you see it in the picture below.

2012-05-08_1200.png

8.) Change the number in green from the code above to reflect the default sort you wish you have on your category and brand pages:

Sort Type Value
Featured Items 0
Newest Items 1
Bestselling 2
Alphabetical (A-Z) 3
Alphabetical (Z-A) 4
Average Customer Review 5
Price (Low to High) 6
Price (High to Low) 7

9.) Click Save.

2012-05-03_1133.png

 

That's all that you need to do! Now your categories and brands should sort by your default method.

Ninja'd by Fred Dobson

Attachments

No attachments were found.

104 votes 55% thumbs up 44% thumbs down

Did this article resolve the issue?

Was this article helpful?

Related Articles

No related articles were found.

Continue