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)
-   -   Changing the "search" area. (https://forum.x-cart.com/showthread.php?t=5949)

Jeremy Denton 01-10-2004 10:18 AM

Changing the "search" area.
 
Hi all,

Need some help. I would like to modify the search box on my site. I would like to remove the dropdown menu and have only the search box.

can anyone tell me where this template would be?

Ive searched for it and cant find it anywhere.

leon 01-10-2004 11:37 AM

You're on an old version, cause I havent seen that option (dropdown search menu). But it would probably be in /skin1/customer/search I suppose.

Jeremy Denton 01-10-2004 12:26 PM

I found it! figures.. but I dont know what code to pull out.

here it is.

{* $Id: search_result.tpl,v 1.15 2002/06/13 11:58:02 zorg Exp $ *}
{ include file="location.tpl" last_location=$lng.lbl_search_products }
{capture name=dialog}
<table border=0>
<form name="searchform" action="search.php" method=get>
<TR>
<TD height="10" class="TableCenterCustomerForm" nowrap>{$lng.lbl_product} #</TD>
<TD width="10" height="10"></TD>
<TD height="10">
<INPUT type=text name=search_productid size=6 value="{$smarty.get.search_productid}">
</TD>
</TR>
<tr>
<td height="10" class="TableCenterCustomerForm" nowrap>{$lng.lbl_product_title}</td>
<td width="10" height="10"></td>
<td height="10">
<input type="text" name="substring" size="30" value="{$smarty.get.substring}">
</td>
</tr>
{if $usertype eq "A"}
<tr>
<td height="10" class="TableCenterCustomerForm" nowrap>{$lng.lbl_provider}</td>
<td width="10" height="10"></td>
<td height="10">
<input type="text" name="provider_substring" size="30" value="{$smarty.get.provider_substring}">
</td>
</tr>
{/if}
<tr>
<td height="10" class="TableCenterCustomerForm" nowrap>{$lng.lbl_in_category}</td>
<td width="10" height="10"><font class="TableCenterCustomerFormOrange">*</font></td>
<td height="10">
<select name="search_category">
<option value="">{$lng.lbl_all}</option>
{section name=cat_num loop=$allcategories}
<option value={$allcategories[cat_num].categoryid} {if $smarty.get.search_category eq $allcategories[cat_num].categoryid}selected{/if}>{$allcategories[cat_num].category}</option>
{/section}
</select>
</td>
</tr>
<tr>
<td width="78" class="TableCenterCustomerForm"></td>
<td width="10"></td>
<td width="282">
<input type=submit value="Search">
</td>
</tr>
</form>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_search_products content=$smarty.capture.dialog extra="width=100%"}



{if $smarty.server.QUERY_STRING ne ""}
{$items_count} {$lng.lbl_products_found}
{/if}
{if $products ne ""}



{capture name=dialog}
<form action="process_product.php" method=post name=processproductform>
<INPUT type=hidden name=substring value="{$smarty.get.substring}">
<INPUT type=hidden name=search_category value="{$smarty.get.search_category}">
<INPUT type=hidden name=search_productid value="{$smarty.get.search_productid}">
{include file="main/products.tpl" products=$products}


<input type=hidden name=mode value="">
<table border=0>
<tr valign=middle>
<td><a href="javascript:document.processproductform.mode. value='details'; document.processproductform.submit();">
{include file="buttons/details.tpl"}</a></td>
<td width=10> </td>
<td><a href="javascript:document.processproductform.mode. value='modify'; document.processproductform.submit();">
{include file="buttons/modify.tpl"}</a></td>
<td width=10> </td>
<td><a href="javascript:document.processproductform.mode. value='delete'; document.processproductform.submit();">
{include file="buttons/delete.tpl"}</a></td>
<td width=10> </td>
<TD>{include file="buttons/update.tpl"}</TD>
</tr>
</table>
</form>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra="width=100%"}
{/if}

leon 01-11-2004 04:54 AM

Seams it needs to be restructured, but basically (on an overall view that is) all you have to take out is this:

Code:

<tr>
<td height="10" class="TableCenterCustomerForm" nowrap>{$lng.lbl_in_category}</td>
<td width="10" height="10"><font class="TableCenterCustomerFormOrange">*</font></td>
<td height="10">
<select name="search_category">
<option value="">{$lng.lbl_all}</option>
{section name=cat_num loop=$allcategories}
<option value={$allcategories[cat_num].categoryid} {if $smarty.get.search_category eq $allcategories[cat_num].categoryid}selected{/if}>{$allcategories[cat_num].category}</option>
{/section}
</select>
</td>
</tr>


Give it try.

Jeremy Denton 01-11-2004 06:45 AM

I pulled that out. and its still there.

I was hoping to avoid paying my webguy to do it. But, oh well.

leon 01-11-2004 07:45 AM

I know what your problem is. I viewed your site, and the search box doesnt refer directly to search.tpl, it is referring to /skin1/customer/main/minisearch.tpl

So go in there and take out the code mentioned.

