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)
-   -   Search Box (https://forum.x-cart.com/showthread.php?t=48962)

DanS 08-02-2009 03:35 PM

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?

Shamun 08-02-2009 03:40 PM

Re: Search Box
 
Enable debugging mode in general settings.
You can see what files are called on a page, including the search template.

DanS 08-02-2009 04:06 PM

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.

Shamun 08-02-2009 04:29 PM

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.

DanS 08-03-2009 08:55 AM

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.

ARW VISIONS 08-03-2009 09:04 AM

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?

DanS 08-03-2009 09:56 AM

Re: Search Box
 
http://www.eatsprouts.com/shop/

I hope that helps.

cflsystems 08-03-2009 10:05 AM

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

DanS 08-04-2009 01:20 PM

Re: Search Box
 
Thank you everyone for your input. Problem solved.


All times are GMT -8. The time now is 07:35 PM.

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