VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Alphabetical Search
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

UberGeek
Starting Member

USA
6 Posts

Posted - September 12 2005 :  15:43:20  Show Profile  Reply with Quote
Has anyone modified the alphabetical search to base the search on characters other than the first character in the product name?

All my product names begin with the same letter:

x-widgit
x-gizmo
x-thingy
x-whatever
etc...

I would like to use the alphabetical search to make finding my products easier but because of the product branding the alpha search right now is not useable.

Has anyone used a workaround for something like this? Even something similar would be helpfull as I'm not sure where the alpha search actually takes place in the code.

If anyone could throw me an x-bone that would be great...

Thanks all

Doing that which I do.

dcwebman
VP-ASP New User

USA
127 Posts

Posted - September 14 2005 :  07:46:42  Show Profile  Reply with Quote
How about this. I'm using version 5.5 so not sure if yours is different. Make some changes in shopquery.asp in the GetInput subroutine.

Change to these lines for the QueryString part:

For Each key in Request.Querystring
strname = key
strvalue = Request.querystring(key)
if strvalue<>"" Then
if strname = "cname" then
KeyValues(keycount)="x-" & strvalue
else
KeyValues(keycount)=strvalue
end if
Keys(keycount)=strname
keycount=keycount+1
end if
next


Jeff

Go to Top of Page

rvaga
VP-ASP Super User

USA
254 Posts

Posted - September 14 2005 :  12:22:43  Show Profile  Reply with Quote
Hope dcwebman has helped you with the workaround!

I have a related issue. The alphabet is surrounded by blue highlighting. I have looked everywhere (all the usual places) but cannot find where the color is coming from. The alphabet is not centered within the blue, which looks even worse.

Does anyone know where the blue color is set for the alphabet display, and can it be removed without affecting other tables?

Go to Top of Page

dcwebman
VP-ASP New User

USA
127 Posts

Posted - September 15 2005 :  07:36:20  Show Profile  Reply with Quote
The highlighting is in shop$colors for the TableRow constant. If you want to change it, you can create a new color name constant like TableRowAlpha and assign it whatever color you want. Then in shopproductsubs.asp in the Navigateshowalphabet subroutine, change the line
response.write TableDef & tablerow & tablecolumn
to
response.write TableDef & TableRowAlpha & tablecolumn


If you want the alphabet centered insert the following line as the very next line
response.write "& nbsp;"
Remove the space between the & and the n as I couldn't figure out how to display it in the post without just displaying a space.

This is for version 5.5.
Jeff

Go to Top of Page

UberGeek
Starting Member

USA
6 Posts

Posted - September 15 2005 :  15:47:47  Show Profile  Reply with Quote
Jeff,

Thanks for the response. I tested it against my example and it works quite well... Unfortunately my example was just that, an example, the real branding is an ' character (was trying to avoid confusion of people thinking I was putting example in 'quotes'). The ' seems to break the sql call that returns the matching products. Not sure I'll be able to use the built in alpha search.

Doing that which I do.
Go to Top of Page

dcwebman
VP-ASP New User

USA
127 Posts

Posted - September 16 2005 :  08:59:01  Show Profile  Reply with Quote
Well you should have said that the first time.

Use my same code but instead of putting the x- in the double quotes put ''

Whenever you try searching in SQL for an item that has a single quote you need to use two single quotes.
Jeff


Go to Top of Page

rvaga
VP-ASP Super User

USA
254 Posts

Posted - September 16 2005 :  11:52:11  Show Profile  Reply with Quote
Jeff, Thanks!!

I noticed where you suggested in Shop$colors, was commented-out:

'Const TableRow="<tr bgcolor='#FFFFFF'>"
Const TableRow="<tr bgcolor='#B1D4F0'>"

Just curious, I switched the commented out to:

Const TableRow="<tr bgcolor='#FFFFFF'>"
'Const TableRow="<tr bgcolor='#B1D4F0'>"

This removed the color (rather, switched it to white). I was curious where else the color would be removed. On the checkout page, the blue disappeared from the customer name/address fields. Fine with me! I think it looks more "contemporary" without the blue in the table.

As you suggested, I went to shopproductsubs (vs. 5.5) and added the & nbsp; (actually, entered five of 'em), and the result is a centered alphabet. Well, close enough to centered to suit me. Looks much better.

Thanks again, always great to get such helpful advice from someone who knows what he's doing!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000