Jump to content

[Solved]Bug/Problem with "items per page" function


Recommended Posts

Hello!

I have problem with "items per page function" it works fine with categories/tags without my language specific letters - ā, ē, č, ņ.....
When I choose for example 50 items per page and press OK the address shows - mydomen.lv/search.php?tag=Bezglutēna&n=50&tag=Bezglut% C 4 % 9 3na
(and shows - "No results found for your search "Bezglut%C 4 % 9 3na" ".
As you can see in first part it's ok, but this parts "Bezglut% C 4 % 9 3na" is not fine and if I manually change it to "Bezglutēna", it shows right results.
It shows letter "ē" like "% C 4 % 9 3" in link. :(

Maybe someone have been same language bug?
Or maybe someone can help me to solve this problem?

Best regards

P.S I wrote "% C 4 % 9 3" with spaces because it's automatically transforms to "ē" letter in post.

Link to comment
Share on other sites

I need urgent help, please someone help me with this tag problem.
I have 2 days searching how to solve this but no results. I found same problem in other post - http://www.prestashop.com/forums/viewthread/43635/hlavn_diskuze/vyeeno_tagy__hledan_vraz_nebyl_nalezen but there too I can't find solution.

I saw that in link http://localhost/search.php?tag=Ārpraats&n=20&tag;=% 2 5 C 4 % 2 5 8 0rpraats (I get to this link by clocking on tag in the tag block and then change items per page for it) , when I delete both 2 and 5 (manually) it shows good results for letter "Ā". I think it's encoding problem but can't figure out where I need to look for solution. Any suggestion? :(

Best regards.

Link to comment
Share on other sites

I found solution and if someone have same problem there is my pagination.tlp file code:

{if isset($p) AND $p}
   {if $smarty.get.id_category|intval}
       {assign var='requestPage' value=$link->getPaginationLink('category', $category, false, false, true, false)}
       {assign var='requestNb' value=$link->getPaginationLink('category', $category, true, false, false, true)}
   {elseif $smarty.get.id_manufacturer|intval}
       {assign var='requestPage' value=$link->getPaginationLink('manufacturer', $manufacturer, false, false, true, false)}
       {assign var='requestNb' value=$link->getPaginationLink('manufacturer', $manufacturer, true, false, false, true)}
   {elseif $smarty.get.id_supplier|intval}
       {assign var='requestPage' value=$link->getPaginationLink('supplier', $supplier, false, false, true, false)}
       {assign var='requestNb' value=$link->getPaginationLink('supplier', $supplier, true, false, false, true)}
   {else}
       {assign var='requestPage' value=$link->getPaginationLink(false, false, false, false, true, false)}
       {assign var='requestNb' value=$link->getPaginationLink(false, false, true, false, false, true)}
   {/if}
   <!-- Pagination -->

   {if $start!=$stop}

       {if $p != 1}
           {assign var='p_previous' value=$p-1}
goPage($requestPage, $p_previous)}">« {l s='Previous'}
       {else}
« {l s='Previous'}
       {/if}
       {if $start>3}
goPage($requestPage, 1)}">1
...
       {/if}
       {section name=pagination start=$start loop=$stop+1 step=1}
           {if $p == $smarty.section.pagination.index}
{$p|escape:'htmlall':'UTF-8'}
           {else}
goPage($requestPage, $smarty.section.pagination.index)}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}
           {/if}
       {/section}
       {if $pages_nb>$stop+2}
...
goPage($requestPage, $pages_nb)}">{$pages_nb|intval}
       {/if}
       {if $pages_nb > 1 AND $p != $pages_nb}
           {assign var='p_next' value=$p+1}
goPage($requestPage, $p_next)}">{l s='Next'} »
       {else}
{l s='Next'} »
       {/if}

   {/if}
   {if $nb_products > 10}
       <form action="{if !is_array($requestNb)}{$requestNb}{else}{/if}" method="get" class="pagination">


               {if isset($query) AND $query}<input type="hidden" name="search_query" value="{$query|escape:'htmlall':'UTF-8'}" />{/if}
               {if isset($tag) AND $tag AND !is_array($tag)}<input type="hidden" name="tag" value="{$tag|escape:'htmlall':'UTF-8'}" />{/if}
               <input type="submit" class="button_mini" value="{l s='OK'}" />
{l s='items:'}

               {foreach from=$nArray item=nValue}
                   {if $nValue <= $nb_products}
{$nValue|escape:'htmlall':'UTF-8'}
                   {/if}
               {/foreach}

               {if is_array($requestNb)}
                   {foreach from=$requestNb item=requestValue key=requestKey}
                       {if $requestKey != 'requestUrl'}
                           <input type="hidden" name="tag" value="{$tag|escape:'htmlall':'UTF-8'}" />
                       {/if}
                   {/foreach}
               {/if}

       </form>
   {/if}

   <!-- /Pagination -->
{/if}



P.S this code is from version 1.3.1.1.

Link to comment
Share on other sites

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...