Skip to content

Commit 4d7dc61

Browse files
committed
MAGETWO-51732: Catalog product "Use default" check problems causing data loss when updating product on non default site
- fix static test
1 parent 0eb6f20 commit 4d7dc61

File tree

1 file changed

+8
-3
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav

1 file changed

+8
-3
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,20 @@ protected function _prepareSelectIndex($entityIds = null, $attributeId = null)
130130
['attribute_id']
131131
)->joinLeft(
132132
['ds' => $this->getTable('catalog_product_entity_int')],
133-
"ds.store_id = s.store_id AND ds.attribute_id = dd.attribute_id AND ds.{$productIdField} = dd.{$productIdField}",
133+
"ds.store_id = s.store_id AND ds.attribute_id = dd.attribute_id AND " .
134+
"ds.{$productIdField} = dd.{$productIdField}",
134135
['value' => new \Zend_Db_Expr('COALESCE(ds.value, dd.value)')]
135136
)->joinLeft(
136137
['d2d' => $this->getTable('catalog_product_entity_int')],
137-
sprintf("d2d.store_id = 0 AND d2d.{$productIdField} = dd.{$productIdField} AND d2d.attribute_id = %s", $this->_eavConfig->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'status')->getId()),
138+
sprintf(
139+
"d2d.store_id = 0 AND d2d.{$productIdField} = dd.{$productIdField} AND d2d.attribute_id = %s",
140+
$this->_eavConfig->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'status')->getId()
141+
),
138142
[]
139143
)->joinLeft(
140144
['d2s' => $this->getTable('catalog_product_entity_int')],
141-
"d2s.store_id = s.store_id AND d2s.attribute_id = d2d.attribute_id AND d2s.{$productIdField} = d2d.{$productIdField}",
145+
"d2s.store_id = s.store_id AND d2s.attribute_id = d2d.attribute_id AND " .
146+
"d2s.{$productIdField} = d2d.{$productIdField}",
142147
[]
143148
)->joinLeft(
144149
['cpe' => $this->getTable('catalog_product_entity')],

0 commit comments

Comments
 (0)