Skip to content

Commit 2517aca

Browse files
committed
MAGETWO-63831: [Backport] -Product Rule Fix- for 2.0
1 parent 54d4e70 commit 2517aca

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ public function getBindArgumentValue()
602602
*/
603603
public function getMappedSqlField()
604604
{
605-
if (!$this->isAttributeSetOrCategory()) {
605+
if ($this->getAttribute() == 'sku') {
606+
$mappedSqlField = 'e.sku';
607+
} elseif (!$this->isAttributeSetOrCategory()) {
606608
$mappedSqlField = $this->getEavAttributeTableAlias() . '.value';
607609
} elseif ($this->getAttribute() == 'category_ids') {
608610
$mappedSqlField = 'e.entity_id';

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ protected function expandAllToggles()
109109
{
110110
$closedToggles = $this->_rootElement->getElements($this->closedToggle);
111111
foreach ($closedToggles as $toggle) {
112-
$toggle->click();
112+
if ($toggle->isVisible()) {
113+
$toggle->click();
114+
}
113115
}
114116
}
115117

0 commit comments

Comments
 (0)