Jump to content

Killer search box coding problem...


Guest BigNaz

Recommended Posts

Guest BigNaz

Still in the process of modding the killer skin as part of my CC3 learning curve...

I am trying to put the search box in a 'Box' on the left column. I have read some of the messages within the forums, and they provide a simple fix which my solution (I thought) would have the same results but follow the structure of the application (allowing the search box to be moved in the same way as mailing list etc..)

Here is my modified searchForm.tpl

<!-- ORIGINAL FORM COMMENTED OUT **************************************

<!-- BEGIN: search_form -->

<form action="index.php" method="get" style="padding: 0px; margin: 0px;">

<span class="txtSession"><strong>{LANG_SEARCH_FOR}</strong></span><br /><input name="searchStr" type="text" class="searchBox" id="searchStr" value="{SEARCHSTR}" size="14" /> <!-- Was size=22 -->

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

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

</form>

<!-- END: search_form -->

***********************************************************************-->

<!-- BEGIN: search_form side column version -->

<div class="boxTitleLeft">{LANG_SEARCH_FOR}</div>

<div class="boxContentLeft txtCopy">

  <form action="index.php" method="get" style="padding: 0px; margin: 0px;">

	<br /><input name="searchStr" type="text" class="searchBox" id="searchStr" value="{SEARCHSTR}" size="14" />

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

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

  </form>

</div>

<div class="boxFootLeft"></div>

<!-- END: search_form side column version -->

The search box and button now appear where I want them to, but there is no box surround??

This is probably a CCS prob, but I can't see it - can some point out my mistakes please???

Link to comment
Share on other sites

Replace your searchform.tpl with this (backup first)

<!-- BEGIN: search_form -->

<div class="boxTitleLeft">Search</div>

<div class="boxContentLeft">

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

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

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

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

</form>

</div>

<!-- END: search_form -->

Move the {SEARCH_FORM} tag from the Killer/styleTemplates/global/index.tpl & cart.tpl to either the left or right columns.

Link to comment
Share on other sites

Guest BigNaz

Many thanks...

Although it looked a little odd until I added a

<div class="boxFootLeft"></div>

At the end!

That's it working now, I've just got to figure out where I went wrong?!?

Thanks again...

Link to comment
Share on other sites

I've just got to figure out where I went wrong?!?

You didn't actually comment out the form in the original code. You tried, but this didn't work - because the first comment area will end when the browser encounters the very next ending comment tag which is at

BEGIN: search_form -->

Your commenting had to stop there, and as a result you actually didn't comment away any of the old code at all. Your closing comment tag was then meaningless, too.

I would suggest you use a good texteditor that highlights the language, then you can see immediately if the comment tags work. I use Notepad++ from sourceforge. If you are using a good text editor that does do this, but doesn't seem to work on the CubeCartâ„¢ .tpl files, just add the .tpl extension as XML language in your text editor's configuration. It can save you alot of simple syntax mistakes.

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