Remove alphabetical ordering in category list
Remove alphabetical ordering in category list
I would like to customize category list page so that products appear in the order which they are in Browse Catalog and not the alphabetical order. Anyone any idea? thanks in advance
- m_plugables
- Commander (CMDR)
- Posts: 149
- Joined: Tue Mar 11, 2008 12:44 am
- Contact:
Re: Remove alphabetical ordering in category list
Locate the following line of code
You can change the sort order and make it like in the Browse Catalog page. For this just make the above line of code look like
means pass an empty string int sort expression parameter then it will display the catalog items without sorting.
Code: Select all
string sortExpression = SortResults.SelectedValue;
Code: Select all
string sortExpression = String.Empty;

Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com
- m_plugables
- Commander (CMDR)
- Posts: 149
- Joined: Tue Mar 11, 2008 12:44 am
- Contact:
Re: Remove alphabetical ordering in category list
Well although the above code works but a much better solution is to modify the sorting options drop down list. You can use the code below instead of the above code for the same task
Edit the ConLib/CategoryListPage.ascx file and locate the following line of code
and put the following line of code just above it.
It will make an extra option available in the sort options list. Use this option to keep the result order same as in the Browse Catalog.
Edit the ConLib/CategoryListPage.ascx file and locate the following line of code
Code: Select all
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
and put the following line of code just above it.
Code: Select all
<asp:ListItem Text="<Select Sort>" Value="" Selected="True"></asp:ListItem>

Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com
Re: Remove alphabetical ordering in category list
Thanks a lot! Worked great! Our company doesn't have that many products, so the sort header was not even necessary. So I made the changes you suggested, and then I made the sort header disappear from css. Thanks again for sharing your knowledge.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Remove alphabetical ordering in category list
I had to change from the first method to this:
<asp:ListItem Text="<Select Sort>" Value="" Selected="True"></asp:ListItem>
When I used string sortExpression = String.Empty; it retained the catalog order of the products, but the sorting selections didn't work.
<asp:ListItem Text="<Select Sort>" Value="" Selected="True"></asp:ListItem>
When I used string sortExpression = String.Empty; it retained the catalog order of the products, but the sorting selections didn't work.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Remove alphabetical ordering in category list
I had to switch to using the CategoryGridPage.ascx in order to get the "C" out of my product links on that page . ( It was easier than working with the CategoryGridpage4.ascx).
Anyway, neither of the above codes work on that page. I think this code sets the sort value when the page loads, but I can't figure out how to change it:
ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);
I think I need to put something else for SortResults.SelectedValue, but I'm not sure what. I tried "" and nothing changed.
Anyone know?
Thanks
Anyway, neither of the above codes work on that page. I think this code sets the sort value when the page loads, but I can't figure out how to change it:
ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);
I think I need to put something else for SortResults.SelectedValue, but I'm not sure what. I tried "" and nothing changed.
Anyone know?
Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx