Product Ordering by Admin Order
- Hostmaster
- Commander (CMDR)
- Posts: 126
- Joined: Fri Jan 04, 2008 3:30 pm
- Location: Melbourne Fl
- Contact:
Product Ordering by Admin Order
I had a thread a while back where I was trying to figure out a way to order the products the same way as in the admin area, at least for the default, first view of the page.
I am using the Category Grid Page with Category Data, CategoryGridPage4.ascx
By adding this line
<asp:ListItem Text="Sort" Value="" Selected="True"></asp:ListItem>
Our initial sort order is now the same as in the Admin Area for the categories.
Additionally it seems that for this page at least the Featured Items is not handled so we removed this line.
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem>
For our Home Page we are still using the FeaturedProductsGrid.
I am using the Category Grid Page with Category Data, CategoryGridPage4.ascx
By adding this line
<asp:ListItem Text="Sort" Value="" Selected="True"></asp:ListItem>
Our initial sort order is now the same as in the Admin Area for the categories.
Additionally it seems that for this page at least the Featured Items is not handled so we removed this line.
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem>
For our Home Page we are still using the FeaturedProductsGrid.
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
I am using categorygridpage. Where in the code did you add the line?
Was it in the drop down list definition?
Was it in the drop down list definition?
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Never mind. I figured it out. Thanks.
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
I put this in to categorygridpage.ascx and it didn't seem to work. It changed the sort order from A-Z but did not put it in the same order as in the administration.
Any ideas?
Any ideas?
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- Hostmaster
- Commander (CMDR)
- Posts: 126
- Joined: Fri Jan 04, 2008 3:30 pm
- Location: Melbourne Fl
- Contact:
Re: Product Ordering by Admin Order
Mary,
Did you ever figure this one out? I'm using CategoryGrid2.aspx, haven't yet tried to pop this in there to see if it works. I'd really like for the sort order to be the same as it is in the Admin, I always wondered why it isn't that way.
Did you ever figure this one out? I'm using CategoryGrid2.aspx, haven't yet tried to pop this in there to see if it works. I'd really like for the sort order to be the same as it is in the Admin, I always wondered why it isn't that way.
Re: Product Ordering by Admin Order
To view the products in exact same order as entered by merchant makes use of CategoryDetails or CategoryList page because they display products from one category.
Re: Product Ordering by Admin Order
Just knocked this one out. On CategoryGridPage2, the sort dropdown is what controls the default position of the products when a user first hits the page. The default option on this dropdown was "By Name A-Z". Initially, I thought that changing the default to "By Price Low->High" would fix my problem temporarily...
Then I had my AH HA! moment. I popped a blank item in the first slot of the dropdown with just a text label "Click for options". This causes the dropdown to have no control on the sort order of products. Then, the sort order falls back to the order the products are in in your merchant area so you can sort them with the arrows.
Here is the code I edited in ConLib/CategoryGridPage2.ascx around line 73 for the dropdown menu
Hope this helps.
Then I had my AH HA! moment. I popped a blank item in the first slot of the dropdown with just a text label "Click for options". This causes the dropdown to have no control on the sort order of products. Then, the sort order falls back to the order the products are in in your merchant area so you can sort them with the arrows.
Here is the code I edited in ConLib/CategoryGridPage2.ascx around line 73 for the dropdown menu
Code: Select all
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting" EnableViewState="false">
<asp:ListItem Text="Click for options"></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 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:DropDownList>
Re: Product Ordering by Admin Order
Not sure which version we were on at the time of my last post, but to get this working in 7.0.7, we need to add a blank value for our "Click for options" selection or else a page error is thrown:
Code: Select all
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting"
OnSelectedIndexChanged="SortResults_SelectedIndexChanged">
<asp:ListItem Text="Click for options" Value=""></asp:ListItem>