diff --git a/magmi/engines/magmi_productimportengine.php b/magmi/engines/magmi_productimportengine.php index 719fcee4..98599188 100755 --- a/magmi/engines/magmi_productimportengine.php +++ b/magmi/engines/magmi_productimportengine.php @@ -168,11 +168,18 @@ public function getStoreIdsForStoreScope($scodes) if (!isset($this->_sid_sscope[$scodes])) { $this->_sid_sscope[$scodes] = array(); - $scarr = csl2arr($scodes); - $qcolstr = $this->arr2values($scarr); $cs = $this->tablename("core_store"); - $sql = "SELECT csmain.store_id from $cs as csmain WHERE csmain.code IN ($qcolstr)"; - $sidrows = $this->selectAll($sql, $scarr); + + if ($scodes == "*") { + $sql = "SELECT csmain.store_id from $cs as csmain"; + $sidrows = $this->selectAll($sql, $scarr); + } else { + $scarr = csl2arr($scodes); + $qcolstr = $this->arr2values($scarr); + $sql = "SELECT csmain.store_id from $cs as csmain WHERE csmain.code IN ($qcolstr)"; + $sidrows = $this->selectAll($sql, $scarr); + } + foreach ($sidrows as $sidrow) { $this->_sid_sscope[$scodes][] = $sidrow["store_id"]; @@ -853,7 +860,7 @@ public function getItemStoreIds($item, $scope = 0) { // global scope case 1: - $bstore_ids = $this->getStoreIdsForStoreScope("admin"); + $bstore_ids = $this->getStoreIdsForStoreScope("*"); break; // store scope case 0: