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)
-   -   Adding minicart inside search bar...? (https://forum.x-cart.com/showthread.php?t=20438)

rkdiddy 03-10-2006 02:44 PM

Adding minicart inside search bar...?
 
I'm interested in adding my minicart inside my search bar on the top of my site. I would like the search function left justified and the mini cart right justified. I believe I need to make the bar as a table with two columns, but I have no idea to start. Below is my head.tpl code...please help! :?

As of right now my minicart is right below the bar...I highlighted it below...

Thanks!

Quote:

{* $Id: head.tpl,v 1.40.2.3 2004/11/19 06:40:15 max Exp $ *}
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD width="7"></TD>
<TD>[img]{$ImagesDir}/xlogo.gif[/img]</TD>
<TD valign="bottom" align="right" class="tab_spacer">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}
</TD></TR>
</TABLE>
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD>[img]{$ImagesDir}/headline_left.gif[/img]</td>
<TD class="HeadLine" width="73%" background="{$ImagesDir}/headline_center.gif">
{if $usertype eq "C"}

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

{/if}
</TD>
<TD class="HeadLine" align="right" width="27%">
{if ($usertype eq "C" || $usertype eq "B")and $all_languages_cnt gt 1}
<TABLE border="0" cellpadding="0" cellspacing="0">
<FORM action="home.php" method="GET" name="sl_form">
<INPUT type="hidden" name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.Q UERY_STRING}">
<TR>
<TD>
{$lng.lbl_select_language}:
<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>
</TD></TR>
</FORM>
</TABLE>
{else}

{/if}
</TD>
<TD>[img]{$ImagesDir}/headline_right.gif[/img]</td>
</TR>


<TR>
<TD colspan="4" class="NumberOfArticles" align="right">
{include file="customer/main/minicart.tpl"}
</TD>
</TR>


<TR>
<TD colspan="4" valign="middle" height="5">
<TABLE cellspacing="0" cellpadding="0" border="0" width="100%" height="1">
<TR>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'}
<TD width="100%" valign="middle" align="right">{include file="printable.tpl"}</TD>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
{/if}
</TR>
</TABLE>
</TD>
</TR>
</TABLE>


Total Hosting 03-10-2006 03:18 PM

Well, in order to get the effect you want, you will probably need to copy and then make a mincarthoriz.tpl and use that to create the layout you want for the minicart to have.

This way you can pull off any layout you want, and still have the default look of the cart, if you want.

Hope that gives you some help.

rkdiddy 03-10-2006 06:31 PM

Hi Total Hosting,

Thanks for the information above. I actually have the minicart layout on one line (looking good). I just need to know how in the head.tpl to split the search bar...one side search and one side minicart.

Thanks.

Total Hosting 03-10-2006 06:40 PM

Well, I haven't tried it, but what I would look at in head.tpl is around line 17
Code:

<TD class="HeadLine" height="22">
{if $usertype eq "C"}
{ include file="customer/search.tpl" }
{/if}
</TD>


I am assuming you are using this search.tpl for your search layout. If so, just make a new table (1R, 2C) inside the TD and then put the search call inside one set of TDs and then call in the minicart.tpl in the other.

*should* work.

How are you calling minicart into the head now?


All times are GMT -8. The time now is 05:39 PM.

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