Skip to content

Commit

Permalink
Fixes #2434 Support false/zero value in catalog rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rbayet authored and romainruaud committed Sep 14, 2022
1 parent 33808b7 commit 8a331ce
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ public function getSearchQuery(ProductCondition $productCondition)

$query = $this->getSpecialAttributesSearchQuery($productCondition);

if ($query === null && !empty($productCondition->getValue())) {
$conditionValue = $productCondition->getValue();
$conditionValue = array_filter(is_array($conditionValue) ? $conditionValue : [$conditionValue], 'strlen');
if ($query === null && !empty($conditionValue)) {
$this->prepareFieldValue($productCondition);
$queryType = QueryInterface::TYPE_TERMS;
$queryParams = $this->getTermsQueryParams($productCondition);
Expand Down

0 comments on commit 8a331ce

Please sign in to comment.