/** * {@inheritdoc} */ public function addFilter(Collection $collection, $field, $condition = null) { if (isset($condition['from'])) { $collection->getSelect()->where(AbstractCollection::ATTRIBUTE_TABLE_ALIAS_PREFIX . 'qty.qty >= ?', (double) $condition['from']); } if ($condition['to']) { $collection->getSelect()->where(AbstractCollection::ATTRIBUTE_TABLE_ALIAS_PREFIX . 'qty.qty <= ?', (double) $condition['to']); } }