Gold R11 MoreCategoryItems control

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Gold R11 MoreCategoryItems control

Post by AbleMods » Tue Jan 12, 2016 4:22 am

I haven't been in this control for quite a while. I noticed this morning it's vastly different than previous versions, not sure when that happened.

One particular comment in the code immediately stood out to me
//load products near the current product
What exactly does that mean? The code is substantially complicated, so it's hard to tell precisely what it's trying to do.
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

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

Re: Gold R11 MoreCategoryItems control

Post by nadeem » Mon Feb 01, 2016 5:58 am

The changes were made in this control in Gold R5 for performance improvements. More category items control was working very slow when there are large number of category items. This was resulting in very slower product details page.

It was later updated in R8 for some more performance related improvements i.e 'Improve performance and memory use using Nhibernate profiler'. So this control is mostly updated for performance related issues.

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

Re: Gold R11 MoreCategoryItems control

Post by AbleMods » Mon Feb 01, 2016 6:18 am

ok thanks.

But what does "load products near the current product" actually mean? What do you mean by 'near'?
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

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

Re: Gold R11 MoreCategoryItems control

Post by nadeem » Mon Feb 01, 2016 6:32 am

This comment has actually been added by someone else :). So I can't say anything for sure.

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Gold R11 MoreCategoryItems control

Post by jguengerich » Mon Feb 01, 2016 11:30 am

It appears that if a product is given, it looks for products that:
- are in the same product category as the given product
- have an OrderBy property within maxitems * 2 of the given product
- are not in a product group, or are in a product group that the user has access to
- are visible to the user
If a product is not given, it looks for products that:
- are in the given product category
- are not in a product group, or are in a product group that the user has access to
- are visible to the user
In either case, the results are sorted if the control's DisplayMode property is "SEQUENTIAL".
So I would guess that "near" refers to the part about the OrderBy property of the returned products being in close proximity to the OrderBy property of the given product.

As far as I can see, you can't set OrderBy directly in the UI. It is actually a property of the CatalogNode, not the Product (CatalogNode.CatalogNodeId == Product.ProductId when CatalogNode.CatalogNodeType is CatalogNodeType.Product). It is set by changing the order of items in a category via Admin/Catalog/Browse.aspx. Click on a category name, then move products up or down with an arrow, or click the "Sort" button at the top, then use the various controls to order things as desired.
BTW, don't use the up or down arrows on the Admin/Catalog/Browse.aspx?CategoryId=n page if your category has a lot of items. I did it (on my test server) for a product in a category that has over 13,000 products, and IIS' w3wp.exe process sat at 50% for several minutes. I finally stopped IIS and started it again. Appears to be caused by the code for those arrows looping through and saving every catalog node in the given category. It looks like Admin/Catalog/SortCategory.aspx?CategoryId=n would do the same thing when you hit the Save button.
Jay

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

Re: Gold R11 MoreCategoryItems control

Post by AbleMods » Mon Feb 01, 2016 11:49 am

jguengerich wrote:a product in a category that has over 13,000 products
That seems....excessive :)

Methinks Able didn't quite anticipate your category size lol
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

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

Re: Gold R11 MoreCategoryItems control

Post by AbleMods » Mon Feb 01, 2016 11:50 am

jguengerich wrote:So I would guess that "near" refers to the part about the OrderBy property of the returned products being in close proximity to the OrderBy property of the given product.
THAT'S the answer I was looking for! Ok, so 'near' makes sense now because it's in reference to the OrderBy established by the admin.

Now I get it ;)
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

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Gold R11 MoreCategoryItems control

Post by jguengerich » Mon Feb 01, 2016 11:53 am

AbleMods wrote: That seems....excessive :)

Methinks Able didn't quite anticipate your category size lol
Yeah, it is replacement parts site for existing customers only, and they will already know their part numbers, so we didn't bother splitting things up into categories for them to browse. In fact, there are a lot of customizations, one of which is removing the pages to browse the catalog.
Jay

Post Reply