![]() |
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.
|
I believe its products.tpl or products_t.tpl
|
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. |
Thank you very much, greatly appreciated. :)
|
Worked like a charm, thank you.
|
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? :roll:
|
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.
|
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> Thank you very much (also, for what it's worth, I tried playing around with this to add it myself all with errors :( ). |
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> |
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) |
If you put javascript in smarty template files you have to escape them with
{literal} {/literal} tags, or else the javascript { } gets intereted as smarty tags. :D Your code should work like this :) Code:
<body> |
That worked perfect! Thank you very much!! :)
|
Sorry bluecat, I didn't think to add the {literal} tags for the javascript. Glad it worked out for you.
|
All times are GMT -8. The time now is 05:40 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.