Page 1 of 1

Category sorting not functioning correctly

Posted: Wed Apr 06, 2011 11:12 am
by Brewhaus
We have had some issues getting a category to sort correctly. A few specifics surrounding our issue are as follows:

AC version- 7.02

Using CategoryGrid4 (default version) and selecting to sort by 'Featured' shows all of the products in the category, regardles of whether or not they are marked as a featured item, and they display in the order set in the Admin interface.

All other CategoryGrids show only the items marked as 'Featured', which makes sense.

Now for our problem:
We cannot get a category to show all products ('featured' or not) in the order that we set. We created a sort method named 'default', but we still have issues. It seems that each 'group' of products (ie. those in another category, generally each brand) will sort in the order that we set, but the brands become mixed. We may have some products from brands A, B, and C, and we set the category to show as A(1), A(2), A(3), B(1), B(2), C(1), C(2), C(3), C(4), but the webpage displays as B(1), A(1), A(2), C(1), B(2), A(3), B(2), C(3), C(4).

To see the category in action you can look at
http://
www.
hotsaucedepot.
com/Firehouse-C178.aspx

Everything appears to function correctly EXCEPT the default sorting. Is there a reason that the sort order is not following the order that we set for the category? How can we fix this?

Rick

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 4:29 am
by plugables
By any chance do you have these items in more than category?

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 8:59 am
by Brewhaus
Yes, these products are in other categories as well.

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 9:26 am
by plugables
You have stumbled across a known issue. Merchant defined sort order does not work properly when products are in more than one category. It has been discussed in forums before. You may search to find more information.

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 9:50 am
by Brewhaus
What is odd is that it DOES work with CategoryGrid4. However, we want to add the multiple-item add to cart option (like on CategoryGrid3).

Has there been any solution found for the issue?

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 10:10 am
by plugables
CategoryGrid4 loads products differently then the other category pages. The other pages rely on the 'ProductDataSource.NarrowSearch' function which causes merchant order to mess up when products are in more than one category. The CategoryGrid4 page uses Category.CatalogNodes method. You may try to modify CategoryGrid3 conlib to use Category.CatalogNodes.

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 10:25 am
by Brewhaus
I take it that there has bee no resolution to this issue, then?

Would it be easier to get CategoryGrid3 to load products the way that CategoryGrid4 does, or to get CategoryGrid4 to use the multiple-add-to-cart button?

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 10:33 am
by plugables
Would it be easier to get CategoryGrid3 to load products the way that CategoryGrid4 does, or to get CategoryGrid4 to use the multiple-add-to-cart button?
CategoryGrid3 to load products the other way.

Re: Category sorting not functioning correctly

Posted: Sat Apr 09, 2011 2:21 pm
by Brewhaus
I guess in one respect that is good to hear- I have already created a CategoryGrid5, which is just CategoryGrid3 customized to the layout that we want. I have no idea where to start, but I guess this is how we learn. :-)

Re: Category sorting not functioning correctly

Posted: Sun Apr 17, 2011 9:02 pm
by Brewhaus
It looks like there are quite a few differences between CatGrid4 and CatGrid5 with respect to loading and sorting the results. Has anyone done this, or can at least give us some direction on how to accomplish this task?

Re: Category sorting not functioning correctly

Posted: Wed Apr 20, 2011 10:43 am
by Brewhaus
I have done some more tinkering, and the 'default' sorting appears to have no logic to it. There are items that were added much later (literally hundreds of products and several months later), yet show up before other items. I guess that I have two questions:

1- Can anyone help in implementing the product load method from CategoryGrid4 into CategoryGrid3?

2- If not, does the latest build of AC have this issue resolved? From what I have read in the forums it continues to be an issue, so upgrading would not solve our problem.

Re: Category sorting not functioning correctly

Posted: Wed May 11, 2011 9:36 pm
by Brewhaus
There has been no response to this. If nobody is able to help in implementing the CatGrid4 load method, someone must at least know if this has been resolved in the latest version of AC.

Re: Category sorting not functioning correctly

Posted: Thu May 12, 2011 6:11 am
by jmestep
It's too involved to explain here, but Grid 4 and Grid 3 use different data sources to load the page with products. So you would need to change the one in Grid 3 to the one in Grid 4. There will have to be other changes though.

Re: Category sorting not functioning correctly

Posted: Thu May 12, 2011 6:49 am
by Brewhaus
Ultimately what we need to do is to get the products pulled using the same method as Grid4 (so that we can control the order in which they are displayed), and at the same time have the multi-add to cart button (so that customers can add multiple items to the shopping cart at one time). Is there either a grid in the latest version of AC that does this, or can someone help 'build' that Grid (even as a custom, paid job at this point)?

Re: Category sorting not functioning correctly

