News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

search engine doesn't work properly since VM 3.2.6

Started by patbe60, October 20, 2018, 15:13:21 PM

Previous topic - Next topic

patbe60

I' am on VM 3.4.2 now and have detected the following problem:

When displaying the search result on several pages (5, 10, 20 per page) the results are listed correctly when going forward to the next pages.
When I go back it works fine until page 2. When clicking on page 1 I am led to the shop homepage instead of page 1 of the search results.

This problem started with VM 3.2.6. I have tested this issue with a few versions before 3.2.6 and a few versions after 3.2.4 including 3.4.2

Regards
Patrik

patbe60

#1
The problem occurs under the following circumstances (example):

VM Configuration -> Templates -> Set the pagination sequence for the List Box

Frontend default items per list view: 10
For 2 items per row: 6,8,10,12,16,20

When selecting an other number than 10 in the listbox, everything works fine, the URL ends with results,1-x?keyword=searchterm (x= number in the listbox)

As soon as the number is set to 10 the user is guided to the shop homepage, the url ends with ?keyword=searchterm

This means the problem happens when the number in the listbox is identical with the number of Frontend default items per list view.

Milbo

Hmm, I am not able to reproduce this yet. You may contact me via skype.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

patbe60

Problem solved by Milbo. Thanks!

Add the following code in router.php after line 147:

} else if(!empty($query['search']) or !empty($query['keyword'])){
    $segments[] = $helper->lang('results') .',1-'.vmrouterHelper::$limit ;
   }