VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: bpluijms on June 08, 2012, 11:38:39 AM

Title: Problem with product limiting
Post by: bpluijms on June 08, 2012, 11:38:39 AM
Hello,

First: I am using J2.5.4 and VM 2.0.7.d.

I've got a problem with the limiting of products on category view.
There are two cases, which are related to the showing of products. One case with SEF on, one case with SEF off.

Standard Joomla SEF on:
When turning standard Joomla SEF on and going to one of the categories all products in that category are shown instead of the limit of 15 I have set in the VM backend.
So, for example: I have a category of 500 products. In the BE I have set the items as in the screenshot attached (taken from the category detail page in BE).
On the Frontend I see all 500 products, instead of the 15 I want to see. When I choose another category the same happens.
Limiting on the frontend works, but it´s not remembered when choosing another category. So everytime I switch between categories all products of the chosen category are shown.


Standard Joomla SEF off:
When I turn SEF off the same happens (so all products are shown), but now limiting is remembered when switching between categories.

Another problem exists when turning SEF off.
When I choose to limit the products to 30 and I go to, let's say page 2 in category view of category A and I switch to category B, it shows again page 2, instead of page 1.
Is it possible to show always page 1 when switching between categories? This problem does not occurs when using SEF.

So 2 problems:
1. All products are shown in category view, so limiting on first view doesn't work
2. When SEF turned off, category view doesn't reset pagination when switching between categories.

Is there a known solution for both problems?

Thank you,
Bart Pluijms

[attachment cleanup by admin]
Title: Re: Problem with product limiting
Post by: bpluijms on June 26, 2012, 12:45:57 PM
Is there already a solution for this problem?
Title: Re: Problem with product limiting
Post by: Milbo on June 27, 2012, 22:24:14 PM
Use the latest version http://dev.virtuemart.net/attachments/download/443/com_virtuemart.2.0.7.j_extract_first.zip
Title: Re: Problem with product limiting
Post by: bpluijms on June 29, 2012, 19:37:09 PM
Hello Milbo,
Thank you for your response, but the problem still exists.

When using SEF urls (just the Joomla standard settings) product limiting doesn't work.
So I've got Search Engine Friendly Urls, but a lot of products (a couple of hundred in some categories) instead of the 15 I want to show.
When I turn SEF off, product limiting works fine.

I hope there will be a solution in the next release.
Title: Re: Problem with product limiting
Post by: Milbo on June 30, 2012, 14:55:44 PM
strange, we removed the "all" setting, because it is not practicable for a shop.
Title: Re: Problem with product limiting
Post by: bpluijms on July 01, 2012, 15:36:05 PM
Hello Miblo,

After installing the latest version 2.0.8 the problem still exists.
You could check it out yourself at http://a-tembo.siteevaluator.nl/lego which runs on the latest stable release of Virtuemart and Joomla 2.5.6

On the left you find all Virtuemart categories. When you click "Alle LEGO sets" or "Opbergen", which are both categories with a lot of products, you will notice that all products within that categorie are shown instead of the 15 I want to show on default.
I have tried it in all browsers, so it is not a browser related problem.
I have tried to turn off all template overrides, but the problem still exists, so I guess it is not a template problem.

When I turn SEF off, product limiting works fine as expected (so just 15 products are shown on default).

Maybe you could point me in the right direction to solve this problem.

Thanks in advance.
Title: Re: Problem with product limiting
Post by: big2000 on July 01, 2012, 21:46:28 PM
Ok I was pointed to this topic.
Hello today I have upgraded virtuemart from 2.0.6 to 2.0.8. All was good till I saw that products in category view are showed in one page (If category got 200 products all of them was on one page and no pagination showed). I had my backup so no harm done. I started to alter new files with old files from installation 2.0.6 of Virtuemart to see what file making this bug. All started working fine when I copied file /components/com_virtuemart/router.php. I hope it will help. Please tell me what can I do to make new router.php working as intended. Sorry for my English.Switching on/off SEO doesn't change anything in my case.
Title: Re: Problem with product limiting
Post by: big2000 on July 01, 2012, 22:26:22 PM
Ok i have repair what was wrong in file components/com_virtuemart/router.php in line 682 i have changed:
self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 'int');
// self::$limit= $mainframe->getUserStateFromRequest('global.list.limit', 'limit', VmConfig::get('list_limit', 20), 'int');

to
// self::$limit= $mainframe->getUserStateFromRequest('com_virtuemart.'.$view.'.limit', VmConfig::get('list_limit', 20), 'int');
self::$limit= $mainframe->getUserStateFromRequest('global.list.limit', 'limit', VmConfig::get('list_limit', 20), 'int');

All working good now. I hope it will help.
Title: Re: Problem with product limiting
Post by: Milbo on July 01, 2012, 23:06:47 PM
yeh is working, but you disable other features,

the right replacement is a bit more, going to release an "a" version now.
Title: Re: Problem with product limiting
Post by: Milbo on July 01, 2012, 23:25:12 PM
Please test
Title: Re: Problem with product limiting
Post by: big2000 on July 02, 2012, 01:08:47 AM
It looks good at my page so thx for update.
Title: Re: Problem with product limiting
Post by: Milbo on July 02, 2012, 13:28:45 PM
great
Title: Re: Problem with product limiting
Post by: slammy on July 02, 2012, 14:52:14 PM
Hello,

after upgrading from vm 2.0.8 to 2.0.8_a (currently using Joomla 2.5.4) this morning, the configuration option under vm-backend->Configuration->shopfront "max number of products per frontend-site" seems to be not functional anymore.  I can left it empty, take 32 or 64 or any other number, always only 8 products are shown in the overviews and I have to use the pagenavigation.

For me as a noob - it sounds related to the thing you discuss in this thread.

Meanwhile I found out that I must use the configuration for max products in the category configuration to get more than 8 products in one view/site, this work, but the global configuration was great.

sry that I posted twice, I did not search after limiting ... , my thread: http://forum.virtuemart.net/index.php?topic=104709.0
regards slam
Title: Re: Problem with product limiting
Post by: Milbo on July 03, 2012, 01:41:42 AM
is fixed in svn. There are 3-4 small errors left, then we do version b
Title: Re: Problem with product limiting
Post by: bpluijms on July 03, 2012, 17:29:26 PM
Hello Milbo (and other devs)!
Thank you for the quick updates of VM 2.0.8.
I have tested 2.0.8a. and it works perfect regarding the limiting of products.

Great work!

Thank you.
Bart