News:

Support the VirtueMart project and become a member

Main Menu

filter of products for virtuemart 2.0

Started by reddevil, July 27, 2012, 16:28:54 PM

Previous topic - Next topic

reddevil

hi,

My site has pagination and if if it weren't, it wouldn't be problems.

I want to create filter by price.

In "/components/com_virtuemart/views/category/tmpl|default.php"

i wrote :"
<form method="post" >
<p>From: <input type="text" name="fromprice" /></p>
<p>To: <input type="text" name="toprice" /></p>
<p><input type="submit" /></p>
</form>
"

and now I don't know how to bind my result with pagination ((

i found the file where sql-query builds "/administrator/components/com_virtuemart/models|product.php"

but i don't know how to write my sql-query for filtering the price

i wrote "$where[] = ' `#__virtuemart_product_prices`.`product_price`= "777.00000" ';"

but it doesn't work

Please Help((

balai

#1
Hi

Its not very easy to create a reliable price filter.
The way you are trying to do it, it will retirn products based on the base price. And the price you enter in the filter will be different to the prices of the returned products (final prices).
You have to take care of the prices in multiple currencies, the price overrides and the shop's taxes.

There is already an extension which offers an advanced price filtering.
http://breakdesigns.net/extensions/custom-filters