Can someone tell me how i can get my pagination like in the picture in opencart 3.0.2.0 .. by editing the core files.
Thanks.
which version of oc are you using?
provide us a link from where you found this pagination?
provide us a link from where you found this pagination?
take a visit to My Modules !
the class pagination creates this
which is in system/library/pagination.php
if you comment Line 85 and 87 you will get somenthing like your posted image
else
if you want something like this: << < 2 3 4 > >>
you can replace lines 84-88 with this:
in first line of code above if you change number 2 with 3 you will get: << < 1 2 3 4 5 > >>
with 4: << < 1 2 3 4 5 6 > >> etc etc
which is in system/library/pagination.php
if you comment Line 85 and 87 you will get somenthing like your posted image
else
if you want something like this: << < 2 3 4 > >>
you can replace lines 84-88 with this:
Code: Select all
if (abs($page - $i) < 2 ) {
if ($i === 1) {
$output .= '<li><a href="' . str_replace(array('&page={page}', '?page={page}', '&page={page}'), '', $this->url) . '">' . $i . '</a></li>';
} else {
$output .= '<li><a href="' . str_replace('{page}', $i, $this->url) . '">' . $i . '</a></li>';
}
}
with 4: << < 1 2 3 4 5 6 > >> etc etc
take a visit to My Modules !
nice one .. iv got a custom theme so the coding is different but you put me on the right track.
class Pagination {
public $total = 0;
public $page = 1;
public $limit = 20;
public $num_links = 8;
i just changed the 8 to 2 now only give me 2 digits ... :-)
class Pagination {
public $total = 0;
public $page = 1;
public $limit = 20;
public $num_links = 8;
i just changed the 8 to 2 now only give me 2 digits ... :-)
Who is online
Users browsing this forum: No registered users and 44 guests