Jump to content

[SOLVED] Search Block


Recommended Posts

My site is in french. However the text "Search" next to the search field is in english.
I have looked on the translation tool, and everything seems to be just fine. I do not understand why it does not revert to french.

Link to comment
Share on other sites

No that did not solve it. It looks like the entire button "Search" is an image file. So in that case, I would need to replace the image with an image file that has search written in french. But that would affect my site if one day I would like to have it in english as well, right? So what could be done in this case?

Link to comment
Share on other sites

Hi,
I found the image button_search.jpg. It is located under shop/img folder. It is not in lang directory. In fact, in lang directory there are not image files.

And under header.tpl, I found this code. And it is prestashop 1.2.5

<form method="get" action="{$base_dir}search.php" id="searchbox">

   <input type="text" id="search_query" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'}{/if}" /></td>
<input type="image" class="buttonStyle" src="img/button_search.jpg" /></td>

</form>
Link to comment
Share on other sites

Ok, make a copy of the button with the correct French text and then rename it fr-search_btn.jpg, then
copy it in the /images/l directory. Take the English button and rename it to en-search_btn.jpg and move it to the
same directory.

Then change to this:

<input type="image" class="buttonStyle" src="{$img_lang_dir}{$lang_iso}-search_btn.jpg" />

Link to comment
Share on other sites

I know this is just a little bug, but it can be quite annoying. I have looked into the codes under categoriesbar.tpl and have even changed the padding values. It still did not work. Following are the lines of codes from this file:

[removed][removed]
<!-- Categories Bar module -->



<!--

  • {foreach from=$categoriesLevel.children item=child name=categoriesLevel}
    {if $smarty.foreach.categoriesLevel.last}
    {include file=$bar_tpl_path node=$child last='true'}
    {else}
    {include file=$bar_tpl_path node=$child}
    {/if}
    {/foreach}
-->

<!-- /Categories Bar module -->
[removed]cssdropdown.startchrome("chromemenu")[removed]
Link to comment
Share on other sites

Thanks for your continued help. I still cannot figure out which code relates to the search box. I looked under global.css under chromemenu and found these codes:

#chromemenu #shopping_cart a {
background-image: url('../img/icon/cart.gif');
background-repeat:no-repeat;
background-position: top left;
padding: 5px 5px 0 30px;
height: 20px;
text-decoration: none;

I changed the padding and it did not affect the search box but rather the cart.

Which code in the global.css could be related to this issue?

Link to comment
Share on other sites

×
×
  • Create New...