[Skip to main content](#vessel-content)

#   Any way to change the number of products shown?

##

- **[Shulha](/forum/user/10532-shulha "View Shulha's Profile")**
- [![Shulha's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10532-shulha "View Shulha's Profile") Topic Author
- [ Offline](/forum/user/10532-shulha)

Less More

- Posts: 98
- Thank you received: 2
-
-

13 years 3 weeks ago [\#126502](#126502) by [Shulha](/forum/user/10532-shulha "View Shulha's Profile")  *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#126502 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")* was created by *[Shulha](/forum/user/10532-shulha "View Shulha's Profile")*

Hi there! I wander if there's any way to change overall quantity shown by the Code:

hikashop_results_counter

for example to add a number or to reduce it by some number?
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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 3 weeks ago [\#126533](#126533) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#126533 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

Hi,

The best I think is to edit the file "listing" of the view "product" via the menu Display&gt;Views and add such code at the beginning: Code:

&lt;?php $suffix = $this-&gt;pagination-&gt;hikaSuffix; $this-&gt;pagination = hikashop_get('helper.pagination', $this-&gt;pageInfo-&gt;elements-&gt;total+$xxx, $this-&gt;pageInfo-&gt;limit-&gt;start, $this-&gt;pageInfo-&gt;limit-&gt;value); $this-&gt;pagination-&gt;hikaSuffix = $suffix; ?&gt;

where $xxx is a variable with the number that you want to add to the total.

This will reset the pagination system for the listing with a new total before the pagination gets displayed using it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Shulha](/forum/user/10532-shulha "View Shulha's Profile")**
- [![Shulha's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10532-shulha "View Shulha's Profile") Topic Author
- [ Offline](/forum/user/10532-shulha)

Less More

- Posts: 98
- Thank you received: 2
-
-

13 years 6 hours ago -  13 years 6 hours ago [\#129795](#129795) by [Shulha](/forum/user/10532-shulha "View Shulha's Profile")  Replied by *[Shulha](/forum/user/10532-shulha "View Shulha's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#129795 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

> nicolas wrote: Hi,
>
> The best I think is to edit the file "listing" of the view "product" via the menu Display&gt;Views and add such code at the beginning:
>
> Code:
>
> &lt;?php $suffix = $this-&gt;pagination-&gt;hikaSuffix; $this-&gt;pagination = hikashop_get('helper.pagination', $this-&gt;pageInfo-&gt;elements-&gt;total+$xxx, $this-&gt;pageInfo-&gt;limit-&gt;start, $this-&gt;pageInfo-&gt;limit-&gt;value); $this-&gt;pagination-&gt;hikaSuffix = $suffix; ?&gt;
>
>
>
> where $xxx is a variable with the number that you want to add to the total.
>
> 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?

Last edit: 13 years 6 hours ago by [Shulha](/forum/user/10532-shulha "View Shulha's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 11 months ago [\#129867](#129867) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#129867 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

Simply add a check on the task parameter like that: Code:

&lt;?php if($_REQUEST['task']!='show'){ $suffix = $this-&gt;pagination-&gt;hikaSuffix; $this-&gt;pagination = hikashop_get('helper.pagination', $this-&gt;pageInfo-&gt;elements-&gt;total+$xxx, $this-&gt;pageInfo-&gt;limit-&gt;start, $this-&gt;pageInfo-&gt;limit-&gt;value); $this-&gt;pagination-&gt;hikaSuffix = $suffix; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Shulha](/forum/user/10532-shulha "View Shulha's Profile")**
- [![Shulha's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10532-shulha "View Shulha's Profile") Topic Author
- [ Offline](/forum/user/10532-shulha)

Less More

- Posts: 98
- Thank you received: 2
-
-

12 years 11 months ago [\#133985](#133985) by [Shulha](/forum/user/10532-shulha "View Shulha's Profile")  Replied by *[Shulha](/forum/user/10532-shulha "View Shulha's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#133985 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

> nicolas wrote: Simply add a check on the task parameter like that:
>
> Code:
>
> &lt;?php if($_REQUEST['task']!='show'){ $suffix = $this-&gt;pagination-&gt;hikaSuffix; $this-&gt;pagination = hikashop_get('helper.pagination', $this-&gt;pageInfo-&gt;elements-&gt;total+$xxx, $this-&gt;pageInfo-&gt;limit-&gt;start, $this-&gt;pageInfo-&gt;limit-&gt;value); $this-&gt;pagination-&gt;hikaSuffix = $suffix; } ?&gt;

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 11 months ago [\#134096](#134096) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#134096 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

Hi,

You can try to add this code after that one: Code:

if(hikashop_level(2) &amp;&amp; JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task','listing')=='listing' &amp;&amp; $display_filters=='1'){ $this-&gt;setLayout('filter'); $htmlFilter = $this-&gt;loadTemplate(); }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Shulha](/forum/user/10532-shulha "View Shulha's Profile")**
- [![Shulha's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/10532-shulha "View Shulha's Profile") Topic Author
- [ Offline](/forum/user/10532-shulha)

Less More

- Posts: 98
- Thank you received: 2
-
-

12 years 9 months ago [\#140649](#140649) by [Shulha](/forum/user/10532-shulha "View Shulha's Profile")  Replied by *[Shulha](/forum/user/10532-shulha "View Shulha's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#140649 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

> Xavier wrote: Hi,
>
> You can try to add this code after that one:
>
> Code:
>
> if(hikashop_level(2) &amp;&amp; JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task','listing')=='listing' &amp;&amp; $display_filters=='1'){ $this-&gt;setLayout('filter'); $htmlFilter = $this-&gt;loadTemplate(); }

This code didnt help. I still get the same error:

> 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? I need this quite much.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 9 months ago [\#140726](#140726) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Any way to change the number of products shown?](/forum/2-general-talk-about-hikashop/862572-any-way-to-change-the-number-of-products-shown#140726 "Hi there! I wander if there's any way to change overall quantity shown by the  for example to add a number or to reduce it by some number? 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")*

Instead of the code: Code:

&lt;?php if($_REQUEST['task']!='show'){ $suffix = $this-&gt;pagination-&gt;hikaSuffix; $this-&gt;pagination = hikashop_get('helper.pagination', $this-&gt;pageInfo-&gt;elements-&gt;total+$xxx, $this-&gt;pageInfo-&gt;limit-&gt;start, $this-&gt;pageInfo-&gt;limit-&gt;value); $this-&gt;pagination-&gt;hikaSuffix = $suffix; } ?&gt;

you should try that code: Code:

&lt;?php if($_REQUEST['task']!='show' &amp;&amp; $_REQUEST['Itemid']!=YYY){ $suffix = $this-&gt;pagination-&gt;hikaSuffix; $this-&gt;pagination = hikashop_get('helper.pagination', $this-&gt;pageInfo-&gt;elements-&gt;total+$xxx, $this-&gt;pageInfo-&gt;limit-&gt;start, $this-&gt;pageInfo-&gt;limit-&gt;value); $this-&gt;pagination-&gt;hikaSuffix = $suffix; } ?&gt;

where YYY is the id of the menu item that you use for the filters search results display page.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2MjU3Mi1hbnktd2F5LXRvLWNoYW5nZS10aGUtbnVtYmVyLW9mLXByb2R1Y3RzLXNob3duP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.288 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
