Need assistance on product sorting
Need assistance on product sorting
My client wants to display products in a specific order on several pages. we can use the arrows on the catalog page to change the order of products. By the default the pages have a drop down menu that sorts items from A-Z. I added a listItem as below:
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting" EnableViewState="false">
<asp:ListItem Text="Default" Value="????" Selected="True"></asp:ListItem>
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
<asp:ListItem Text="By Name (Z -> A)" Value="Name DESC"></asp:ListItem>
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem>
<asp:ListItem Text="By Price (Low to High)" Value="Price ASC"></asp:ListItem>
<asp:ListItem Text="By Price (High to Low)" Value="Price DESC"></asp:ListItem>
<asp:ListItem Text="By Manufacturer (A -> Z)" Value="Manufacturer ASC"></asp:ListItem>
<asp:ListItem Text="By Manufacturer (Z -> A)" Value="Manufacturer DESC"></asp:ListItem>
</asp:DropDownList>
I want to know how to set the value for Default, and we can get the same order as admin page.
Thanks,
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting" EnableViewState="false">
<asp:ListItem Text="Default" Value="????" Selected="True"></asp:ListItem>
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
<asp:ListItem Text="By Name (Z -> A)" Value="Name DESC"></asp:ListItem>
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem>
<asp:ListItem Text="By Price (Low to High)" Value="Price ASC"></asp:ListItem>
<asp:ListItem Text="By Price (High to Low)" Value="Price DESC"></asp:ListItem>
<asp:ListItem Text="By Manufacturer (A -> Z)" Value="Manufacturer ASC"></asp:ListItem>
<asp:ListItem Text="By Manufacturer (Z -> A)" Value="Manufacturer DESC"></asp:ListItem>
</asp:DropDownList>
I want to know how to set the value for Default, and we can get the same order as admin page.
Thanks,
Re: Need assistance on product sorting
Alex,
It sounds like your asking for two things:
1. Adding an additional way to sort.
2. Eliminate the default sorting.
Or are you just wanting to eliminate the default sorting so the products/categories are displayed in the order specified on the Admin side?
It sounds like your asking for two things:
1. Adding an additional way to sort.
2. Eliminate the default sorting.
Or are you just wanting to eliminate the default sorting so the products/categories are displayed in the order specified on the Admin side?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Need assistance on product sorting
The default is the first option. If you want items in a specific order, sort them in your admin and then make featured your first option and it will display them in the order you have them sorted in your admin.
Example:
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem> Moving this to the top makes it the default
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
<asp:ListItem Text="By Name (Z -> A)" Value="Name DESC"></asp:ListItem>
<asp:ListItem Text="By Price (Low to High)" Value="Price ASC"></asp:ListItem>
<asp:ListItem Text="By Price (High to Low)" Value="Price DESC"></asp:ListItem>
Example:
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem> Moving this to the top makes it the default
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
<asp:ListItem Text="By Name (Z -> A)" Value="Name DESC"></asp:ListItem>
<asp:ListItem Text="By Price (Low to High)" Value="Price ASC"></asp:ListItem>
<asp:ListItem Text="By Price (High to Low)" Value="Price DESC"></asp:ListItem>
Re: Need assistance on product sorting
Hey thats a pretty slick little trick 

Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Need assistance on product sorting
SolunarServices wrote:Alex,
It sounds like your asking for two things:
1. Adding an additional way to sort.
2. Eliminate the default sorting.
Or are you just wanting to eliminate the default sorting so the products/categories are displayed in the order specified on the Admin side?
Yes, I just want to make the products on front side are displayed in the order specified on the admin side.
thanks,
Re: Need assistance on product sorting
Thank you! But I have tried this, but the orders(front side & admin side) are still different.meer2005 wrote:The default is the first option. If you want items in a specific order, sort them in your admin and then make featured your first option and it will display them in the order you have them sorted in your admin.
Example:
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem> Moving this to the top makes it the default
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
<asp:ListItem Text="By Name (Z -> A)" Value="Name DESC"></asp:ListItem>
<asp:ListItem Text="By Price (Low to High)" Value="Price ASC"></asp:ListItem>
<asp:ListItem Text="By Price (High to Low)" Value="Price DESC"></asp:ListItem>
Re: Need assistance on product sorting
I think the admin side joins the ac_CatalogNodes table with the ac_Products table and sorts by ac_CatalogNodes.OrderBy. Unfortunately, the client side does not appear to join the ac_CatalogNodes table into the query, so OrderBy is not available for sorting.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Need assistance on product sorting
The code you need to change depends on which category display grid you are using. Which one is it?
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
- ryanstowasser
- Lieutenant Commander (LCDR)
- Posts: 90
- Joined: Tue Oct 30, 2007 4:28 pm
- Contact:
Re: Need assistance on product sorting
I created a custom sorting solution a while back and posted some code at the following url.
viewtopic.php?f=44&t=5736&p=23258&hilit ... ort#p23258
I was sorting on a merchant field found in a product template. I hope its helpful.
viewtopic.php?f=44&t=5736&p=23258&hilit ... ort#p23258
I was sorting on a merchant field found in a product template. I hope its helpful.
Ryan Stowasser (ablehelp@vortx.com)
Vortx Inc
Custom Development for AbleCommerce Solutions
Vortx is an AbleCommerce Development Partner
Vortx Inc
Custom Development for AbleCommerce Solutions
Vortx is an AbleCommerce Development Partner