В общем заморочился и захотел модернизировать модуль поиска в Вирту и добавить в него расширеный поиск почти все сделал но столкнулся с проблемой, не знаю как сделать поиск по цене. Т.е. поиск в диапазоне цен вобщем вот код
<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
*
* @version $Id: shop.search.php 1526 2008-09-15 19:21:43Z soeren_nb $
* @package VirtueMart
* @subpackage html
* @copyright Copyright (C) 2004-2008 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
mm_showMyFileName( __FILE__ );
$mainframe->setPageTitle( $VM_LANG->_('PHPSHOP_ADVANCED_SEARCH') );
$mainframe->appendPathWay( $VM_LANG->_('PHPSHOP_ADVANCED_SEARCH') );
?>
<h2><?php echo $VM_LANG->_('PHPSHOP_ADVANCED_SEARCH')?></h2>
<br/>
<a href="<?php echo $sess->url( $mm_action_url.basename($_SERVER['PHP_SELF']).'?page=shop.parameter_search' )?>">
</a>
<br/>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td valign="top">
<!-- body starts here -->
<br />
<form action="<?php echo URL ?>index.php" method="get" name="adv_search" onsubmit="var p=new RegExp('(.*?),',['i']);var m=p.exec(this.search_category.value);if(m.length>0){this.category_id.value=m[1];}return true;">
<input type="hidden" name="category_id" value="" />
<input type="hidden" name="page" value="shop.browse" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="Itemid" value="<?php echo $sess->getShopItemid()?>" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<a align='left'><?php echo $VM_LANG->_('PHPSHOP_SEARCH_ALL_CATEGORIES')."<a>:</a>" ?></a><select class="inputbox" name="search_category" style="min-width:250px; margin-left:45px;">
<option value="0"></option>
<?php
// Show only top level categories and categories that are
// being published
$q = "SELECT category_id,category_name FROM #__{vm}_category ";
$q .= "WHERE category_publish='Y' ";
$q .= "ORDER BY category_name ASC";
$db->query($q);
while ($db->next_record()) { ?>
<option value="<?php echo $db->f("category_id"); ?>">
<?php echo $db->f("category_name"); ?>
</option>
<?php
}
?>
</select><br/><br/>
<td valign="top">
<a align='left'>Название товара:</a><input class="inputbox" type="text" name="keyword1" size="20" style="padding-left:50px; margin-left:90px;"/>
<br /><br />
<select class="inputbox" name="search_limiter">
<option value="anywhere"><?php echo $VM_LANG->_('PHPSHOP_SEARCH_ALL_PRODINFO')?></option>
<option value="name"><?php echo $VM_LANG->_('PHPSHOP_SEARCH_PRODNAME')?></option>
<option value="cp"><?php echo $VM_LANG->_('PHPSHOP_SEARCH_MANU_VENDOR')?></option>
<option value="desc"><?php echo $VM_LANG->_('PHPSHOP_SEARCH_DESCRIPTION')?></option>
</select>
<br /><br />
<input type="submit" class="button" name="search" value="<?php echo $VM_LANG->_('PHPSHOP_SEARCH_TITLE')?>" />
<br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
document.adv_search.keyword1.select();
document.adv_search.keyword1.focus();
</script>
</td>
</tr>
</table>
:
Помогите пожалуйста разобраться, я хотел еще вставить картинку что сейчас есть и что хочу получить, только не смог разобраться как это сделать))