Jeremy Denton 01-11-2004 07:59 AM

here is the code that is in the minisearch. the problem is, every time I make a change; it gives me an error. "permission denied. not saved"

{* $Id: minisearch.tpl,v 1.4 2002/05/30 11:39:45 windy Exp $ *}

<table width="100%" cellPadding="0" cellSpacing="0" border="0">
<td width="20%" height="20" align="center" valign="middle" background="../{ #ImagesDir# }/table-gray-back.gif" class=MenuTitleLine>[img]../{#ImagesDir#}/crosshairs.gif[/img]</td>
<td height="20" valign="center" background="../{ #ImagesDir# }/table-gray-back.gif" class=MenuTitleLine><FONT class=TableLeftTitles>{$lng.lbl_search}</FONT></td>
</tr>
</table>

<TABLE border=0 cellPadding="5" cellSpacing="0" width="100%" class="TableLeftElements">
{if $usertype eq "C"}

<form method="get" action="search.php" name=productsearchform2>

<tr>
<td valign="middle" class="TableLeftElements">
<input type="text" name="substring" size="12" value="{$smarty.get.substring|escape}" class="formfield"></td>
<td valign="middle" class="TableLeftElements"> [img]../{ #ImagesDir# }/go_button.gif[/img]
</td>
</tr>
<tr>
<td valign="middle" class="TableLeftElements" colspan="2">
<select name="in_category" class="form1">
<option value="">All</option>
{section name=cat_num loop=$categories}
<option value="{ $categories[cat_num].categoryid}" {if $smarty.get.in_category eq $categories[cat_num].categoryid}selected{/if}>{$categories[cat_num].category|escape}</option>
{/section}
</select>

</td>
</tr>
</form>
{else}
<tr>
<td class="WhiteLine"> </td>
<td class="WhiteLine"> </td>
</tr>
<tr>
<td class="WhiteLine"> </td>
<td class="WhiteLine"> </td>
</tr>
{/if}
</table>

leon 01-11-2004 10:15 AM

When you work with TPL files or on any file on your server actually, you need to have the right persmissions set in order to work with them.

If you are using webmaster mode, first you need to give chmod 777 permissions on your skin folder.

I would personally recommend to FTP the file.

janetallard 01-11-2004 10:27 AM

Similar Error working on a different template.
 
Leon-
Can you be more specific on where to address this chmod 777 in the skin folder?

I am having a similar problem with a different template getting the same error message.

Thanks,
Janet

leon 01-11-2004 10:45 AM

If you have an FTP client, just give it the CHMOD command that it needs to properly handle the files.

For example, you could use WS_FTP as the client, login to your site, look thru the directories and find the files you need to address the permits on.

When you find the file, mark it and open with right click a window for detailed information. You will see an option that says CHMOD, when you click that it opens another window where you can see options for permission, just check all of them and that will give them the necesary permissions to be executable, readable, and writable ( 777 ).

But it is more secure to give 666 file permissions to be able to edit them via the admin panel.

janetallard 01-11-2004 10:48 AM

Thanks...I give it a whirl!

Janet

Jeremy Denton 01-11-2004 11:44 AM

now im REALLY lost.

8O

janetallard 01-11-2004 11:50 AM

Jeremy-
I believe this is in your MySQL database. You can access it from your web hosting company, should have it's own username/password different from the ftp. I wouldn't touch it if I were you unless you know EXACTLY what you are doing.

I am speaking from experience. I hired a programmer and it took him a long time to fix my latest screwup. If you are a NEWBIE like me...HIRE someone who is a programmer AND make a backup before you do anything.

Good Luck.

Janet

adpboss 01-11-2004 01:49 PM

Quote:

Originally Posted by janetallard
Jeremy-
I believe this is in your MySQL database. You can access it from your web hosting company, should have it's own username/password different from the ftp. I wouldn't touch it if I were you unless you know EXACTLY what you are doing.

I am speaking from experience. I hired a programmer and it took him a long time to fix my latest screwup. If you are a NEWBIE like me...HIRE someone who is a programmer AND make a backup before you do anything.

Good Luck.

Janet


Finally someone using common sense. Good job Janet. Safety first.

Jeremy, please learn how to use code tags so that your code isn't posted like that. It's hard to read.

Also please read the forum rules.

http://forum.x-cart.com/viewtopic.php?t=6489

You do not have server or X-cart version info in your forum signature. We have absolutely no idea what version or configuration you are running. Help us, help you.

adpboss 01-11-2004 01:56 PM

Firstly, this is not in your database.

You need to use an ftp client (whatever you use to move files up to your server or bring them down to your computer).

CuteFTP, WSFTP, you can even just do it from Internet Explorer.

The problem is that the files you are trying to change are not set to be "writeable". This is a security precaution but does hinder you from making changes to templates in the X-cart Administration Backend.

You need to set the file so that it is fully readable and writeable. This is CHMOD 666. You can do this by right clicking on the file in your ftp client and changing the permissions. In IE you would right click on the file and go to properties. There won't be any numbers but you will see how to make the file fully writeable.

Whatever program you are using should have information in the help on how to do this. This is basic and important to know how to do if you want to work on your cart yourself.

If you are really stuck, ask your host to change the permission on the file and get them to explain how you could do it yourself.

And just to create good habits, what the heck. Backup first.

janetallard 01-11-2004 02:31 PM

Hey adpboss-
While you are on a tutoring role here can you explain the difference between the chmod666 and chmod777? These phrases are spoken of quite frequently on this forum.

A primer would be much appreciated... or if you don't have time...point us to a newbies resource.

Many thanks...
Janet \:D/

adpboss 01-11-2004 02:35 PM

http://www.htmlite.com/php042.php

Enjoy.

janetallard 01-11-2004 02:38 PM

THANK YOU!!!

J :D

leon 01-11-2004 04:04 PM

This link can give you a quick insite for CHMOD:

http://www.eclecticpixels.com/tutorials/chmod/

janetallard 01-11-2004 05:06 PM

Thanks you two. These are both GREAT resources for us NEWBIES.

Janet :idea:

leon 01-11-2004 08:06 PM

You're welcome, my pleasure.

Although you dont seam to be so newbie, you joined in September and Ive seen some of your posts, I have a guess that it is not that difficult to you, is it ?

adpboss 01-11-2004 08:15 PM

Newbie is a relative term. JA has a really nice grip on design and what she wants to do with her cart. I am sure that everyone will be impressed with it when she launches it.

Some users have over 900 posts and still ask newbie questions. It is relative.

janetallard 01-11-2004 08:44 PM

I think a lot of us feel like Newbies all of the time because we are not programmers by trade. I have read some very complicated posts on here and just cringe 'cause I feel way out of my league. I have no programming experience nor am I a graphic designer. I'm book and tutorial taught and a "trial and error" kind of girl. I find more stuff I don't know each day which adds to the eternal feeling of being a "Newbie."

On the positive side, most of us here are not intimidated by a challenge (we wouldn't have bought X-Cart if we were!) We rely on you all to help us through and get us up to speed. I like many others just keep plugging away at it until something clicks! Most of the time it's after the fact and hopefully we can help someone else later with the easier questions leaving the more complicated ones for the moderaters.

We are all Newbies at some point, some longer than others. I think that the advancement of our forum status is by the number of posts not by actual experience. It can be misleading. I followed a post by a more senior member and needless to say the results were not positive. I think spending some time on the forum each day just following the dialogue is more helpful in determining who is an eXpert and who isn't.

Thanks again, you two,good night!
Janet O:)

leon 01-11-2004 10:15 PM

Jelous ? :lol: (just joking man, dont take it serious)

Is this a discusion forum or a Cuban insight ? Oh... wait a minute ... its a Russian maintained forum... uuppps, we are probably in comunism here, the boss has the word, he, he (another joke)

janetallard: Couldnt say it better, I agree on that. Participation is just a number, what I try to do is give my point of view as well in posts. What I cant explain to myself is why another member could get upset if my point of view is different...?, do you call that a discussion forum ? Maybe Im wrong, but I live in one of the most democratic countries in the world, and they teach you to fight for your right, and above all Freedom and Liberty to speech.

And yes, even though some of us are still newbies or ask newbie questions I think it is better than just shutting up, if you shut up you never learn and /or you never see the Outside world. Just My Humble Opinion, might be wrong, but Ill fight for my right to say it, and Ill fight til death for anybody to have the right also.

adpboss 01-12-2004 03:24 AM

Quote:

Jelous ? (just joking man, dont take it serious)

Not really, I am not my post count. Some people think it is a big deal and that it adds status here, but status is earned. I'd rather not have the post total show at all. There are too many users who look experienced, but who have no idea what they are talking about running around confusing new forum users.

This isn't about free speech. There is no need to post on the end of every thread. You have a right to say whatever you like, but that doesn't mean you should be talking non-stop. People who talk non-stop tend to annoy others around them.

There is nothing wrong with asking questions, but most of the answers are here. Search for them. Take the time to read.

The number of lazy "me too" posts is out of control IMO. It serves to bloat the forum and they have no useful purpose.

leon 01-12-2004 07:36 AM

](*,)

I still dont get it. Let me guess... is it about racism ? (yet another joke, just look at your post, its pathetic man, you are reflecting yourself in there as well, just think).

Right about the posts, its annoying to see users act like if they were MODERATORS, and they arent, or act like they know everything and every kind of business around, and they dont.

EXAMPLE: Instead of giving a poor user an answer or at least cheer him up, you can see alot of user posting redundantly the same things:
- Please post your version in your sig (10%)
- This doesnt belong here (20%)
- This belongs over there (5%)
- This is stupid (30%)
- Im right and you are wrong (25%)

Lets say it this way:

You are ABSOLUTELY RIGHT ! you have the reason at everything !!

Does that make you feel better ? Or do you need a Cigar with it ? :wink:


All times are GMT -8. The time now is 02:41 AM.

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