The product list does not seem to obey the manual sorting applied when using the CategoryGridPage and a sort selection of Featured. If I switch to CategoryList it works just fine.
I have done some code research and can't seem to find out how the query is built in the Gold version.
Any ideas?
Product Sorting on CategoryGridPage
Re: Product Sorting on CategoryGridPage
I am also experiencing this issue. In the ac_CatalogNodes table it looks like it is sorting by the "Id" field rather than by the "OrderBy" field. Is there a time table for getting this fixed?
- MisterMike
- Ensign (ENS)
- Posts: 12
- Joined: Tue Apr 16, 2013 7:37 am
Re: Product Sorting on CategoryGridPage
I'm having the same issue when changing the Sort from Featured to any of the other choices (By Name, By Price). When I change the sort, it changes the current page, but when I click to go to the next page the sort changes back to Featured. This is very confusing and cannot possibly be the intended behavior for this page. Has anyone found a fix?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Product Sorting on CategoryGridPage
What version of Gold are you using? Which search-Lucene, SQL, etc.? Which category grid page? There are some bugs.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
-
- Commodore (COMO)
- Posts: 436
- Joined: Tue May 07, 2013 1:59 pm
Re: Product Sorting on CategoryGridPage
For MisterMike's issue, this looks similar to an issue I had with the Search page in Gold R5. I fixed it by making the following changes. I haven't tested this on the CategoryGrid pages, but the code looks the same so it might work.
At the start of the Page_Load method (of CategeoryGridPage.ascx.cs for example) there is a nested if statement:
I changed it to this:
You may also need to change the EnableViewState property of the SortResults DropDown control to true (in CategoryGridPage.ascx for example):
becomes
Again, I haven't tested this, but it is worth a shot.
At the start of the Page_Load method (of CategeoryGridPage.ascx.cs for example) there is a nested if statement:
Code: Select all
string eventTarget = Request["__EVENTTARGET"];
if (string.IsNullOrEmpty(eventTarget) || !eventTarget.EndsWith("PageSizeOptions"))
{
string pageSizeOption = Request.QueryString["ps"];
if (!string.IsNullOrEmpty(pageSizeOption))
{
PageSizeOptions.ClearSelection();
ListItem item = PageSizeOptions.Items.FindByValue(pageSizeOption);
if (item != null) item.Selected = true;
}
}
else
if (eventTarget.EndsWith("PageSizeOptions"))
{
string url = Request.RawUrl;
if (url.Contains("?"))
url = Request.RawUrl.Substring(0, Request.RawUrl.IndexOf("?"));
url += "?s=" + SortResults.SelectedValue;
url += "&ps=" + PageSizeOptions.SelectedValue;
Response.Redirect(url);
}
Code: Select all
string eventTarget = Request["__EVENTTARGET"];
if (string.IsNullOrEmpty(eventTarget) || !(eventTarget.EndsWith("PageSizeOptions") || eventTarget.EndsWith("SortResults")))
{
string pageSizeOption = Request.QueryString["ps"];
if (!string.IsNullOrEmpty(pageSizeOption))
{
PageSizeOptions.ClearSelection();
ListItem item = PageSizeOptions.Items.FindByValue(pageSizeOption);
if (item != null) item.Selected = true;
}
}
else
if (eventTarget.EndsWith("PageSizeOptions") || eventTarget.EndsWith("SortResults"))
{
string url = Request.RawUrl;
if (url.Contains("?"))
url = Request.RawUrl.Substring(0, Request.RawUrl.IndexOf("?"));
url += "?s=" + SortResults.SelectedValue;
url += "&ps=" + PageSizeOptions.SelectedValue;
Response.Redirect(url);
}
Code: Select all
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting" EnableViewState="false">
Code: Select all
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting" EnableViewState="true">
Jay
- MisterMike
- Ensign (ENS)
- Posts: 12
- Joined: Tue Apr 16, 2013 7:37 am
Re: Product Sorting on CategoryGridPage
My issues were resolved when I upgraded to Gold R6.