Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Search results page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-18-2004, 05:17 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default Search results page?

Hi. I simply want to add a link like "Didn't find what you were looking for? Click here" when a user gets zero results from a search. Can anyone tell me that template? Thank you.
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #2  
Old 05-18-2004, 05:42 AM
 
Mod King Mod King is offline
 

Senior Member
  
Join Date: May 2004
Posts: 115
 

Default

I believe its products.tpl or products_t.tpl
__________________
Mod King
Reply With Quote
  #3  
Old 05-18-2004, 06:40 AM
 
jeremye jeremye is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Philadelphia, PA
Posts: 158
 

Default

Look in /skin1/customer/main/search_result.tpl. Replace the third to the last line:

Code:
{include file="dialog.tpl" title=$lng.lbl_search_results content="No matching products found" extra="width=100%"}

with:
Code:
{include file="dialog.tpl" title=$lng.lbl_search_results content="Didn't find what you were looking for? Click <a href=here.php>here</a>" extra="width=100%"}

Don't put any quotes inside the a href tag. That'll do it.
__________________
Jeremy
X-Cart Gold v3.4.14 [Linux/Apache]
Heavily Modded
Reply With Quote
  #4  
Old 05-18-2004, 07:44 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

Thank you very much, greatly appreciated.
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #5  
Old 05-18-2004, 08:02 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

Worked like a charm, thank you.
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #6  
Old 05-18-2004, 09:30 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

I've learned to take the new knowledge and run with it because not everyone will respond, but if I could ask one more tiny question, is it possible some how to insert html in there?
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #7  
Old 05-18-2004, 09:32 AM
 
jeremye jeremye is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Philadelphia, PA
Posts: 158
 

Default

Yeah, you sure can, but just be careful to not include any double quotes. Tell me what you want to include and we can work on it, or at least I'll give you an example.
__________________
Jeremy
X-Cart Gold v3.4.14 [Linux/Apache]
Heavily Modded
Reply With Quote
  #8  
Old 05-18-2004, 12:35 PM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

This is what I'd like to add (I've edited the urls, so they're not correct, but will fix them of course).

Code:
<body> <p style="margin-top: 0; margin-bottom: 0"> <font color="#0000FF" style="font-size: 9pt"> [img]http://mysite.com/anim_pic.gif[/img]</font></p> <p style="margin-top: 0; margin-bottom: 0"></p> <p style="margin-top: 0; margin-bottom: 0"></p> <p style="margin-top: 0; margin-bottom: 0"> <font face="Verdana" style="font-size: 9pt"><font color="#0000FF">Didn't find what you were looking for?</font> We probably have it and it's just not yet listed in our store. <script> //Popup Window Script //By JavaScript Kit (http://javascriptkit.com) //JavaScript tutorials and over 400+ free scripts function openpopup(){ var popurl="http://mysite.com/price_quote.htm" winpops=window.open(popurl,"","width=620,height=450,scrollbars") } </script> <font color="#FF0000"><u>Click here</u></font> to see if we have it and for a free price quote!</font></p> </body>

Thank you very much (also, for what it's worth, I tried playing around with this to add it myself all with errors ).
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #9  
Old 05-19-2004, 04:56 AM
 
jeremye jeremye is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Philadelphia, PA
Posts: 158
 

Default

I'm not sure if this will work, but try this out. I escaped all " and '.

Code:
{include file="dialog.tpl" title=$lng.lbl_search_results content="<body> <p style=\"margin-top: 0; margin-bottom: 0\"> <font color=\"#0000FF\" style=\"font-size: 9pt\"> <img src=\"http://mysite.com/anim_pic.gif\" align=\"left\" width=\"150\" height=\"94\"></font></p> <p style=\"margin-top: 0; margin-bottom: 0\"></p> <p style=\"margin-top: 0; margin-bottom: 0\"></p> <p style=\"margin-top: 0; margin-bottom: 0\"> <font face=\"Verdana\" style=\"font-size: 9pt\"><font color=\"#0000FF\">Didn\'t find what you were looking for?</font> We probably have it and it\'s just not yet listed in our store. <script> //Popup Window Script //By JavaScript Kit (http://javascriptkit.com) //JavaScript tutorials and over 400+ free scripts function openpopup(){ var popurl=\"http://mysite.com/price_quote.htm\" winpops=window.open(popurl,\"\",\"width=620,height=450,scrollbars\") } </script> <a href=\"javascript:openpopup()\"><font color=\"#FF0000\"><u>Click here</u></font></a> to see if we have it and for a free price quote!</font></p> </body>" extra="width=100%"}
__________________
Jeremy
X-Cart Gold v3.4.14 [Linux/Apache]
Heavily Modded
Reply With Quote
  #10  
Old 05-19-2004, 05:12 AM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

dang, nope. Here's what it says:

Code:
Fatal error: Smarty: [in customer/main/search_result.tpl line 10]: syntax error: invalid attribute name: '/home/xxx/public_html/store/Smarty-2.5.0/Smarty_Compiler.class.php on line 1832

Do you think the pop up window script could be messing it up?

(the xxx was edited of course)
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:50 AM.

   

 
X-Cart forums © 2001-2020