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

How to relocate the search box?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-07-2002, 11:02 AM
 
ArlyDude ArlyDude is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: Pennsylvania
Posts: 39
 

Default 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>

Reply With Quote
  #2  
Old 11-07-2002, 04:37 PM
 
Parrot Parrot is offline
 

eXpert
  
Join Date: Sep 2002
Location: MD USA
Posts: 350
 

Default

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!
Reply With Quote
  #3  
Old 11-07-2002, 05:12 PM
 
ArlyDude ArlyDude is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: Pennsylvania
Posts: 39
 

Default 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!
Reply With Quote
  #4  
Old 11-07-2002, 06:35 PM
 
ArlyDude ArlyDude is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: Pennsylvania
Posts: 39
 

Default Help!

PPPPPPLLLLLLLLEEEEAAAAAAAASSSSSSSSSEEEEEEEEE!!!! I am getting tired of trying to relocate this search bar! Help me!
Reply With Quote
  #5  
Old 11-12-2002, 05:13 AM
 
syddos syddos is offline
 

eXpert
  
Join Date: Sep 2002
Location: London, England, UK
Posts: 259
 

Default

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,
__________________
Syddos

Nothing is impossible, We just don't know how to do it ........Yet!

Xcart 4.1.X PRO (Testing Platform: winXP Pro)
Perl 5.8.7 (win32)
WINAMP 1.6.3 (win32 server package. Includes the following)
- phpMyAdmin v2.8.03
- MySql 5.0.21
- Apache 2.0.55 (win32)
- php 5.1.4
- SQLitemanager 1.2.0
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:14 AM.

   

 
X-Cart forums © 2001-2020