After updating virtuemart 3.2.1 to 3.2.2, the number of products for a category by default it is now 18 and can not be changed by the administration.
I used 6 products for category, and now everywhere 18 are loaded.
Quote from: Milbo on May 13, 2017, 12:02:09 PM
You can set this setting in the
-vm config
- joomla menu item
a) normal setting
b) subordinated setting (the setting for the subcategories)
- in the category itself.
Greets
Thank you, Milbo.
Yes, I know where I can change settings, but it does not work.
If I change the "Initial number of listed item" in the category for example to 6, nothing happens.
Another example (In category settings):
I change the "Category Pagination Sequence" to "3,6" .
and "Initial number of listed items" to "3".
The category produces 18 products per page by default. Possible options are: "3,6,18".
If I choose "3", 18 disappears and 3 and 6 remain.
But when opening the directory is 18 always.
Hi Milbo,
I discovered where the problem is:
The router.php file has been changed
from
Virtuemart 3.2.1
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 'int');
to
Virtuemart 3.2.2
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 20, 'int');
This creates the problems described. Please give advice on how to proceed.
Thank you and BR.
when you check the function, then you see that the 20 is just the default param
Thank you, Milbo, for the answer.
I have made all sorts of attempts, but I only come to the above solution.
If you want and if you have time, I can give you access to my test site.
I have the same issue and would like to know the solution to this.
Preferably not a core hack !!
Working OK in VM3.2.3 when properly configured.
Dear Jenkinhill
Shall be thankful if you could kindly guide.
rgds
The number of products per page can be configured from 2 locations:
- Virtuemart Configuration
- The configuration of each category
According to Milbo, they can also be configured from Joomla's menu, but I do not find that setting there. There can only change the number of products per row.
I have described in detail the problem above:
Quote from: Venci Gentchev on May 19, 2017, 11:42:19 AM
If I change the "Initial number of listed item" in the category for example to 6, nothing happens.
Another example (In category settings):
I change the "Category Pagination Sequence" to "3,6" .
and "Initial number of listed items" to "3".
The category produces 18 products per page by default. Possible options are: "3,6,18".
If I choose "3", 18 disappears and 3 and 6 remain.
But when opening the directory is 18 always.
I have tried everything that I thought, but without success. The problem described is with VM 3.2.2 and 3.2.3.
So I suggested to Milbo to give him full access to my test site.
Dear Venci
I am aware that this can be done by configuring each category, which is a tedious job. There should be a one place where we can enter the number of products to be shown and it will become the default for the entire store.
Just like you, I would also like to show 6 products per display page; under main category & also the sub-category. And just like you, I have tried everything but nothing seems to be working.
I hope Milbo is able to spare some time and look into this issue and provide us a resolution.
Quote from: Milbo on May 19, 2017, 11:23:26 AM
Quote from: Milbo on May 13, 2017, 12:02:09 PM
You can set this setting in the
-vm config
- joomla menu item
a) normal setting
b) subordinated setting (the setting for the subcategories)
- in the category itself.
Greets
-vm config - Has no effect
- joomla menu item
a) normal setting - There are no such settings (only products in a row)
b) subordinated setting (the setting for the subcategories) - There are no such settings (only products in a row)
- in the category itself - Has no effect
Only for this issue, I am not updating my VM component.
Dear Milbo, please help !! I can provide the details of my test site for you to check.
regards
1. For each category where you wish to limit the display set "Initial number of listed items" to your requirement on Product Category Form.
2. If you require for example, 3 products per row then in VM menu for category view and subordinate category view set "Default number of products in a row" to 3
3. In VM Configuration/Templates leave "items per row" for "Show products of the selected category" empty, so that it does not override other settings.
This is with J3.7.2 VM3.2.3 using default VM templates.
Maybe I have to explain better with pictures:
Picture 1: Template Configuration.
Picture 2: Category Configuration.
Picture 3: First category loading.
Picture 4: What the drop-down menu shows to select the number of products per page.
And
Picture 5: After selecting 3 products per page - what the dropdown menu shows to select a number of products per page
Dear Jenkinhill Sir
Do you mean that we have to manually configure the number of products to be shown by specifying in each and every category & subcategory?
In earlier versions, this was set in the main config, and it would be default for all categories & sub-categories.
You only need to set category configuration within VM
The categories will inherit this setting if you leave their values to "default"
This is the same for all of these category settings
Changing things at a category level allows you to override the main configuration for that category
Dear AH
It's not working. That's what this thread is all about.
Maybe we are missing something. Please guide.
rgds
Currently ""Initial number of listed items"" is on;y available on a per category configuration. Alternatively you can set the pagination configuration "Frontend default items per list view" but that does not only affect products, it affects categories as well.
Thank you for the nice explanation. A bit unconsistent on the first look, but it makes sense with the feature for differtn pagination option per category, which can have different numbers of products per row.
I think you can not understand me correctly. I guess the reason is in my English.
Let me try again to explain:
The problem is the number of products per page. No problem with number of products per row.
After the change of router.php in VM version 3.2.2, they no longer work:
VirtueMart » Configuration » Templates » Frontend default items per list view
and
VirtueMart » Product Categories » Edit Category » Product Category Form » Initial number of listed items
That they do not work is due to the addition of the number 20 in the router.php in the following line:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 20, 'int');
More precisely here:
VmConfig::get('list_limit', 20), 20, 'int')
I hope that I have explained this time properly.
BR
yeh but
products per rows multiplied by rows, =>products per page.
and the function is defined as
public function getUserStateFromRequest($key, $request, $default = null, $type = 'none')
We use
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 20, 'int');
I cant see that I mixed up the params.
It is a value, stored in the session. When you change it in the BE, it is ignored as long you keep your old session. You need to login/logout, or logout/login to test the new value
Login, Logout, delete cookies, delete cache - no effect.
If I changed from 18 to 3 in one category, I switched to another and when I returned to the first one again it was 18.
Always see 18 products per page.
Because the number 18 is closest to the number 20 added in router.php. My settings are: "For 3 items per row = 6,12,18,24,48".
Honestly, I have no idea why this happens, but I've tested every file after the update until I find out where the problem comes from.
The fact is that when I delete the number 20 from the router.php, everything works normally as before. And for each category I can set how many products I want to have on a page.
I just did the following experiment:
I changed 20 to 10:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 10, 'int');
The number of products when you opened a page immediately became 9
I changed 20 to 30:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 30, 'int');
The number of products when you opened a page immediately became 30
I changed 20 to 40:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 40, 'int');
The number of products when you opened a page immediately became 39
I changed 20 to 50:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 50, 'int');
The number of products when you opened a page immediately became 48
It does not really matter what the VM category settings are.
BR
So the main config works, just not per category?
No:
VirtueMart » Configuration » Templates » Frontend default items per list view
and
VirtueMart » Product Categories » Edit Category » Product Category Form » Initial number of listed items
not works.
I am surprised why others have not faced this issue !!
Venci, I even tried removing the "20" from router.php but it still didn't work for me...
I think I fixed it, please try the new router http://dev.virtuemart.net/attachments/download/1083/com_virtuemart.3.2.3_extract_first.9579.zip
But it cannot really work per category. Atm the limit is set in the constructor of the router and we had to set it, when we know which category is loaded.
Thank you, Milbo.
With this router.php, I get the following when I enter into category:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN `#__virtuemart_products_bg_bg` as l ON l.`virtuemart_product_id` =' at line 1
BR
ah come on give me an idea. How many languages do you use? and where do you get the error? on which view? if category, which product groups are activated?
I have 2 languages on the site: Bulgarian and English.
I sent you a private message with a link to my test site. If you need administrative access, just say.
Now it is with the old router.php. If you want, I'll upload the new one again.
I just installed the full version of com_virtuemart.3.2.3_extract_first.9579.zip.
The error is gone, but now the products on the page are 24. :)
It is obviously due to:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('llimit_init_FE', 24), 24, 'int');
I dont know which value you set there.
If you mean virtuemart.cfg:
list_limit=6
llimit_init_FE=6
no, in the vm config. the template tab
On the second page of this topic I posted photos. I have not changed anything since then.
This is the configuration of the template tab:
I just tested with an original VM installation:
VirtueMart3.2.0_Joomla_3.6.5-Stable-Full_Package.zipI only changed the following:
- Frontend default items per list view: 6
- For 3 items per row: 6,12
Everything works OK. But:
Update VM with
com_virtuemart.3.2.2_extract_first.zipAlways the first category load shows
18 products per page. The problem also exists with the original installation.
Then I updated to version
com_virtuemart.3.2.3_extract_first.9579.zip and
Joomla 3.7.2.
The situation is the same, except for the fact that there are already
24 products per page. But this is for understandable reasons -
changing the number 18 to 24 in the router.php.
Ok, assuming this problem exists with an original installation, what do we do?
I had the same issue.. May be the scenario was very different but the default values is only 10 none of the other way was working.
I updated mywebsite from 1.5 to 2.5 and then 3. onward to 3.7.2 .. but when I was preparing it's template my pagination was stuck at 10
I had tried backend coding.. settings, everything as told in above methods.. but nothing was possible..
but i nothing was working.
I changed my theme.. and wow . it didn't work either ....
when I checked categories ... there all categories were having only 10 .. WHAT??.. i have 300+ categories.. who is gonna work for them...
I opened my mysql database program (or use your phpmyadmin) and run a query
UPDATE `iaox0_virtuemart_categories` SET limit_list_step = ''
and it worked like a charm.
com_virtuemart.3.2.3.9587_extract_first.zip - The problem still exists.
Quote from: Venci Gentchev on July 02, 2017, 08:13:09 AM
com_virtuemart.3.2.3.9587_extract_first.zip - The problem still exists.
Can you please open phpmyadmin and browse table values for
XXXX_virtuemart_categories "here XXXX should be your table's prefix" and see what values are under "
limit_list_step" ?
Yes, why not :)
limit_list_step: 3,6
limit_list_initial: 6
Anything further on this please?
This is keeping me from updating my VM :(
The problem is fixed by Max in version 3.2.4.
That's good news !!
where do I download version 3.2.4? the official download shows version 3.2.2 !!
thanks for the support
This is the nearest version: http://forum.virtuemart.net/index.php?topic=137816.0
Thank you sir, but does this have a fix to the issue we are discussing?
---update--- I just tried this version and it doesn't seem to fix the issue !!
Can someone please provide an update to this?
Quote from: rage76 on July 19, 2017, 19:15:57 PM
Anything further on this please?
This is keeping me from updating my VM :(
In my case the source of that problem was an old customized version (Hide the 'addtocart button in the category views) for the file ...\components\com_virtuemart\sublayouts\products.php
After updating that file, I got the correct 'products per row' display again. Perhaps your template uses an outdated customized version of that file?
jjk, There are no customized version of files in
VirtueMart3.2.2_Joomla_3.7.0-Stable-Full_Package.zip.
Quote from: Venci Gentchev on June 18, 2017, 17:33:16 PM
I just tested with an original VM installation: VirtueMart3.2.0_Joomla_3.6.5-Stable-Full_Package.zip
I only changed the following:
- Frontend default items per list view: 6
- For 3 items per row: 6,12
Everything works OK. But:
Update VM with com_virtuemart.3.2.2_extract_first.zip
Always the first category load shows 18 products per page. The problem also exists with the original installation.
Then I updated to version com_virtuemart.3.2.3_extract_first.9579.zip and Joomla 3.7.2.
The situation is the same, except for the fact that there are already 24 products per page. But this is for understandable reasons - changing the number 18 to 24 in the router.php.
Ok, assuming this problem exists with an original installation, what do we do?
Any luck with this Venci? :(
Quote from: Venci Gentchev on July 29, 2017, 23:16:42 PM
jjk, There are no customized version of files in VirtueMart3.2.2_Joomla_3.7.0-Stable-Full_Package.zip.
Quote from: jenkinhill on July 23, 2017, 23:01:51 PM
This is the nearest version: http://forum.virtuemart.net/index.php?topic=137816.0
=> load vm3.2.3.9614
Dear Milbo
I have already updated to vm3.2.3.9614 and tried without luck.
rgds
part of the solution is our router. Maybe you use a custom router.
Dear Milbo
could you please guide me where to look for this "router" so I may check ?
I confirm. With VM 3.2.3.9614 the problem is solved.
Quote from: Venci Gentchev on August 04, 2017, 09:24:19 AM
I confirm. With VM 3.2.3.9614 the problem is solved.
Dear Venci, I am surprised why it's not working for me !!
rage76, I mean extra components like sef404.
Quote from: Milbo on August 07, 2017, 08:59:48 AM
rage76, I mean extra components like sef404.
Dear Milbo
I am not using any component like sef404, etc.
Any suggestions / thoughts as to why it's not working for me?
Quote from: Venci Gentchev on August 04, 2017, 09:24:19 AM
I confirm. With VM 3.2.3.9614 the problem is solved.
Please help me with this. it's not working for me :(
You should post your config...
vm config.
menu item config,... there are TWO tabs
and he category settings,
then check. I am quite sure that you just missed one of these settings.
Dear Milbo
Sorry for sounding dumb, but I didnt exactly get what you are saying. Do you want me to post my "virtuemart.cfg" file here?
where is the "menu item config"
Product Category settings>>under Products?
There are 3 tabs >>Product Category Form, Virtuemart category view settings, Images
Didnt find anything under category form.
in Category view settings, everything is "use global", "use joomla default" or no override
Menu item config:
(https://image.ibb.co/iEhD6a/menutabs.png) (https://ibb.co/jsH2zv)
Dear Kelvyn
Thanks for stepping in.
1. My home page is not set as the VM homepage.
2. There is a menu item which links to VM categories I checked there; but it's mostly empty or set to "Use Global" or "No override"
Quote from: Milbo on August 12, 2017, 11:21:49 AM
You should post your config...
vm config.
menu item config,... there are TWO tabs
and he category settings,
then check. I am quite sure that you just missed one of these settings.
I am attaching the virtuemart.cfg for you to check. Please help. regards
the virtuemart.cfg is only for hidden configs. So it does not tell us a lot.
I can provide the admin login details for you to check. I am unable to update only because of this issue.
This really helped me out - I didn't even realize that somewhere in the last so many versions, the regular frontpage was depreciated and the menu-item was to be set to categories... I now have pagination back on my 'last items' (although the header does not show 'last items' anymore). Kudos!
The old fp was deprecated with the introduction of VM3.2 - http://virtuemart.net/news/479-virtuemart-3-2-cached-and-optimized