Jump to content

Adding a search box in line with the categories


Guest sgolds

Recommended Posts

Guest sgolds

All,

I've had my 2.x store up and running for a while and deceided it was time to move to 3.x. I'm working on modifying the killer skin and things are going fine. I ran into the first issue that I need help with.

My plan is to put the search box inline with the categories. I' moved the categories to the left and want a search box inline on the right.

I tried the simple thing; putting {SEARCH_FORM} next to {CATEGORIES} in index. No such luck. So now I'm trying to modify categories.tpl (see below) if there is a better/easier way that would be great. Any help is appreicated.

Identity Boardshop CC3

<!-- BEGIN: categories -->

<div class="topCats">

		<div class="topCatsBgRight">

		<span class="topCatsBgLeft"> </span>

			<table border="0" cellspacing="0" align="left" cellpadding="0">

				  <tr>

					<td class="topCatsTabLeft"> </td>

					<td class="topCatsTabMid"><a href="index.php" class="txtCat">{LANG_HOME}</a></td>

					<td class="topCatsTabRight"> </td>

 

				<!-- BEGIN: li -->

					<td class="topCatsTabLeft"> </td>

					<td class="topCatsTabMid"><a href="index.php?act=viewCat&catId={DATA.cat_id}" class="txtCat">{DATA.cat_name}</a></td>

					<td class="topCatsTabRight"> </td>

				<!-- END: li -->

				<!-- BEGIN: sale -->

					<td class="topCatsTabLeft"> </td>

					<td class="topCatsTabMid"><a href="index.php?act=viewCat&catId=saleItems" class="txtCat">{LANG_SALE_ITEMS}</a></td>

					<td class="topCatsTabRight"> </td>

				<!-- END: sale -->



				<form action="index.php" method="get">

					<td class="txtSession"><strong>{LANG_SEARCH_FOR}</strong></span><br /><input name="searchStr" type="text" class="searchBox" id="searchStr" value="{SEARCHSTR}" size="12" />

				<input type="hidden" name="act" value="viewCat" />

				<input name="Submit" type="submit" class="searchBtn" value="{LANG_GO}" /></td>

				</form>

				</tr>

			</table>

	

		</div>

</div>

<!-- END: categories -->

Link to comment
Share on other sites

Hi, it appears that you have switched now to the legend skin. At any rate, your code above will not work because you have copied boxes/session.tpl into boxes/categories.tpl, and it will not be parsed by sessions.inc.php

The way to change the appearance of sessions and search info on index page is by moving {SEARCH_FORM} in global/index.tpl as you have tried, and by editing boxes/sessions.tpl (not copying its contents to another file).

I don't understand how you plan to put it "in line" with categories in Killer, since Killer uses tabs for categories.

There are free tutorials at my site that may help you get a handle on a few of the differences between CubeCartâ„¢ 1 & 2

I'll send a PM w/link to the tutorials.

Link to comment
Share on other sites

Guest sgolds

Thanks for the reply, I've been playing around with different skins and just forgot to switch back to killer. If you take a look now you will see what I am trying to do.

This site is still very much a work in progress and I'm not really sure which direction I'm planing on heading. My initial thought was something like http://www.activemailorder.com/

Thanks again

Link to comment
Share on other sites

OK, I see now. Pasting the variable next to cat variable, as you did, is the correct solution, but first you must cause cat variable to float left . . .

<div style="position: relative;float:left;">{CATEGORIES}</div><div style="text-align:right;">{SESSIONS}</div><br clear="all" />

Then in the sessions.tpl, make sure all breaks have been removed so session info is in straight line, then edit .txtSession and .txSessionGray classes in style.css for font size, color, etc.

Edited by markscarts
Link to comment
Share on other sites

Guest sgolds

Thanks but there is still something keeping either {SEARCH} or {SESSION} from being displayed with categories.

in index.tpl I placed

<div id="subSurround">

		

		<div style="position: relative;float:left;">{CATEGORIES}</div>

		<div style="text-align:right;">{SEARCH}</div><br clear="all" />

am I missing something? :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...