Posted: Fri May 13, 2011 4:08 am
by jmestep
There is not a grid in Able that does that. CategoryGrid and CategoryGrid3 pull products using one datasource (products only) and CategoryGrid2 and CategoryGrid4 do it using a different one (catalog nodes).
We have done it, including ability to purchase products with options from the page.
http://www.perelandra-ltd.com/categoryb ... goryid=746
They aren't using it, but the page has an option you can set to have individual add to cart buttons or one add to cart button.

Re: Category sorting not functioning correctly

Posted: Fri May 13, 2011 6:39 am
by Brewhaus
That is awesome, Judy. Would you be willing to share the grid so that we can see if it will work for us as is, or if we need further 'tweaking' (aside from basic aesthetics to fit with our theme)? Please also quote a price offline (e-mail if you still have my address) assuming that we can use the grid as it is.

I got so wrapped up in the display order that I forgot kits and options did not show on the grid with the multi-item purchase.

Re: Category sorting not functioning correctly

Posted: Thu May 26, 2011 9:40 am
by Brewhaus
Hi Judy- as per my post above, is this something that we can do?

Re: Category sorting not functioning correctly

Posted: Fri May 27, 2011 5:33 am
by jmestep
It doesn't do kits- do you need that functionality?
Also, it can be customized the same way other Able category pages can be customized - it's a knock off of them.
Perelandra wanted the description of the category added at the top.
I'm not sure about purchasing details since it isn't currently packaged up as a plugin - you would need to contact Allan Soave (asoave@web2market.com)

Re: Category sorting not functioning correctly

Posted: Fri May 27, 2011 7:00 am
by Brewhaus
It is alright if it does not do kits. The CatGrid4 just has a 'more info' link for kit items, but the other grids show nothing. The 'more info' link works great, so we would be quite happy with that.

Can we get a copy of the grid to test and figure out if there is extra work that we would need done to it? As I mentioned, we are happy to pay for a copy of the grid plus any additional work that we made need done to it, but there is no point in starting from scratch if you already have something completed that does what we need, or at least most of what we need.

I apologize if I am repeating myself, but I am really loopy after surgery a couple of days ago, so if you coud check this with Allan I would appreciate it. You could more easily point him to the grid that we are discussing- I may just get him lost. *L*

Re: Category sorting not functioning correctly

Posted: Fri Jul 15, 2011 10:31 am
by Brewhaus
We are still fighting with this, and losing. Is there anyone that can help get CatGrid3 pulling products the way that CatGrid4 does?

Re: Category sorting not functioning correctly

Posted: Thu Sep 01, 2011 9:25 pm
by vhemlani
plugables wrote:You have stumbled across a known issue. Merchant defined sort order does not work properly when products are in more than one category. It has been discussed in forums before. You may search to find more information.
I can't seem to find more information on this. Can you direct me to the forum thread that talks about this?

I'm having issues with sorting items that are in multiple categories. They do not sort properly. How do I fix this issue?
Please have a look: http://www.hilohattie.com/Sale-C31.aspx. These items are in multiple categories, but they do not sort properly when displayed in the second category(sale).

Re: Category sorting not functioning correctly

Posted: Mon Sep 05, 2011 6:30 pm
by Brewhaus
We have tried time and again to 'combine' the code from the two category grids, but have yet to have any luck.

--Is there a CategoryGrid in the latest version of AC that actually works in the way that it should (ie. merchant defined sort order works in a grid that contains the multiple add to cart)?

--If not, can someone lend some help on this? It seems that the ONLY CategoryGrid that functions correctly is CategoryGrid4. That means that if a company wants to have an item in more than one category (which is pretty standard, let's face it), then you are forced into using CategoryGrid4 whether it suits your layout or not. While I am generally very pleased with the AC software, this is a glaring issue.

Re: Category sorting not functioning correctly

Posted: Mon Nov 19, 2012 5:18 pm
by ESomething
Has this issue been solved in AC Gold?

Re: Category sorting not functioning correctly

Posted: Tue Nov 20, 2012 7:11 am
by jmestep
Here is a patch for the simplecategorylist menu if you are having the problem there. The category grid pages sort the same as they did in Able 7.

Add this to the bottom of your SimpleCategoryList.ascx.cs before the final two }}

Code: Select all

 private IList<Category> GetSubcategories(int categoryId)
        {
            // GET ALL NODES IN THE CATEGORY
            IList<CatalogNode> allNodes = CatalogDataSource.LoadForCategory(categoryId, true, "OrderBy");

            // EXTRACT THE CATEGORY NODES
            IList<Category> categoryNodes = new List<Category>();
            foreach (CatalogNode node in allNodes)
            {
                if (node.CatalogNodeType == CatalogNodeType.Category && node.ChildObject != null)
                {
                    categoryNodes.Add((Category)node.ChildObject);
                }
            }
            return categoryNodes;
        }
Then use it up above in place of the code that is there

Code: Select all

 IList<Category> subCategories = GetSubcategories(_CategoryId);
            CategoryList.DataSource = subCategories;
            CategoryList.DataBind();