Skip to content

Commit

Permalink
SW-4367 - Removes special treatment of numeric article numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Nögel committed Nov 12, 2012
1 parent fa64670 commit 2b7c0b6
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions engine/Shopware/Controllers/Backend/ImportExport.php
Expand Up @@ -1579,7 +1579,7 @@ public function importImages($filePath)
}

if (empty($imageData['ordernumber']) || empty($imageData['image'])) {
continue;
continue;
}
$counter++;

Expand Down Expand Up @@ -2356,22 +2356,14 @@ protected function importArticlesCsv($filePath)
if (!empty($articleData['similar'])) {
$similars = explode('|', $articleData['similar']);
foreach ($similars as $similarId) {
if (is_numeric($similarId)) {
$updateData['similar'][] = array('id' => $similarId);
} else {
$updateData['similar'][] = array('number' => $similarId);
}
$updateData['similar'][] = array('number' => $similarId);
}
}

if (!empty($articleData['crosselling'])) {
$crossSellings = explode('|', $articleData['crosselling']);
foreach ($crossSellings as $crosssellingId) {
if (is_numeric($crosssellingId)) {
$updateData['related'][] = array('id' => $crosssellingId);
} else {
$updateData['related'][] = array('number' => $crosssellingId);
}
$updateData['related'][] = array('number' => $crosssellingId);
}
}

Expand Down Expand Up @@ -2778,13 +2770,11 @@ protected function saveArticle($articleData, $articleResource, $articleMapping,
$updateData = array();
$updateData['variants'][] = $detailData;
}

$result = $articleResource->update($articleModel->getId(), $updateData);
} else {
$updateData['mainDetail'] = $detailData;
$result = $articleResource->create($updateData);
}

return $result;
}

Expand Down Expand Up @@ -3028,7 +3018,8 @@ protected function saveCustomer($customerData)

// userId and custumernumber will be ignored as there is not distinction between accountmode 0 and 1 in
// old export files
if (!empty($customerData['email']) && !empty($customerData['subshopID'])) { /** \Shopware\Models\Customer\Customer $customerModel */
if (!empty($customerData['email']) && !empty($customerData['subshopID'])) {
/** \Shopware\Models\Customer\Customer $customerModel */
$customerModel = $customerRepository->findOneBy(array('email' => $customerData['email'], 'shopId' => $customerData['subshopID']));

} elseif (!empty($customerData['email'])) {
Expand Down

0 comments on commit 2b7c0b6

Please sign in to comment.