Jump to content

Search Result Problem


Recommended Posts

Hi there ,

 

I am having a problem with my Search Result , for exemple when i search for "rolex" i get :

Search "rolex" 1 result has been found.

 

.. but the product list result images are not showing like in the product-list page ( collection on my website ) .

 

- I customized my "collection" product-list css witch is using :

"table.products a img { -webkit-transition: all 0.5s linear; -moz-transition: all 0.5s linear; -ms-transition: all 0.5s linear; -o-transition: all 0.5s linear; transition: opacity 0.5s linear; opacity:1; }" etc...

 

 

I think i know that is because i changed the product list css that my search result is broken ...

 

what should i add or fix in my search.tpl to show the products result with images like in the product-list page ?

I tried hard to manage to fix it but i defenitly need some help...

 

here is the url of my site : Link

 

 

 

Thanks

 

R.

Edited by diez (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

Hi there Nemo1 & Alok thanks for the help ,

 

Well i understand that it is a .tpl issue ,

In that case witch .tpl does the search result belongs to ? product-list.tpl ? search.tpl ? category.tpl ? or ?

 

What should i add into the .tpl for the images to show ?

 

my tpl's :

 

search.tpl :

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{capture name=path}{l s='Search'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}

<h1 {if isset($instantSearch) && $instantSearch}id="instant_search_results"{/if}>
{l s='Search'} {if $nbProducts > 0}"{if isset($search_query) && $search_query}{$search_query|escape:'htmlall':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'htmlall':'UTF-8'}{elseif $ref}{$ref|escape:'htmlall':'UTF-8'}{/if}"{/if}
{if isset($instantSearch) && $instantSearch}<a href="#" class="close">{l s='Return to the previous page'}</a>{/if}
</h1>

{include file="$tpl_dir./errors.tpl"}
{if !$nbProducts}


    <p class="warning">
        {if isset($search_query) && $search_query}
            {l s='No results were found for your search'} "{if isset($search_query)}{$search_query|escape:'htmlall':'UTF-8'}{/if}"
        {elseif isset($search_tag) && $search_tag}
            {l s='No results were found for your search'} "{$search_tag|escape:'htmlall':'UTF-8'}"
        {else}
            {l s='Please enter a search keyword'}
        {/if}
    </p>

{else}
    <h3 class="nbresult"><span class="big">{if $nbProducts == 1}{l s='%d result has been found.' sprintf=$nbProducts|intval}{else}{l s='%d results have been found.' sprintf=$nbProducts|intval}{/if}</span></h3>
    {include file="./product-compare.tpl"}

    {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)}

    {/if}

    {include file="$tpl_dir./product-list.tpl" products=$search_products}
    {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)}{include file="$tpl_dir./pagination.tpl"}{/if}
    {include file="./product-compare.tpl"}
{/if}


product-list.tpl :

{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 7457 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{if isset($products)}
    <!-- Products list -->

    <ul id="product_list" class="product_list block-grid four-up mobile-two-up">
        {foreach from=$products item=product name=products}
            <li class="ajax_block_product product{if isset($category)}{if $category->id == 15 OR $category->id_parent == 15} clothe{/if}{/if}">            
            	<div class="product_picture">
            {if isset($category)}
            	{if $category->id == 15 OR $category->id_parent == 15}
                		<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'large_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" class="preview-products" />
                {else}
                	<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'large_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" class="preview-products" />
                {/if}
            {/if}
            </div>
                <div class="product_info">
                	<div class="info_container">
                		<div class="product_name"><h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}</a></h3></div>
                		<div class="product_description">
                    		{$product.description_short}
                            <p class="clear"></p>
                		</div>

                    	<div class="product_price align_center">
                    		{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if}
                		</div>
                    </div>
                	<div class="product_link"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}"></a></div>
                </div>
            </li>
        {/foreach}
    </ul>
    <!-- /Products list -->
{/if}

Category.tpl :

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}


{include file="$tpl_dir./errors.tpl"}

{if isset($category)}
    {if $category->id AND $category->active}
        

        {if $products}

<br><br>
<center> 

 <div id="search_bar">
                     
                      <form method="get" action="{$link->getPageLink('search.php', true)}" id="searchbox">
                            <input type="hidden" name="controller" value="search" />
                            <input type="hidden" name="orderby" value="position" />
                            <input type="hidden" name="orderway" value="desc" />
                           <input placeholder="{l s='Search' mod='responsivelinks'}" class="search_query" type="text" id="search_query_block" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" />
                        </form>
</div>
</center>
            <div class="content_sortPagiBar">
               {include file="$tpl_dir./pagination.tpl"}

                <div class="sortPagiBar clearfix">


 
                    {include file="./nbr-product-page.tpl"}
                </div>
            </div>
<br><br>
            {include file="./product-list.tpl" products=$products}

            




        {/if}
    {elseif $category->id}
        <p class="warning">{l s='This category is currently unavailable.'}</p>
    {/if}
{/if}

if you need any more infos please let me know , i really have to fix this

 

Thanks again!

 

R.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...