Gold R11: Sort option category items ?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Gold R11: Sort option category items ?

Post by Odettes » Wed Nov 25, 2015 2:14 am

Hi!

If I use:

Code: Select all

ProductDataSource.LoadForCategory(true, _Category.Id, false, true, "Name ASC", 500, 0)
What should i replace "Name ASC" with so it return my products in the same sortorder I have in the admin interface?
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

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

Re: Gold R11: Sort option category items ?

Post by nadeem » Wed Nov 25, 2015 3:04 am

You need to replace "Name ASC" with "OrderBy ASC" to display products in admin sort order. Note that admin sort order may not work correctly if you have products in more than one categories.

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

Re: Gold R11: Sort option category items ?

Post by nadeem » Wed Nov 25, 2015 3:25 am

BTW, we had already added a default admin sort option to the applicable category pages in Gold R11 for same purpose.

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Gold R11: Sort option category items ?

Post by Odettes » Wed Nov 25, 2015 4:22 am

nadeem wrote:You need to replace "Name ASC" with "OrderBy ASC" to display products in admin sort order. Note that admin sort order may not work correctly if you have products in more than one categories.
I have products in more than one category so "OrderBy ASC" dont work.
Is there anything I can do to make it work?
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

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

Re: Gold R11: Sort option category items ?

Post by nadeem » Wed Nov 25, 2015 5:29 am

This will not work for Deep Item Display category pages. It should work for other category display pages. Which display page are you using?

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

Re: Gold R11: Sort option category items ?

Post by nadeem » Wed Nov 25, 2015 5:34 am

Here is more detail from another similar post:
Also please note that in deep item display, items are listed from all sub-categories recursively. The sort order within each category is respected, but if a product is in more than one category, which sort order to take into consideration? In the merchant admin you have defined sort order by category. There is no sort order by the entire catalog. So when your product is in more than one categories and you are listing products from multiple categories, you are likely to see some conflict.

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Gold R11: Sort option category items ?

Post by Odettes » Wed Nov 25, 2015 11:12 pm

nadeem wrote:This will not work for Deep Item Display category pages. It should work for other category display pages. Which display page are you using?
I'm using a custom page with a repeater using:

Code: Select all

ProductDataSource.LoadForCategory(true, _Category.Id, false, true, "Name ASC", 500, 0)
My treestructure looks like this:

-Folder-A
-Folder-B
Item-1
Item-2
-Folder-C
Item-3
Item-4


Item-1
Item-2
Item-3
Item-4

If I user "SortOrder ASC" Folder-B and Folder-C arange as I see it in the admin interface.
But items in Folder-A seems to sort a bit random (folderB and folderC are subfolders of folderA)
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Gold R11: Sort option category items ?

Post by Odettes » Sun Dec 06, 2015 12:28 pm

Any ideas?

Odettes wrote:
nadeem wrote:This will not work for Deep Item Display category pages. It should work for other category display pages. Which display page are you using?
I'm using a custom page with a repeater using:

Code: Select all

ProductDataSource.LoadForCategory(true, _Category.Id, false, true, "Name ASC", 500, 0)
My treestructure looks like this:

-Folder-A
-Folder-B
Item-1
Item-2
-Folder-C
Item-3
Item-4


Item-1
Item-2
Item-3
Item-4

If I user "SortOrder ASC" Folder-B and Folder-C arange as I see it in the admin interface.
But items in Folder-A seems to sort a bit random (folderB and folderC are subfolders of folderA)
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Gold R11: Sort option category items ?

Post by compunerdy » Sun Dec 06, 2015 3:47 pm

I am not sure of this 100% but I just looked and my items would not follow admin sort order until I moved them all up/down and then they did. It is like they do not have a sort order assigned until you move them at least once. I did not look in the DB to check though so this is just a theory.


EDIT: I did just verified this bug. If you are creating a new category and items in a new store I am sure everything works fine but for people that have upgraded you will find that there is a table called OrderBy under products and the products will have a value of 0.00 until you move the items around via admin and then they will have the value set and show correctly in the store.

Post Reply