- Posts: 98
- Thank you received: 2
Any way to change the number of products shown?
I got a PHP developer and he's stuck with it and I guess we need your commentary upon that.
We need simply the Overall Quantity Plus any number
Please Log in or Create an account to join the conversation.
The best I think is to edit the file "listing" of the view "product" via the menu Display>Views and add such code at the beginning:
This will reset the pagination system for the listing with a new total before the pagination gets displayed using it.
Please Log in or Create an account to join the conversation.
nicolas wrote: Hi,
The best I think is to edit the file "listing" of the view "product" via the menu Display>Views and add such code at the beginning:where $xxx is a variable with the number that you want to add to the total.Code:<?php $suffix = $this->pagination->hikaSuffix; $this->pagination = hikashop_get('helper.pagination', $this->pageInfo->elements->total+$xxx, $this->pageInfo->limit->start, $this->pageInfo->limit->value); $this->pagination->hikaSuffix = $suffix; ?>
This will reset the pagination system for the listing with a new total before the pagination gets displayed using it.
Thank you! It works but it also touches the counter of the "related products" on the product page. Any way to fix that?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
nicolas wrote: Simply add a check on the task parameter like that:
Code:<?php if($_REQUEST['task']!='show'){ $suffix = $this->pagination->hikaSuffix; $this->pagination = hikashop_get('helper.pagination', $this->pageInfo->elements->total+$xxx, $this->pageInfo->limit->start, $this->pageInfo->limit->value); $this->pagination->hikaSuffix = $suffix; } ?>
It helped but now I noticed that the same things goes on when you do the filtering... Despite the fact that only 5 products match the filtering criteria, it shows that there are these 5products +XXX number that I added and there are 8 pages in the pagionation. Could you please help me to fix that?
Please Log in or Create an account to join the conversation.
You can try to add this code after that one:
Please Log in or Create an account to join the conversation.
Xavier wrote: Hi,
You can try to add this code after that one:Code:if(hikashop_level(2) && JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task','listing')=='listing' && $display_filters=='1'){ $this->setLayout('filter'); $htmlFilter = $this->loadTemplate(); }
This code didnt help. I still get the same error:
Could you please help me? I need this quite much.Despite the fact that only 5 products match the filtering criteria, it shows that there are these 5products +XXX number that I added and there are 8 pages in the pagionation
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.