- Posts: 82
- Thank you received: 1
Show items per page / the show all option
11 years 2 months ago - 11 years 2 months ago #210747
by jmbgreen
Show items per page / the show all option was created by jmbgreen
-- 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
-- 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: 11 years 2 months ago by jmbgreen. Reason: Solved
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 2 months ago #210779
by Mohamed Thelji
Replied by Mohamed Thelji on topic Show items per page / the show all option
Hello,
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.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?
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210847
by jmbgreen
Replied by jmbgreen on topic Show items per page / the show all option
Thanks for the answer, but can you elaborate a bit more please?
Where I can find the option to make the "Show All" disappear ?
Where I can find the option to make the "Show All" disappear ?
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210854
by jmbgreen
Replied by jmbgreen on topic Show items per page / the show all option
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.
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.
11 years 2 months ago #210856
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Show items per page / the show all option
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:
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,
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:
Code:
$limits[] = JHTML::_('select.option', '0', JText::_('HIKA_ALL'));
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.
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210910
by jmbgreen
Replied by jmbgreen on topic Show items per page / the show all option
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.
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.214 seconds