Skip to content

Commit 2361813

Browse files
ENGCOM-2763: [Forwardport] Doesn't work if use date as condition for Catalog Price Rules #17502
- Merge Pull Request #17502 from mage2pratik/magento2:2.3-develop-PR-port-16855 - Merged commits: 1. ddf2509
2 parents 1cb9235 + ddf2509 commit 2361813

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)