Jump to content

pagination problem


Recommended Posts

Hi

 

My website doesnt show pagination

In code it shows only:

 

<div class="bottom_pagination clearfix">

 

 

But if i install the same theme on localhost it show this code:

 

<div class="bottom_pagination clearfix">

<script type="text/javascript"> … </script><form class="product_compare" onsubmit="true" action="http://localhost:8888/newone/index.php?controller=products-comparison" method="post"> … </form>

<!-- Pagination -->

<ul class="pagination"> … </ul>

<!-- /Pagination -->

 

 

I doesnt work with any themes on my website but works on localhost

 

Please help me solve this problem

 

url: http://turuliider.ee/index.php?id_category=126&controller=category&id_lang=7

Link to comment
Share on other sites

Btw i changed to default theme and it still not working

 

{if isset($no_follow) AND $no_follow}
{assign var='no_follow_text' value='rel="nofollow"'}
{else}
{assign var='no_follow_text' value=''}
{/if}
{if isset($p) AND $p}
{if isset($smarty.get.id_category) && $smarty.get.id_category && isset($category)}
{if !isset($current_url)}
{assign var='requestPage' value=$link->getPaginationLink('category', $category, false, false, true, false)}
{else}
{assign var='requestPage' value=$current_url}
{/if}
{assign var='requestNb' value=$link->getPaginationLink('category', $category, true, false, false, true)}
{elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer && isset($manufacturer)}
{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 isset($smarty.get.id_supplier) && $smarty.get.id_supplier && isset($supplier)}
{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}
{if $start!=$stop}
<!-- Pagination -->
<ul class="pagination">
{if $p != 1}
{assign var='p_previous' value=$p-1}
<li id="pagination_previous"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_previous)}"><span>‹ </span>{l s='Previous'}</a></li>
{else}
<li id="pagination_previous" class="disabled"><span>‹ </span>{l s='Previous'}</li>
{/if}
{if $start==3}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)}">1</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 2)}">2</a></li>
{/if}
{if $start==2}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)}">1</a></li>
{/if}
{if $start>3}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)}">1</a></li>
<li class="truncate">...</li>
{/if}
{section name=pagination start=$start loop=$stop+1 step=1}
{if $p == $smarty.section.pagination.index}
<li class="current">{$p|escape:'htmlall':'UTF-8'}</li>
{else}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, $smarty.section.pagination.index)}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
{/if}
{/section}
{if $pages_nb>$stop+2}
<li class="truncate">...</li>
<li><a href="{$link->goPage($requestPage, $pages_nb)}">{$pages_nb|intval}</a></li>
{/if}
{if $pages_nb==$stop+1}
<li><a href="{$link->goPage($requestPage, $pages_nb)}">{$pages_nb|intval}</a></li>
{/if}
{if $pages_nb==$stop+2}
<li><a href="{$link->goPage($requestPage, $pages_nb-1)}">{$pages_nb-1|intval}</a></li>
<li><a href="{$link->goPage($requestPage, $pages_nb)}">{$pages_nb|intval}</a></li>
{/if}
{if $pages_nb > 1 AND $p != $pages_nb}
{assign var='p_next' value=$p+1}
<li id="pagination_next"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_next)}">{l s='Next'}<span> ›</span></a></li>
{else}
<li id="pagination_next" class="disabled">{l s='Next'}<span> ›</span></li>
{/if}
</ul>
<!-- /Pagination -->
{/if}
{/if}

Link to comment
Share on other sites

In the front office I don't see any code like this:

<!-- Pagination -->

As if any condition to add this code isn't met. There are 2 conditions that are tested:

{if isset($p) AND $p}

 

and

 

{if $start!=$stop}

 

 

Anyone more info on these vars?

 

My 2 cents,

pascal

 

 

N.B. See those vars in function in blocklayered.php:

 

public function getProducts($selected_filters, &$products, &$nb_products, &$p, &$n, &$pages_nb, &$start, &$stop, &$range)
{
 global $cookie;

 $products = $this->getProductByFilters($selected_filters);
 $products = Product::getProductsProperties((int)$cookie->id_lang, $products);

 $nb_products = $this->nbr_products;
 $range = 2; /* how many pages around page selected */

 $n = (int)Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'));
 $p = $this->page;

 if ($p < 0)
  $p = 0;

 if ($p > ($nb_products / $n))
  $p = ceil($nb_products / $n);
 $pages_nb = ceil($nb_products / (int)($n));
 $start = (int)($p - $range);
 if ($start < 1)
  $start = 1;

 $stop = (int)($p + $range);
 if ($stop > $pages_nb)
  $stop = (int)($pages_nb);
}

Link to comment
Share on other sites

  • 1 year later...

Hello I have big problem in my website. 


 


I am using prestashop 1.5.6 Default Theme  English Version. Prestashop Full site version is working fine. Problem in Mobile theme. when i am clicking in any subcategory all products are displaying there but after clicking on next page by page numbers (like page no. 2 or 3 or any page) its moving on home page and then nothing happened there. not able to click on any category. 


 


Could any one please tell me why its moving on home page after clicking on Number 2 or .. while clicking on Next page is working properly .. please help me..


 


Also you can check error on http://slmobileprice.com/index.php


 


 


Thanks, 


Somit


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