News:

Support the VirtueMart project and become a member

Main Menu

Pagination in Page Navigation at the Top screws up

Started by jjk, July 21, 2008, 19:34:21 PM

Previous topic - Next topic

jjk

There seems to be a problem with the pagination in combination with using the manufacturer module and the 'order by' form.

When I select a manufacturer from the drop down list,VM 1.1.1 initially shows the correct number of products. But if I click on 'Sort by Price' thereafter, the page pagination at the top srews up. It duplicates the found pages several times and the 'results per page' are reset to '5' while actually more products per page are shown.

Additionally, the drop down list of the manufacturer module always sticks to the entry initially selected by the user, when cache is enabled in the module parameters, even if the user selects a different manufacturer.
-------------------------------------------------------
PHP Built on:       Windows NT RED 5.0 build 2195
Database Version:    5.0.51a
Database Collation:    latin1_swedish_ci
PHP Version:    5.2.5
Web Server:    Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
Web Server to PHP interface:    apache2handler
Joomla! Version:    Joomla! 1.5.4 Production/Stable [ Naiki ] 6-July-2008 22:00 GMT
User Agent:    Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.9) Gecko/2008052906 Firefox/3.0
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations


jjk

Tried it already. With the cache disabled the drop down list doesn't stick to the initial selection anymore, but the pagination screw up remains. See screenshot attached. In this case the same page output is duplicated 16 times (17 pages in total)

[attachment cleanup by admin]
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations


jjk

It's still present in build 1480. If there is a newer build in SVN, I'll wait until tomorrow or so for an update of the nightly on the VM Developer Portal, because I still have my SVN software set to sourceforge.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations


jjk

Thanks,

two additional comments:

Just noticed that the duplicate pages disappear when I select a 'Display # of products' higher than the number of products stored in the database from the selected manufacturer. When I choose a lower number and click on 'sort by price', the duplicate pages show up again.

The number of duplicate pages shown is identical with the number of products from the selected manufacturer.
If no manufacturer is selected clicking on the manufacturer search button followed by a click on the 'sort by' button results in a number of duplicate pages identical to the total number of products stored in the database.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

jjk

@ Avarot,

just curious  :D did you (or a fellow VM user) have by chance some time to look at this problem and replicate it? Would be nice to know if I'm the only one with this problem or if it is an actual VM bug. On my system it's still present with Joomla 1.5.6 and the latest VM 1.1.2 nightly build.

Joerg
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

korb

I have a similar issue, I have actually tried to fix it with vm 1.1.2 and a fix found in forum. With this fix I have even good sef pagination, but if I change to other orderby price or something else the limit is not an integer anymore, link is built like this limit=%2FJoomla%2F, Joomla beeing folder name of my installation.

This is a well known issue that should be fixed soon.

frankykong

I have this problem too. I want to fix the cache issue with vm1.1.1, so I upgrade My vm to 1.1.2! When I spend a lot of time to upgrade it, I found another problem: When My product more than the list limit, If I change other orderby price or something the page navigation screws up! I Don't known how to fix it, and I don't konw how much issue is waiting for me to fix :(

zpirnar

The problem is in /components/com_virtuemart/themes/default(or whichever theme you use)/templates/browse/include/browse_orderbyform.tpl.php, line 40 (vm 1.1.2):

   <?php $pagenav->writeLimitBox( $search_string ); ?>

change to:

   <?php $pagenav->writeLimitBox( "" ); ?>

Took me a few hours to figure it out. The problem is that the limit box (i.e. how many products to show) is put into the same form that is used to change the sort order. When you change the order the action also send the limit variable which just happens to include the full $search_string (i.e. ?limit=/index.php...).

jjk

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations