Do not be fooled by your programmer, this does NOT require custom programming. Sorting products by attributes is a common problem with a very simple solution. It’s not uncommon that a website will need to sort the products in their product catalog by some attribute that is not covered by the default Position, Name and Price.
For the purposes of this tutorial I’m going to want my customers to sort products by Case Count. Case Count is a custom attribute that I have created for this webstore.
The default sorting attributes which are set as default by Magento are displayed here.
You would definitely not want to solve this with the use of a programmer. Most likely, such an attempt would force your sorting into one specific mode disable all other sorting options for users. You may add as many sorting options to this drop down as you would like directly from the administration, allow me to show you how.
Step 1 – Login to your Administration
Here you’ll see my customized login screen for the Magento administration. If you are unfamiliar with how to locate your administrative area, then you’ll first navigate to your homepage. Once on your homepage you will need to add “admin” to the domain url in your address bar. Then you should see your login screen.
This is my customized login screen for the Magento admin area.
Step 2 – Go to the Manage Attributes page
Once you’ve logged into your Magento Admin area, you’ll see the “Catalog” option in the primary navigation menu. Hover over “Catalog”, then hover over the “Attributes” option, and finally you’ll see the “Manage Attributes” fly-out come up. Again, this is my customized administrative area, so your screen may look slightly different. Click on the Manage Attributes option and you’ll be taken to a list of attributes.
Managing Attributes in the Magento Admin
Step 3 – Locate the Attribute that you wish to sort by
In my situation I’m going to want to add the custom Case Count attribute to the sortable options for my customers. If you need to locate your product attribute, just use the filterable input fields above each column. Once you’ve located the attribute that you wish to use, click on the line item.
Location the Case Count Attribute in the Magento Admin
Step Four – Set the Attribute to be used for sorting
Once the Attribute options page comes up for you, scroll to the very bottom. It’s here that you’ll find the option to set this attribute to be used for sorting in the product listings pages. Change the drop down’s option to “Yes” and save the attribute.
Option to set the product to be used for sorting in the product listings
Step Five – Let’s go test it like always!
It was that easy! Took us all of a few seconds to log in, but once we were there…. You’re probably not even reading anymore. Fine, here’s my final results. lol.
A custom Attribute being used to sort the product listings
How do I sort products by a custom attribute?