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)
-   -   How to relocate the search box? (https://forum.x-cart.com/showthread.php?t=572)

ArlyDude 11-07-2002 11:02 AM

How to relocate the search box?
 
Hello, me again! Ok, now I don't wanna try to relocate this myself and screw up my page, so I will just ask....
Ok, I will post the html code i have for my entire head.tpl I want to relocate the search box from where it is now on the left, to the right hand side of the gray bar I have under my logo....so it will still remain in the head.tpl. This doesn't seem to hard, but I'm afriad to do it on my own, because I was screwing with the header yesterday and i got an error message and i have to reinstall my cart!!

head.tpl code...

{* $Id: head.tpl,v 1.21 2002/09/05 12:43:21 zorg Exp $ *}
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=TableTop width=100% style="border-left-width: 0; border-right-width: 0">
<TR>
<TD colSpan=2 valign="top" width="284">
[img]{$ImagesDir}/daredlogo3.jpg[/img]</TD>
<TD align=right bgcolor="#000000">
{if $main eq "catalog" and $current_category.category eq "" and $all_languages_numba gt 1}
<FORM action="home.php" method=GET name=sl_form>
<SELECT name=sl onChange="javascript: document.sl_form.submit()">

{section name=ai loop=$all_languages}
<OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION>

{/section}
</SELECT>
</FORM>
{else}

{/if}
</TD>
</TR>
<TR>
<TD colSpan=3 width="284" bgcolor="#C0C0C0" height="25" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="483">
<tr>
<td width="28">
[img]{$ImagesDir}/home.gif[/img]</td>
<td width="40"><font color="#000000">Home</font></td>
<td width="28">
[img]{$ImagesDir}/clipboard.gif[/img]</td>
<td width="83"><font color="#000000">Free Quote</font></td>
<td width="25">
[img]{$ImagesDir}/hammer.gif[/img]</td>
<td width="75"><font color="#000000">PC Repair</font></td>
<td width="25">
[img]{$ImagesDir}/tracking.gif[/img]</td>
<td width="89"><font color="#000000">Web Design</font></td>
<td width="25">
[img]{$ImagesDir}/rmabox.gif[/img]</td>
<td width="65"><font color="#000000">Reseller?</font></td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD class=WhiteLine valign=center width=70></TD>
<TD class=WhiteLine valign=center></TD>
<TD rowSpan=3 width=99% valign=top class=TableTop style="background-repeat: repeat-x">




<P align=right><SPAN class=TableTopTextNumberOfArticles>{insert name="productsonline"} {$lng.lbl_products} {if $config.General.show_in_stock eq "Y"}{$lng.lbl_and} {insert name="itemsonline"} {$lng.lbl_items} {/if}{$lng.lbl_online}</SPAN></P>
</TD>
</TR>
<td>
{if $usertype eq "C"}
<form method="get" action="search.php" name=productsearchform>
<tr>
<td valign="middle" class="WhiteLine" width=34>


<span class="TableTopLabel">{$lng.lbl_search}:</span></p>
</td>
<td valign="middle" class="WhiteLine" width=250>
<p align="left">
<input type="text" name="substring" size="16" value="{$smarty.get.substring|escape}">
<span class="TableCenterProductPriceBlue">{include file="buttons/search_head.tpl"}</span>
</p>
</td>
</tr>
<tr>
<td class="WhiteLine" width=34></td>
<td class="WhiteLine">
<p align="left">{$lng.lbl_advanced_search}</p>
</td>
</tr>
</form>
{else}
<tr>
<td class="WhiteLine"> </td>
<td class="WhiteLine"> </td>
</tr>
<tr>
<td class="WhiteLine"> </td>
<td class="WhiteLine"> </td>
</tr>
{/if}
</TABLE>


Parrot 11-07-2002 04:37 PM

I am no expert by any means, but perhaps you could try first copying the entire code to your notepad, then altering your code. If you have yet to make any changes, you would just hit the restore template.

I see something in the code, which seems to be driving the search to the left. Change it to the right and check it. I usually open the site both in admin and another browser page for the customer end. This allows you to view your changes the moment you refresh the customer page.

Here is the code:
<form method="get" action="search.php" name=productsearchform>
<tr>
<td valign="middle" class="WhiteLine" width=34>


<span class="TableTopLabel">{$lng.lbl_search}:</span></p>
</td>
<td valign="middle" class="WhiteLine" width=250>
<p align="left">
<input type="text" name="substring" size="16" value="{$smarty.get.substring|escape}">
<span class="TableCenterProductPriceBlue">{include file="buttons/search_head.tpl"}</span>


Try changing that to: <p align="right">
This small change will not cause an error!

ArlyDude 11-07-2002 05:12 PM

Thanks, but this is what I want to do...
 
Here is my page... http://www.digitaladdition.net/xcart/customer/home.php

Look at the top of my page...the horizontal gray line with Home..Free Quote...etc, i want the search box to be positioned in that on the right hand side..I will try to goof with it, but I know I was goofing yesterday I think it was, and I got an error, and my cart wouldn't work until i reloaded the skin files!

ArlyDude 11-07-2002 06:35 PM

Help!
 
PPPPPPLLLLLLLLEEEEAAAAAAAASSSSSSSSSEEEEEEEEE!!!! I am getting tired of trying to relocate this search bar! Help me!

syddos 11-12-2002 05:13 AM

Quote:

Originally Posted by ArlyDude
PPPPPPLLLLLLLLEEEEAAAAAAAASSSSSSSSSEEEEEEEEE!!!! I am getting tired of trying to relocate this search bar! Help me!




Quote:

{* $Id: head.tpl,v 1.21 2002/09/05 12:43:21 zorg Exp $ *}
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=TableTop width=100% style="border-left-width: 0; border-right-width: 0">
<TR>
<TD colspan=2 valign="top" width="284">
[img]{$ImagesDir}/daredlogo3.jpg[/img]</TD>
<TD align=right bgcolor="#000000">
{if $main eq "catalog" and $current_category.category eq "" and $all_languages_numba gt 1}
<FORM action="home.php" method=GET name=sl_form>
<SELECT name=sl onChange="javascript: document.sl_form.submit()">

{section name=ai loop=$all_languages}
<OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION>

{/section}
</SELECT>
</FORM>
{else}

{/if}
</TD>
</TR>
<TR>
<TD colSpan=3 width="100%" bgcolor="#C0C0C0" height="25" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" NOWRAP>
<TABLE BORDER="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="839">
<tr>
<td width="28">
[img]{$ImagesDir}/home.gif[/img]</td>
<td width="40"><font color="#000000">Home</font></td>
<td width="28">
[img]{$ImagesDir}/clipboard.gif[/img]</td>
<td width="83"><font color="#000000">Free Quote</font></td>
<td width="25">
[img]{$ImagesDir}/hammer.gif[/img]</td>
<td width="75"><font color="#000000">PC Repair</font></td>
<td width="25">
[img]{$ImagesDir}/tracking.gif[/img]</td>
<td width="89"><font color="#000000">Web Design</font></td>
<td width="25">
[img]{$ImagesDir}/rmabox.gif[/img]</td>
<td width="65"><font color="#000000">Reseller?</font></td>




<TD valign=center align=right WIDTH="24" height="15">
{ if $usertype ne "C" }
<form method="get" action="search.php" name=productsearchform>
<font color="#000000">{$lng.lbl_search}:
</font></TD>
<TD valign=center align=left WIDTH="40" height="15">
<input type="text" name="substring" size="16" value="{$smarty.get.substring|escape}">
</TD><TD valign=center WIDTH="26" height="15">
<a
href="javascript:document.productsearchform.submit ()">
{include file="buttons/search_head.tpl"}</a>
</TD>


</form>
{else}
<td WIDTH=260>
</td>

{/if }


</tr>
</table>
</TD>
</TR>
<TR>
<TD class=WhiteLine valign=center width=70></TD>
<TD class=WhiteLine valign=center></TD>
<TD rowSpan=3 width=99% valign=top class=TableTop style="background-repeat: repeat-x">




<P align=right><SPAN class=TableTopTextNumberOfArticles>{insert name="productsonline"} {$lng.lbl_products} {if $config.General.show_in_stock eq "Y"}{$lng.lbl_and} {insert name="itemsonline"} {$lng.lbl_items} {/if}{$lng.lbl_online}</SPAN></P>
</TD>
</TR>
<td>
</TABLE>


Regards,


All times are GMT -8. The time now is 12:34 AM.

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