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

Search Box

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-02-2009, 03:35 PM
 
DanS DanS is offline
 

Member
  
Join Date: Apr 2009
Posts: 10
 

Default Search Box

I want to add a simple search box so customers can search and quickly find a certain product.
According to the Xcart manual, the search.tpl template should be located in the skin1/customer folder but it's not there. Is there somewhere I can get it?
__________________
x-cart gold vers.4.2.2
Reply With Quote
  #2  
Old 08-02-2009, 03:40 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: Search Box

Enable debugging mode in general settings.
You can see what files are called on a page, including the search template.
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 08-02-2009, 04:06 PM
 
DanS DanS is offline
 

Member
  
Join Date: Apr 2009
Posts: 10
 

Default Re: Search Box

Thank you for your reply.

I enabled the debugging console but I don't see a search.tpl listed there either.
I'm working on this with another person and I'm wondering if it was deleted by accident. Is there a way I can get the original search.tpl file back?

I see a search_sort_by.tpl but I don't think that's what I'm currently looking for.
__________________
x-cart gold vers.4.2.2
Reply With Quote
  #4  
Old 08-02-2009, 04:29 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: Search Box

Could be that its because its not in an actual template file.

Look in /skin1/customer/head.tpl and search for "search" without the quotes.

Quote:
<div class="search">
<div class="sin">{$lng.lbl_search}:</div>
<form method="post" action="search.php" name="productsearchform" class="sin">

<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_descr]" value="Y" />
<input type="hidden" name="posted_data[by_sku]" value="Y" />
<input type="hidden" name="posted_data[search_in_subcategories]" value="Y" />
<input type="hidden" name="posted_data[including]" value="all" />

{strip}

<input type="text" class="srchin" name="posted_data[substring]" size="16" value="{$search_prefilled.substring|escape}" />
{include file="customer/buttons/button.tpl" type="input" button_title="OK"}
{*<a href="search.php" class="search">{$lng.lbl_advanced_search}</a>*}
{/strip}

</form>

</div>

That would be my search form.
__________________
- Shane Munroe
Reply With Quote
  #5  
Old 08-03-2009, 08:55 AM
 
DanS DanS is offline
 

Member
  
Join Date: Apr 2009
Posts: 10
 

Default Re: Search Box

I looked in skin1/customer/head.tpl and this is the only reference to search I found.

Quote:


{if $main ne "fast_lane_checkout"}
<tr>
<td class="HeadLine" height="22">
{if $usertype eq "C"}
{ include file="customer/search.tpl" }
{/if}
</td>


It seems like this would be a simple feature, easily enabled.
__________________
x-cart gold vers.4.2.2
Reply With Quote
  #6  
Old 08-03-2009, 09:04 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Search Box

the search function is automatically enabled in x-cart. And by the looks of the code you should see the search box.

can you provide the URL?
__________________
xcart 5.1.2
Reply With Quote
  #7  
Old 08-03-2009, 09:56 AM
 
DanS DanS is offline
 

Member
  
Join Date: Apr 2009
Posts: 10
 

Default Re: Search Box

http://www.eatsprouts.com/shop/

I hope that helps.
__________________
x-cart gold vers.4.2.2
Reply With Quote
  #8  
Old 08-03-2009, 10:05 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Search Box

Your whole header is redesigned and the original code for search.tpl is deleted. Open skin1_original/customer/head.tpl, get the code from there and inserted back to skin1/cusotmer/head.tpl
Or even better copy the original head.tpl to skin1/customer and start over. You are using 4.2.x and it's css based and you are putting back tables - no good
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 08-04-2009, 01:20 PM
 
DanS DanS is offline
 

Member
  
Join Date: Apr 2009
Posts: 10
 

Default Re: Search Box

Thank you everyone for your input. Problem solved.
__________________
x-cart gold vers.4.2.2
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 03:52 PM.

   

 
X-Cart forums © 2001-2020