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 place my search box in the speed bar? (https://forum.x-cart.com/showthread.php?t=46782)

dolaghan 04-06-2009 12:56 AM

How to place my search box in the speed bar?
 
hi, does anyone know the code to do this?
any help would be appreciated

regards

Victor D 04-06-2009 01:14 AM

Re: How to place my search box in the speed bar?
 
skin1/customer/top_menu.tpl replace
Code:

{section name=sb loop=$speed_bar}
{if $speed_bar[sb].active eq "Y"}
<td valign="top">{include file="customer/tab.tpl" tab_title="<a href=\"`$speed_bar[sb].link`\">`$speed_bar[sb].title`</a>"}</td>
<td width="1"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td>
{/if}
{/section}


with
Code:

{section name=sb loop=$speed_bar}
{if $speed_bar[sb].active eq "Y"}
<td valign="top">{include file="customer/tab.tpl" tab_title="<a href=\"`$speed_bar[sb].link`\">`$speed_bar[sb].title`</a>"}</td>
<td width="1"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td>
{/if}
{/section}
<td valign="top">{include file="customer/search.tpl"}</td>

and remove
Code:

{if $usertype eq "C"}
{ include file="customer/search.tpl" }
{/if}

from skin1/head.tpl

dolaghan 04-06-2009 01:49 AM

Re: How to place my search box in the speed bar?
 
Thanks for that it did the job.
How do i adjust it though to have the links left justified and the search box right justified?

Regards

Victor D 04-06-2009 01:57 AM

Re: How to place my search box in the speed bar?
 
customer/top_menu.tpl
Code:

{if $printable ne ''}
{include file="customer/top_menu_printable.tpl"}
{else}
<table cellpadding="0" cellspacing="0" width="100%">
{if $speed_bar}
<tr>
<td valign="top" align="left">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
{section name=sb loop=$speed_bar}
{if $speed_bar[sb].active eq "Y"}
<td valign="top">{include file="customer/tab.tpl" tab_title="<a href=\"`$speed_bar[sb].link`\">`$speed_bar[sb].title`</a>"}</td>
<td width="1"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td>
{/if}
{/section}
<td valign="top" width="100%" align="right">{include file="customer/search.tpl"}</td>
</tr>
</table>
</td>
</tr>
{/if}
<tr>
<td height="35" align="center" class="HeadText">
{if $config.Company.company_phone}{$lng.lbl_phone_1_title}: {$config.Company.company_phone}{/if}{if $config.Company.company_phone_2}&nbsp;&nbsp;&nbsp;{$lng.lbl_phone_2_title}: {$config.Company.company_phone_2}{/if}&nbsp;&nbsp;</td>
</tr>
</table>
{/if}


dolaghan 04-06-2009 02:11 AM

Re: How to place my search box in the speed bar?
 
i have followed this but now have this - http://www.completefone.com/home.php
regards

im also after some custom work doing would you be interested in this?

Victor D 04-06-2009 02:27 AM

Re: How to place my search box in the speed bar?
 
try to move this cell into the outer table:
Code:

{/section}
<td valign="top" width="100%" align="right">{include file="customer/search.tpl"}</td>
</tr>
</table>
</td>


Code:

{/section}
</tr>
</table>
</td>
<td valign="top" width="100%" align="right">{include file="customer/search.tpl"}</td>


dolaghan 04-06-2009 03:13 AM

Re: How to place my search box in the speed bar?
 
hi, thanks its sort of working.
ive sent you a PM with some details and also information on the work i need doing, maybe you would be interested in the job.

regards

promart418 04-21-2009 02:26 PM

Re: How to place my search box in the speed bar?
 
Does anyone know how to move the search box to its own vertical menu box, just above the shopping basket vertical menu on the right hand side of the screen?

And, remove the horizontal bar that contained the search box?

Thanks.

Martin Procter
http://www.promartsupplements.co.uk

(p.s. does anyone know how to edit their signature in the forums to provide a link with anchor text, rather than URL?)

Victor D 04-22-2009 12:05 AM

Re: How to place my search box in the speed bar?
 
Your skin is customized so I'm not sure if it helps
the common solution is to create a new file in skin1/customer with name for example menu_search.tpl
and paste into it
Code:

{capture name=menu}
<form method="post" action="search.php" name="productsearchform">
<input type="hidden" name="simple_search" value="Y" />
<input type="hidden" name="mode" value="search" />
<input type="hidden" name="posted_data[by_title]" value="Y" />
<input type="hidden" name="posted_data[by_shortdescr]" value="Y" />
<input type="hidden" name="posted_data[by_fulldescr]" value="Y" />
<input type="hidden" name="posted_data[by_sku]" value="Y" />
<input type="hidden" name="posted_data[including]" value="all" />
<table cellpadding="0" cellspacing="0"  width="100%">
<tr>
<td valign="middle" style="padding:0px;" align="right" width="100%"><input type="text" name="posted_data[substring]"  value="{$search_prefilled.substring|escape}" /></td>
    <td valign="middle" style="padding-left:3px;" >
<table cellspacing="0" cellpadding="0" onclick="javascript: document.productsearchform.submit();">
    <tbody>
        <tr>
          <td style="padding:0px;"><a href="javascript: document.productsearchform.submit();">{include file="buttons/go.tpl"}</a></td>
      </tr>
    </tbody>
</table>
    </td>
</tr>
</table>
<a href="search.php" style="background:none;padding-left:0px" ><u>{$lng.lbl_advanced_search}</u></a>
</form>
{/capture}
{include file="menu.tpl"  menu_title=$lng.lbl_search menu_content=$smarty.capture.menu}


then find in your customer/home.tpl
Code:

{include file="customer/menu_cart.tpl" }
<br />


and insert right after it
Code:

{include file="customer/menu_search.tpl" }

I need your skin1/head.tpl to find how to remove existing searchbox


All times are GMT -8. The time now is 07:47 PM.

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