Hello,
I want to hide the pagination or parts of the pagination in category view if the "total size of products" (in 1 category, not in 1 page) is lower than the limit (limit box).
For example:
<?php
if ($this->total) > ($this->limit) { ?>
<div class="orderby-displaynumber">
<div class="vm-pagination"><?php echo $this->vmPagination->getPagesLinks(); ?></div>
<div class="vm-page-counter"><?php echo $this->vmPagination->getPagesCounter (); ?></div>
<div class="display-number"><?php echo $this->vmPagination->getLimitBox ($this->category->limit_list_step); ?></div>
</div>
<?php
}
?>
But the values of $this->total and $this->limit (vmpagination.php) are always 0 in category view.
For $this->total I´ve also tried count($products).
What are the correct terms?
Thanks!
count($this->products)
and echo out $this->category to see what the limit vars are
1. count($this->products) is the number of products on the respective side,
e.g.
20 products on category page 1
20 products on category page 2
3 products on category page 3
But what is the overall number of products in the category? (in this example: 43)
2. echo $this->category; displays the following: TableCategories
How can I see the limit vars?
but if you want to show pagi only if > page limit then count will work
Quoteecho $this->category; displays the following: TableCategories
impossible ..
you have at least $this->category->limit_list_step
use
print 'Debug Line '.__LINE__.' $this->category <pre>'; print_r ($this->category); print "</pre><br />\n";
same for $this->vmPagination .. might be something there
Ah...thanks....that´s it! The correct code (if) is:
<?php
if ($this->vmPagination->total > $this->vmPagination->limit) { ?>
<div class="orderby-displaynumber">
<div class="vm-pagination"><?php echo $this->vmPagination->getPagesLinks(); ?></div>
<div class="vm-page-counter"><?php echo $this->vmPagination->getPagesCounter (); ?></div>
<div class="display-number"><?php echo $this->vmPagination->getLimitBox ($this->category->limit_list_step); ?></div>
</div>
<?php
}
?>
Now parts of pagination will be displayed only if it is nessesary. This is advantageous in my template design.