Skip to content

Commit e521de5

Browse files
author
Stanislav Idolov
authored
ENGCOM-2718: Doesn't work if use date as condition for Catalog Price Rules #16855
2 parents 934aa12 + e085ddf commit e521de5

File tree

1 file changed

+4
-0
lines changed
  • app/code/Magento/CatalogRule/Model/Rule/Condition

1 file changed

+4
-0
lines changed

app/code/Magento/CatalogRule/Model/Rule/Condition/Product.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ protected function _prepareDatetimeValue($value, \Magento\Framework\Model\Abstra
9999
{
100100
$attribute = $model->getResource()->getAttribute($this->getAttribute());
101101
if ($attribute && $attribute->getBackendType() == 'datetime') {
102+
if (!$value) {
103+
return null;
104+
}
105+
$this->setValue(strtotime($this->getValue()));
102106
$value = strtotime($value);
103107
}
104108

0 commit comments

Comments
 (0)