Skip to content

Commit 7f46ba4

Browse files
committed
MAGETWO-53424: Added additional arguments into attributes creation
1 parent 9eb120d commit 7f46ba4

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

app/code/Magento/Store/Model/StoreScopeProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public function getContext($entityType, $entityData = [])
5050
if (isset($entityData[Store::STORE_ID])) {
5151
$value = $entityData[Store::STORE_ID];
5252
} else {
53-
$value = (int)$this->storeManager->getStore(true)->getId();
53+
if ($this->storeManager->hasSingleStore()) {
54+
$value = Store::DEFAULT_STORE_ID;
55+
} else {
56+
$value = (int)$this->storeManager->getStore(true)->getId();
57+
}
5458
}
5559

5660
$identifier = Store::STORE_ID;

dev/tests/integration/testsuite/Magento/CatalogRule/Model/Indexer/IndexerBuilderTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ public function testReindexFull()
9999

100100
$this->indexerBuilder->reindexFull();
101101

102-
$this->assertEquals(9.8, $this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->product->getId()));
103-
$this->assertEquals(
104-
9.8,
105-
$this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->productSecond->getId())
106-
);
102+
$rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->product->getId());
103+
$this->assertEquals(9.8, $rulePrice);
104+
$rulePrice = $this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->productSecond->getId());
105+
$this->assertEquals(9.8, $rulePrice);
107106
$this->assertFalse($this->resourceRule->getRulePrice(new \DateTime(), 1, 1, $this->productThird->getId()));
108107
}
109108

0 commit comments

Comments
 (0)