Problem with my searchpage.ascx control

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

Problem with my searchpage.ascx control

Post by AbleMods » Sat Dec 08, 2007 8:15 pm

Just noticed that when clicking the link to view other products by the same manufacturer, the search page pulls up all products in the store.

Digging through the controls, it doesn't look like searchpage.ascx is parsing for the ?m= query parameter to restrict the initial display to a particular manufacturer ID.

Is it just my control that's broke or is this a bug? I checked the ac_upgrade zip and the copy there didn't appear to parse for it either.
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

Post by AbleMods » Sat Dec 08, 2007 10:39 pm

Fixed it. Look for this code in the beginning of the Page_Load section of the searchpage.aspx.cs file...

Code: Select all

            //INITIALIZE SEARCH CRITERIA ON FIRST VISIT
            HiddenPageIndex.Value = AlwaysConvert.ToInt(Request.QueryString["p"]).ToString();
            string tempSort = Request.QueryString["s"];
and replace it with this code...

Code: Select all

            //INITIALIZE SEARCH CRITERIA ON FIRST VISIT
            HiddenPageIndex.Value = AlwaysConvert.ToInt(Request.QueryString["p"]).ToString();
            _ManufacturerId = AlwaysConvert.ToInt(Request.QueryString["m"]);
            string tempSort = Request.QueryString["s"];
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
nborelli
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 25
Joined: Sat Nov 17, 2007 2:03 pm
Location: Soquel, CA
Contact:

Post by nborelli » Sun Dec 09, 2007 9:18 am

Hi Joe,

The search page that came with the 8272 build was not handling parameters properly when you moved from page to page. It is a known issue. I suggest you download the hotfix before you go any further if you have not done so already. Are you using the search page that came with 8272 or the hotfix version? The reason I ask is the hotfix version does the product seach by manufacturer fine for me.

Check out the following URL for a list of know issues and there fixes.

http://help.ablecommerce.com/upgrades/a ... .x_rc1.htm

I did this and then modified it pretty heavily to add a pager control to the top of the product grid and also change the way the pager controls function. I wanted to have a pager that was more like a typical DB navigator with a sliding view of 12 page links. For example:

<< <1> >>

If you are interested in the code, let me know and I will send it to you. AFAIK, it works, but I'm not Able!

-Neal
Neal Borelli
Nubius Organics (part time for my wife)
http://www.nubiusorganics.com

User avatar
nborelli
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 25
Joined: Sat Nov 17, 2007 2:03 pm
Location: Soquel, CA
Contact:

Post by nborelli » Sun Dec 09, 2007 9:35 am

Sorry, I should have previewed the message first. The CRM system fragged my pager mock-up.

It looks more like this with the current page number bold and in the middle:

<< < 3 4 5 6 7 8 9 10 11 12 13 14 > >>

By the way, how come we can't have a WYSIWYG HTML editor in the CRM system like we have in the product? And how come we can't type in raw HTML codes and have it work? For example, if I type < it does not get converted to the < symbol. I would gladly give up the emoticons for better HTML support. :?

Oh well...

-Neal
Neal Borelli
Nubius Organics (part time for my wife)
http://www.nubiusorganics.com

Post Reply