Show items per page / the show all option

  • Posts: 82
  • Thank you received: 1
10 years 1 month ago #210747

-- HikaShop version -- : hikashop
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.6
-- Error-message(debug-mod must be tuned on) -- : Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 256 bytes) in ../libraries/joomla/database/driver/mysql.php on line 421

Hello,

I am getting a php fatal error in Category's Products Menu Item.
When "show all" is selected and the category has a relative high number of products I got:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 256 bytes) in ../libraries/joomla/database/driver/mysql.php on line 421

* php_memory_limit is 64M and probably setting it to 128M could solve the issue and would allow some of the categories with more products to display, but...
I think better I should remove the show all option from the filter, as showing 200-300 products in 1 page is not good.
However, I am unable to find anywhere in the admin any settings to control this.
Before digging into the code, can you advise if this is something adjustable from the backend?

Thanks

Last edit: 10 years 1 month ago by jmbgreen. Reason: Solved

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 1 month ago #210779

Hello,

I think better I should remove the show all option from the filter, as showing 200-300 products in 1 page is not good.
However, I am unable to find anywhere in the admin any settings to control this.
Before digging into the code, can you advise if this is something adjustable from the backend?

In that case, you'll have to directly edit the "Number of items " option of the product listing content menu used to display the result of your filter module.

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 1
10 years 1 month ago #210847

Thanks for the answer, but can you elaborate a bit more please?

Where I can find the option to make the "Show All" disappear ?

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 1
10 years 1 month ago #210854

Also any good idea of making/forcing the reloading of these menu items, return to let's say 12 items per page ?
As the previous option of Show All seems to be somewhat stored when trying to visit a such menu item.

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 1 month ago #210856

Hi,

There is no option to remove the "show all" choice in the dropdown.
A simple solution is to hide the dropdown with CSS if you don't want users to use it.

Otherwise, you can remove the line:

$limits[] = JHTML::_('select.option', '0', JText::_('HIKA_ALL'));
from the file administrator/components/com_hikashop/helpers/pagination.php in order to remove just that choice from the dropdown.

About your last message ; I'm sorry but I don't understand it.
All I can tell you is the pagination is stored in the user session using cookies ; exactly like Joomla is doing.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 1
10 years 1 month ago #210910

Hello Jerome,

thanks -
I searched so many times around and didn't find such option as you said.

So, I already disabled the Show All, inside the pagination helper file.
Think that would be a nice small new feature:
Give the users the option to specify the values of the pagination filter to display x, xx, xxx number of items.
And especially give the option to disable the Show All. You realize that if a category has 1000,2000 products this can be a disaster even for the customers browser if by any chance try to show all in a page.

As for the last message, it's ok - as the menu item will display that number of items, as its default setting on the next session.

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum