VirtueMart 1.1.x [ Old version - no longer supported ] > Mambots, Plugins VM 1.1

Search module/plugi - one result found it redirects to flypage (don't want that)

(1/1)

tkgraphics:
Hi,

I'm using VM 1.9 with the search module. when only one result is found, the results page redirects to the product's flypage. I do not want this. How can I change it, so the page looks the same as if there were 9 results, i.e. the browse style I've made?

Please please please help :)

-T

Venci Gentchev:
administrator/components/com_virtuemart/html/shop.browse.php

This is the code you're looking for:

--- Code: ---elseif( $num_rows == 1 && ( !empty($keyword) || !empty($keyword1) ) ) {
// If just one product has been found, we directly show the details page of it
$db_browse->query( $list );
$db_browse->next_record();
$flypage = $db_browse->sf("category_flypage") ? $db_browse->sf("category_flypage") : FLYPAGE;

$url_parameters = "page=shop.product_details&flypage=$flypage&product_id=" . $db_browse->f("product_id") . "&category_id=" . $db_browse->f("category_id");
vmRedirect( $sess->url($url_parameters, true, false ) );
}
--- End code ---

Comment it, or simply change $num_rows from 1 to 10000:

--- Code: ---elseif( $num_rows == 10000 && ( !empty($keyword) || !empty($keyword1) ) ) {
--- End code ---

 :)

Navigation

[0] Message Index

Go to full version