function commerce_price_handler_filter_commerce_price_amount::query in Commerce Core 7
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides views_handler_filter_numeric::query
File
- modules/
price/ includes/ views/ handlers/ commerce_price_handler_filter_commerce_price_amount.inc, line 36
Class
- commerce_price_handler_filter_commerce_price_amount
- Filter handler to convert price filter to use decimal + currency.
Code
function query() {
// Convert user input to a price amount based on selected currency.
foreach ($this->value as $key => $value) {
if ($value) {
$this->value[$key] = commerce_currency_decimal_to_amount($value, $this->options['currency']);
}
}
parent::query();
}