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

Adding minicart inside search bar...?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-10-2006, 02:44 PM
  rkdiddy's Avatar 
rkdiddy rkdiddy is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 60
 

Default 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>
__________________
Stealth Cords - Discrete Power Cords for Automotive Enthusiasts
www.stealthcords.com
X-Cart version: 4.1.9
Reply With Quote
  #2  
Old 03-10-2006, 03:18 PM
 
Total Hosting Total Hosting is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 52
 

Default

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.
__________________
Regards,

Peter Stoermer
http://www.TotalHosting.com for http://www.EmpowermentGroup.com
X-cart: 4.0.17
Reply With Quote
  #3  
Old 03-10-2006, 06:31 PM
  rkdiddy's Avatar 
rkdiddy rkdiddy is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 60
 

Default

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.
__________________
Stealth Cords - Discrete Power Cords for Automotive Enthusiasts
www.stealthcords.com
X-Cart version: 4.1.9
Reply With Quote
  #4  
Old 03-10-2006, 06:40 PM
 
Total Hosting Total Hosting is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 52
 

Default

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?
__________________
Regards,

Peter Stoermer
http://www.TotalHosting.com for http://www.EmpowermentGroup.com
X-cart: 4.0.17
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 01:12 PM.

   

 
X-Cart forums © 2001-2020