search on customer side.

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
Post Reply
mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

search on customer side.

Post by mkeith1 » Fri Apr 04, 2008 11:34 am

the search option which appears in the top border of the customer side allows for a search by name or keyword, any chance of adding Sku to this search? I know you can search by name, description or sku in the advanced search, but that's an extra click for the customer to go to this page.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: search on customer side.

Post by jmestep » Fri Apr 04, 2008 1:36 pm

Let's bombard mazhar and maybe he can some up with some code. The search is pretty puny as it is now.
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

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: search on customer side.

Post by m_plugables » Sat Apr 05, 2008 5:43 am

Edit the ConLib/SearchPage.ascx.cs and locate the following line of code

Code: Select all

ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);
and replace it with the following lines of code

Code: Select all

int startIndex = (_HiddenPageIndex * _PageSize);
        if(startIndex == (-1*_PageSize))
            startIndex = 0;
        ProductList.DataSource = ProductDataSource.AdvancedSearch(_Keywords, this.CategoryId, _ManufacturerId, true, true, true, 0, 0, _PageSize, startIndex, SortResults.SelectedValue);
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: search on customer side.

Post by jmestep » Sat Apr 05, 2008 8:31 am

Thanks, this works great.
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

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: search on customer side.

Post by mkeith1 » Mon Apr 07, 2008 12:20 pm

yes, exactly what i needed! This takes me one step closer to going live!

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: search on customer side.

Post by Shopping Cart Admin » Wed Apr 16, 2008 1:37 pm

Hello Judy,
The search is pretty puny as it is now.
It's a matter of speed of searching via text, we removed those extra fields per a bug report posted by me. Most customers are not searching via SKU.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: search on customer side.

Post by mkeith1 » Thu Apr 17, 2008 12:07 pm

Yeah, but it really is great to be able to search by sku. Thanks again Mazhar.

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: search on customer side.

Post by Robbie@FireFold » Mon Jul 21, 2008 9:14 am

I actually need this in one more spot.

/Admin/Catalog/Search.aspx

Can we change that to have the ability to search by SKU?
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: search on customer side.

Post by Robbie@FireFold » Tue Jul 22, 2008 11:23 am

Addition.

I'd like to see if there was an easy way to implemete searching by SKU everywhere?

My entire staff/customer base pretty much uses SKU's instead of description.
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: search on customer side.

Post by igavemybest » Thu Jul 24, 2008 2:48 pm

Didnt want this to get lost. Just wanted to rehash the last post.... Is there any way to search by squ everywhere?

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: search on customer side.

Post by Mike718NY » Thu Jul 24, 2008 6:56 pm

If I do a search with a space before or after the SKU number,
no results show up. This is also true in the "Advanced Search".

This variable (and all search variables) needs to be trimed.
Can someone show me where I could add a "Trim" to this value? thanks

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: search on customer side.

Post by Robbie@FireFold » Thu Jul 24, 2008 9:05 pm

Mike718NY wrote:If I do a search with a space before or after the SKU number,
no results show up. This is also true in the "Advanced Search".

This variable (and all search variables) needs to be trimed.
Can someone show me where I could add a "Trim" to this value? thanks
Just recently noticed this.

I would like to see a fix for this and be able to search by SKU everywhere.
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: search on customer side.

Post by Robbie@FireFold » Mon Jul 28, 2008 10:49 am

Bump for this week. Any thoughts?
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: search on customer side.

Post by jmestep » Mon Jul 28, 2008 3:40 pm

In SimpleSearch.ascx.cs, add .Trim() to the end of this line:
string safeSearchPhrase = StringHelper.StripHtml(SearchPhrase.Text).Trim();
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

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: search on customer side.

Post by Mike718NY » Thu Aug 14, 2008 1:00 pm

Thanks Judy. Just got around to doing this. Worked great.


Another solution to this problem would be what I did:
Add the Sku to the SearchKeywords field:

UPDATE ac_Products
set SearchKeywords = (ISNULL(SearchKeywords + ' ', '') + CAST(Sku AS VARCHAR(50)))

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: search on customer side.

Post by Robbie@FireFold » Thu Aug 14, 2008 1:13 pm

Mike718NY wrote:Thanks Judy. Just got around to doing this. Worked great.


Another solution to this problem would be what I did:
Add the Sku to the SearchKeywords field:

UPDATE ac_Products
set SearchKeywords = (ISNULL(SearchKeywords + ' ', '') + CAST(Sku AS VARCHAR(50)))
Any solutions on searching by SKU in the Admin/anywhere else?
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

Thessyn
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Wed Aug 27, 2008 10:23 am

Re: search on customer side.

Post by Thessyn » Wed Aug 27, 2008 10:52 am

Yes. This is extremely useful. Thanks!

I agree that the benefits of searching by SKU well outweigh the speed disadvantages. I bet a lot of other AC customers would agree!

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: search on customer side.

Post by mkeith1 » Mon Sep 08, 2008 1:17 pm

Yes! Yes, Making search by sku on the admin side would help. Now you have to search by sku on the advanced search of the retail side (if you didn't alter the search script), then the easiest way is to copy the name as it appears there and paste to the name search on the admin side. (Commas, apostrophies, quotes, etc.).

It would also be nice if the advanced search on the customer side had the ability to search "all words", "any words" or "string" like version 5 could.

Also, When you use the search on the customer side, there's are options for name, description or Sku, Do any of these options search "key words"?

And is there a way to eliminate searching by "price range"?

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: search on customer side.

Post by Robbie@FireFold » Mon Sep 08, 2008 3:01 pm

I made all the boxes checked when the page loads.

I still still SKU search on admin side.
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: search on customer side.

Post by jmestep » Mon Oct 06, 2008 5:59 pm

This is to revisit mazhar's code above. I just had a client point out that with that substitution the SimpleSearch.ascx will return products by SKU, but it also shows the message
Displaying items 0 - 0 of 0 and

No products match your search criteria.

The problem is around line 50
_SearchResultCount = ProductDataSource.NarrowSearchCount(_Keywords, this.CategoryId, _ManufacturerId, 0, 0);

where it is pulling from the NarrowSearchCount

The ProductDataSource.AdvancedSearch doesn't have a Count method. I've fooled around some trying to find the count of the results, but haven't come up with a way yet.
Anyone?
Thanks
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

combra
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 98
Joined: Thu Jul 31, 2008 7:09 pm

Re: search on customer side.

Post by combra » Tue Oct 14, 2008 7:08 pm

For the regular search field for when a customer searches, is there anyway to have it show either webpages or categories that don't have any products in them? For example, I have created categories that have webpages with amazon product widgets in them to complement the items that I do sell. These categories don't show up in the search, and I would like them to. I have removed the advanced search so this question is just for the regular search bar. Possible?
AC 7.0.7 build 14600

bemara579
Lieutenant (LT)
Lieutenant (LT)
Posts: 63
Joined: Thu Feb 19, 2009 6:15 pm

Re: search on customer side.

Post by bemara579 » Mon Apr 20, 2009 5:13 pm

bump

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: search on customer side.

Post by mazhar » Tue Apr 21, 2009 9:13 am

Only catalog search on admin side can list webpages. You can try to write some search module using that search function from CommerceBuilder.Catalog.CatalogDataSource.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: search on customer side.

Post by kastnerd » Wed Aug 05, 2009 10:48 am

Is this still true for 7.0.3?

Post Reply