News:

Support the VirtueMart project and become a member

Main Menu

Problem with search template

Started by patrik60, July 24, 2013, 20:05:21 PM

Previous topic - Next topic

patrik60

I'm using different templates made by template override for my different categories and also a different template for the search results. Since version 2.0.22 I have the following problem:

When searching a product, on the first page of the results I get the layout of the categorie where I started to search. On the second page the layout turnes into the correct template (refreshing the site helps also). You may see this in the attached pics. First pic shows the search result as it was in version 2.0.20b and the second shows the wrong template as it is in version 2.0.22a. (both started from the same category)

[attachment cleanup by admin]

patrik60

This problem started with test version 2.0.21g .

patrik60

There were made a lot of changes in administrator/components/com_virtuemart/models/product.php

On line 553 (in VM 2.0.22a it is line 554) the code is:

if ($app->isSite () and ($cateid != -1 or $manid != 0) ) {

Changing it back into:

if ($app->isSite () and ($cateid != 0 or $manid != 0) ) {

solves the problem. But I don't know wether this causes other problems.

patrik60

This problem remains after updating to VM 2.0.22b

patrik60

May be I need to explain this more different:

My category layout in VM configuration is set to "default". I'm using different templates for my different categories in the category settings (named e.g. "default-arrange" or "default-collections") which are in my html override folder. So when I search a product the results normally should be shown in the default template. But they are shown in the templates depending from where I started the search. Only after a browser refresh or changing to the next page of the search results the default template is shown.

If I start the search from the shop frontpage the results are shown from the beginning in the default template. And as I said the problem started only with VM 2.0.21g, it worked fine until 2.0.21f.

You may this check also in this video: www.youtube.com/watch?v=cANI9bKHtcM

patrik60