Skip to content

Commit 4ad02b2

Browse files
committed
MC-5777: Catalog rule does not apply as expected in EE
1 parent 2e3f80e commit 4ad02b2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

app/code/Magento/Catalog/Model/Api/SearchCriteria/CollectionProcessor/ConditionProcessor/ConditionBuilder/EavAttributeCondition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function build(Filter $filter): string
6464
->select()
6565
->from(
6666
[Collection::MAIN_TABLE_ALIAS => $entityResourceModel->getEntityTable()],
67-
Collection::MAIN_TABLE_ALIAS . '.' . $entityResourceModel->getLinkField()
67+
Collection::MAIN_TABLE_ALIAS . '.' . $entityResourceModel->getEntityIdField()
6868
)->joinLeft(
6969
[$tableAlias => $attribute->getBackendTable()],
7070
$tableAlias . '.' . $attribute->getEntityIdField() . '=' . Collection::MAIN_TABLE_ALIAS .

app/code/Magento/CatalogRule/Model/RuleDateFormatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface
2828
/**
2929
* @inheritdoc
3030
*/
31-
public function getDate($scope = null)
31+
public function getDate($scope = null): \DateTime
3232
{
3333
return $this->localeDate->scopeDate($scope, null, true);
3434
}
3535

3636
/**
3737
* @inheritdoc
3838
*/
39-
public function getTimeStamp($scope = null)
39+
public function getTimeStamp($scope = null): int
4040
{
4141
return $this->localeDate->scopeTimeStamp($scope);
4242
}

app/code/Magento/CatalogRule/Model/RuleDateFormatterInterface.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ interface RuleDateFormatterInterface
1515
/**
1616
* Create \DateTime object with date converted to scope timezone for catalog rule
1717
*
18-
* @param mixed $scope Information about scope
19-
* @return \DateTime
18+
* @param mixed $scope Information about scope
19+
* @return \DateTime
2020
*/
21-
public function getDate($scope = null);
21+
public function getDate($scope = null): \DateTime;
2222

2323
/**
24-
* Get scope timestamp for catalog rule
24+
* Get scope timestamp for catalog rule
2525
*
26-
* @param mixed $scope Information about scope
27-
* @return int
26+
* @param mixed $scope Information about scope
27+
* @return int
2828
*/
29-
public function getTimeStamp($scope = null);
29+
public function getTimeStamp($scope = null): int;
3030
}

0 commit comments

Comments
 (0)