Refine Product Search By Price Range and Brand - Virtuemart

In shop_browse_queries.php At line 44 insert //filter price by product range $pricer1 = $vmInputFilter->safeSQL( urldecode(vmGet( $_REQUEST, 'product_price', null ))); if ($pricer1 !=0) {    $where_clause[] = "product_price <= " . $pricer1 . ".00000";}    //end filter price by product range Replace lines 81 - 90 withif( $category_id ) {    if( !empty( $search_this_category ) && (!empty( $keyword ) || !empty( $manufacturer_id ) )) {        $where_clause[] = "`#__{vm}_product_category_xref`.`category_id`=".$category_id;    //MODIFIED FOR FILTER MANUFACTORER     //} elseif( empty( $keyword ) && empty( $manufacturer_id )) {    } elseif( empty( $keyword )) {    //END MODIFIED FOR FILTER MANUFACTORER         $where_clause[] = "`#__{vm}_product_category_xref`.`category_id`=".$category_id;    }} ------------------------------------------------------------------------------------------------ In shop.browse.php At Line 39 insert //filter for product price$pricer = $vmInputFilter->safeSQL( urldecode(vmGet( $_REQUEST, 'product_price', null )));//filter for product price At Line 245 insert  //CHANGES FOR MANUFACTORER FILTER        $orderby_form = $tpl->fetch( 'browse/includes/browse_filterbymf.tpl.php' );        $tpl->set( 'filterby_mf', $orderby_form );                //END CHANGES FOR MANUFACTORER FILTER         Replace lines 150 - 255 with else {       $tpl->set( 'orderby_form', '' );//CHANGES FOR MANUFACTORER FILTER    $tpl->set( 'filterby_mf', '' );//END CHANGES FOR MANUFACTORER FILTER} ---------------------------------------------------------------------------------------------- create file called browse_filterbymf.tpl.php and place in browse/includes/ folder Insert the following code in to the file <?phpif (!defined('_VALID_MOS') && !defined('_JEXEC'))    die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');mm_showMyFileName(__FILE__);?> <?phpif (sizeof($VM_BROWSE_FILTERBY_MF) < 2) {    // return;}?><p id="manufacturerSorting"><?php echo "Manufacturer" ?>: <select class="inputbox" name="manufacturer_id" onchange="order.submit()">    <option value="product_list" >_('PHPSHOP_SELECT') ?></option>    <?php    $query = "SELECT distinct a.manufacturer_id,a.mf_name FROM #__{vm}_manufacturer AS a ";    if (!empty($category_id)) {        $query .= ", #__{vm}_product_category_xref AS d, "                . " #__{vm}_product AS b, "                . " #__{vm}_product_mf_xref AS c "                . " WHERE d.category_id='$category_id'"                . " AND d.product_id = b.product_id "                . " AND b.product_id = c.product_id AND c.manufacturer_id = a.manufacturer_id ";    }    $query .= "ORDER BY mf_name ASC";    $db = new ps_DB;    $db->query($query);     $res = $db->record;     foreach ($res as $manufacturer) {        $selected = '';        if (@$_REQUEST['manufacturer_id'] == $manufacturer->manufacturer_id) {            $selected = 'selected="selected"';        }        echo "<option value=\"" . $manufacturer->manufacturer_id . "\" $selected>" . $manufacturer->mf_name . "</option>\n";    }    ?></select></p><p id="categorySorting"><?php echo "Price" ?>:     <select class="inputbox" name="product_price" onchange="order.submit()">        <option value="">_('PHPSHOP_SELECT') ?></option>        <option value="20">Under $20</option>        <option value="50">Under $50</option>        <option value="100">Under $100</option></select></p>