Search button not linking up to search template?

General ShopSite user discussion

Search button not linking up to search template?

Postby 8900200 » Sun Nov 04, 2007 9:25 am

I've got the search box displaying on my pages, but for some reason the cgi program isn't linking up correctly. I get a page can not be displayed. See:

http://apoggi.com/shopsite_sc/ic-decorative-pieces.htm

Any ideas?

Here is my code:

<form action="[-- SHOPPING_CART_URL BASE --]/productsearch.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="called_from_results" value="">
<input type="hidden" name="orig_search_field" value="" >
<input type="hidden" name="index_items" value="" >
<input class="" name="search_field" type="text" size="22" value="search">
<input class="" type="submit" name="Search" width="60" height="20" value="SEARCH">
</form>

And here is the actual HTML produced:

<form action="http://apoggi.com/shopsite_sc/sc/productsearch.cgi" method="post">
<input type="hidden" name="storeid" value="*12effaa3d0651a790240ed">
<input type="hidden" name="called_from_results" value="">
<input type="hidden" name="orig_search_field" value="" >
<input type="hidden" name="index_items" value="" >
<input class="" name="search_field" type="text" size="22" value="search">
<input class="" type="submit" name="Search" width="60" height="20" value="SEARCH">
</form>

Thanks.

PS - Verio chastised me for changing the url settings in this Dev site back the IP address for testing with another potential URL issue a few weeks ago. I mean chastised. I was accused of all sorts of things. Anyway, could the cgi be having issues with the the public domain not being pointing to this instance of the site?
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Postby davee123 » Tue Nov 06, 2007 4:20 pm

I'm no expert on Shop Site, but you might want to provide some more details if you'd like an answer. You mention a development site, but you haven't really said what it is or whether you're moving to Shop Site from some other software or if you've always had a Shop Site Dev site. Are you having problems with the dev site, or the live site? Do you have links to the site that you're having problems with, since the links you provided seem (to me anyway) to be broken? Do you know the URL that your searches are supposed to be going to?

As I said, I don't really know, but I would expect the problem is either in the web interface under Preferences -> Hosting Service, or it's an underlying configuration setting (it looks from the Shop Site service I work with that it's "Store URL", which isn't configurable on the web interface, so you may need to work with your service provider or ShopSite contact). At a guess, it sounds like your development site is attempting to point at your live site, so it's not linking together correctly. But that's just an uneducated guess.

DaveE
davee123
 
Posts: 8
Joined: Tue Oct 09, 2007 7:56 am
Location: Massachusetts, USA

Postby 8900200 » Tue Nov 06, 2007 4:52 pm

Hi Dave -

Thanks. Sorry about the dev site. I've been chatting with Jim some on this site and thought it was clear the setup. Yes, that is a dev site and I am using my hosts file to override the DNS settings. The page should come up with the IP for those without the host file change:

http://198.173.73.52/shopsite_sc/ic-dec ... pieces.htm


The settings are correct in my Hosting area of the admin utility. And the only way to debug is to have the host file setup to point the domain to the temp site.

My question remains the same though, does the code I provided above look correct?

Thanks for the response.
Rich
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Postby Jim » Tue Nov 06, 2007 6:50 pm

The form information looks correct but the url does not work, so you must have a misconfiguration on what your shopping cart url is.

If you try to go to

http://apoggi.com/shopsite_sc/sc/productsearch.cgi

by itself you get a page not found error when you should be getting a "Error in form" message (since you haven't submitted proper parameters).
So you need to check what the proper shopping cart url should be and use that. Check with who ever hosts your store and find out what the correct url is.

If I try the same thing with http://198.173.73.52/shopsite_sc/sc/productsearch.cgi
Then I do get an Error in Form message so that is going to the proper location if you use that the search form should work.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby 8900200 » Tue Nov 06, 2007 8:21 pm

That makes sense that for you that the http://apoggi.com/shopsite_sc/sc/productsearch.cgi link would return a 404 error since your host file isn't changed. But for me it is changed. And I just noticed that when I go to the apoggi one I get the form error. What's really odd is that when I use the IP based one (and the apoggi one too) it fails when it's compiled into the custom template. I mean here is it:

<form action=" http://198.173.73.52/shopsite_sc/sc/productsearch.cgi" method="post">
<input type="hidden" name="storeid" value="*1ceafefa513446a0a0d047faf6a9e244">
<input type="hidden" name="called_from_results" value="">
<input type="hidden" name="orig_search_field" value="" >
<input type="hidden" name="index_items" value="" >
<input name="search_field" type="text" size="22">
<input type="submit" name="Search" value="Search">
</form>

and I get a 404 error. Man, this is strange. Any other ideas?

Rich
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Postby Jim » Tue Nov 06, 2007 9:34 pm

I copied your code from the last post and put it in my own test store page header. I then did a search for test and I ended up on your site (http://198.173.73.52/shopsite_sc/sc/productsearch.cgi) with the following search results:

Search Results
Search Results for: test
Citrus basket EUR 89.00 $103.83 themesmedia/tab_blue_button_add.gif themesmedia/tab_blue_button_view.gif
Alessi design stands the test of time. This simple citrus basket was designed in 1952


So the search did work. The search forms on the search results page are however going to http://apoggi.com/shopsite_sc/sc/productsearch.cgi so they don't work. So I added an entry to my hosts file for 198.173.73.52 apoggi.com and then the search forms on the search results page worked too.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby 8900200 » Wed Nov 07, 2007 7:10 am

I get the same results when I add a form on the home page(not a store generated page) call into the search. However, I don't get a page when the same form is added on a store generated page? It still errors.

Now that you have the hosts file setup, try the test search on:
http://apoggi.com/shopsite_sc/ic-dinner-sets.htm

still scratching my head....

Rich
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Postby Jim » Wed Nov 07, 2007 7:30 am

You have 2 forms on the page and the search form is nested within the other one. This makes the submit go to the url specified in the first form tag and not the one for the second. So you need to clean up your page source so there is no nesting of form tags.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby 8900200 » Wed Nov 07, 2007 7:38 am

Thanks. I had just stumbled across this myself. Must have gotten created when I put a stub search box in there for testing.
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 137 guests