X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Search Option Deleted (https://forum.x-cart.com/showthread.php?t=1840)

jeffwill 03-11-2003 01:43 PM

Search Option Deleted
 
I've updated my head.tpl file and got it looking like I want. In doing so, I deleted the search functionality. I knew that I would be doing this, so I wasn't surprised.

I want to add the search functionality to the pages. Since I've made the head.tpl file into a {Literal}...{/Literal} statement, I don't know where or how to fix this up.

I'd like to add it somewhere where it will be available on every page, just like it was when it was in the head.tpl file.

Can't I just copy some code and place it in the right or left column somewhere?

Any ideas?

Thanks,

Jeff

shan 03-11-2003 02:13 PM

Here you go Jeff.

This will add a menu type box with the search in it.

This is from v3.3.3 but should be ok in other versions but may need the styles changed around a little

create a new file search.tpl and add it to skin1 dir

Code:

{* $Id: shan_menu_search.tpl,v 1.13 2003/03/11 07:06:43 Shan Exp $ *}
<TABLE width="100%" border=0 cellPadding=5 cellSpacing=0>
  <TR>
    <TD width="26" height=26 class=VertMenuTitle>[img]{$ImagesDir}/dingbats_help.gif[/img]</TD>
    <TD class=VertMenuTitle height=26 valign=center>{$lng.lbl_search}</TD>
  </TR>

</table>
<TABLE width="100%" border=0 cellPadding=5 cellSpacing=0>
  <form method="get" action="../customer/search.php" name=productsearchform><tr>
    <td class=VertMenuItems><input type="text" name="substring" size="16" value="{$smarty.get.substring|escape}">
    </td>
  </tr>
  <tr>
    <td class=VertMenuItems><a href="javascript:document.productsearchform.submit()">{include
      file="buttons/search_head.tpl"}</a> </td>
  </tr>
  <tr>
    <td class=VertMenuItems>{$lng.lbl_advanced_search}</td>
  </tr></form>
</table>


Now in skin1/customer/home.tpl add the following bit of code where you want the new search file to appear

Code:

{ include file="search.tpl" }


All times are GMT -8. The time now is 06:23 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.