Need assistance on product sorting

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
alex
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Sep 18, 2008 4:14 pm

Need assistance on product sorting

Post by alex » Thu Sep 18, 2008 4:33 pm

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,

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Need assistance on product sorting

Post by AbleMods » Thu Sep 18, 2008 6:44 pm

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?
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

meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Re: Need assistance on product sorting

Post by meer2005 » Thu Sep 18, 2008 9:50 pm

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>

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Need assistance on product sorting

Post by AbleMods » Thu Sep 18, 2008 10:22 pm

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

alex
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Sep 18, 2008 4:14 pm

Re: Need assistance on product sorting

Post by alex » Fri Sep 19, 2008 1:44 pm

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,

alex
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Sep 18, 2008 4:14 pm

Re: Need assistance on product sorting

Post by alex » Fri Sep 19, 2008 1:46 pm

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>
Thank you! But I have tried this, but the orders(front side & admin side) are still different.

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Need assistance on product sorting

Post by afm » Fri Sep 19, 2008 2:53 pm

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.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Need assistance on product sorting

Post by jmestep » Fri Sep 19, 2008 6:37 pm

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

User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

Re: Need assistance on product sorting

Post by ryanstowasser » Fri Sep 19, 2008 7:25 pm

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.

Post Reply