When you go into a category in Admin you can change the order of the products. This custom ordering isn't reflected in the way the products are show on the category grid page. I've tried disabling the sorting UI and related code in the page's code behind, but I'm still not seeing the ordering that we would like.
I would guess there's a way to get this to work, otherwise I don't see why there would even be the Admin-side tools for changing the product ordering. Can someone point me in the right direction?
Product ordering not working as expected
-
- Ensign (ENS)
- Posts: 3
- Joined: Thu Jun 12, 2014 10:29 am
Re: Product ordering not working as expected
I did tested this and the product ordering is working correctly for all category grid display pages. For me, the issue exists in category list page where the ordering is not working as expected when it is changed from the admin. I have reported the issue and will be fixed in next release.
The fix is simple and you can apply it by yourself. Just open Conlib/CategoryListPage.ascx in some editor of your choice, locate the following line:
and replace with:
The fix is simple and you can apply it by yourself. Just open Conlib/CategoryListPage.ascx in some editor of your choice, locate the following line:
Code: Select all
<asp:ListItem Text="Featured" Value="IsFeatured ASC"></asp:ListItem>
Code: Select all
<asp:ListItem Text="Featured" Value="IsFeatured ASC, OrderBy ASC, Name ASC"></asp:ListItem>
-
- Ensign (ENS)
- Posts: 3
- Joined: Thu Jun 12, 2014 10:29 am
Re: Product ordering not working as expected
So this is what I have in the CategoryGridPage.asc.cs
And you can see in the sample images that Bunny Prize is at the end of the page instead of after Beaver 2.
Code: Select all
protected void BindProductList()
{
IList<Product> products = ProductDataSource.AdvancedSearch(_keywords, this._categoryId, _manufacturerId, true, true,
true, 0, 0, _pageSize, (_hiddenPageIndex * _pageSize), "IsFeatured ASC, OrderBy ASC, Name ASC"); //SortResults.SelectedValue);
Re: Product ordering not working as expected
Which Ablecommerce build are you using? I am still not able to reproduce the issue in latest Gold R8 build. I suspect the issue might exists in some older releases and been fixed.
Re: Product ordering not working as expected
If you have both featured and non-featured products in a category, it will sort and list featured first and then care about the admin sort order. If you want to sort the products by admin sort order by default, you need to add the following line in Conlib/CategoryGridPage.ascx above "Featured" list item
It should work, no need to change your code in CategoryGridPage.ascx.cs.
One thing more, in category grid page the items are listed from all sub categories recursively. when your product is in more than one categories and you are listing products from multiple categories, conflict may occur. For more information read this thread viewtopic.php?f=65&t=17402&p=74701
Code: Select all
<asp:ListItem Text="Click for options" Value="OrderBy ASC, Name ASC"></asp:ListItem>
One thing more, in category grid page the items are listed from all sub categories recursively. when your product is in more than one categories and you are listing products from multiple categories, conflict may occur. For more information read this thread viewtopic.php?f=65&t=17402&p=74701
-
- Ensign (ENS)
- Posts: 3
- Joined: Thu Jun 12, 2014 10:29 am
Re: Product ordering not working as expected
Thanks for the help. It's the latest version, and it's not the Featured, I had tried it with that removed.
I suspect it's the multiple categories, each product is in at least 3 like Gender, Length, Style. I'll see if the shallow option will work for us.
I suspect it's the multiple categories, each product is in at least 3 like Gender, Length, Style. I'll see if the shallow option will work for us.