Product ordering not working as expected

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
jeffsodeman
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Jun 12, 2014 10:29 am

Product ordering not working as expected

Post by jeffsodeman » Fri Jun 13, 2014 2:29 pm

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?

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Product ordering not working as expected

Post by nadeem » Sat Jun 14, 2014 4:24 am

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:

Code: Select all

<asp:ListItem Text="Featured" Value="IsFeatured ASC"></asp:ListItem>
and replace with:

Code: Select all

<asp:ListItem Text="Featured" Value="IsFeatured ASC, OrderBy ASC, Name ASC"></asp:ListItem>

jeffsodeman
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Jun 12, 2014 10:29 am

Re: Product ordering not working as expected

Post by jeffsodeman » Sat Jun 14, 2014 9:43 am

So this is what I have in the CategoryGridPage.asc.cs

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); 
And you can see in the sample images that Bunny Prize is at the end of the page instead of after Beaver 2.

Image

Image



Image

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Product ordering not working as expected

Post by nadeem » Sun Jun 15, 2014 11:20 pm

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.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Product ordering not working as expected

Post by nadeem » Mon Jun 16, 2014 3:01 am

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

Code: Select all

<asp:ListItem Text="Click for options" Value="OrderBy ASC, Name ASC"></asp:ListItem>
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

jeffsodeman
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Thu Jun 12, 2014 10:29 am

Re: Product ordering not working as expected

Post by jeffsodeman » Mon Jun 16, 2014 6:25 am

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.

Post Reply