Skip to content

Instantly share code, notes, and snippets.

@ahmadwaliesipick
Created May 27, 2019 04:29
Show Gist options
  • Save ahmadwaliesipick/36e11b2e2c28ab09ea9ef3b33c11c2e7 to your computer and use it in GitHub Desktop.
Save ahmadwaliesipick/36e11b2e2c28ab09ea9ef3b33c11c2e7 to your computer and use it in GitHub Desktop.
<?php
$currentStores=[
'es',
'sp',
'en',
'ar',
'it'
]
foreach ($currentStores as $currentStore){
$importData[] = [
'sku' => $sku,
'name' => $name,
'price' => $price,
'description' => $description,
'product_type' => $product_type,
'store_view_code' => $currentStore['code'],
];
}
$this->importerModel->setBehavior(Import::BEHAVIOR_ADD_UPDATE);
$this->importerModel->setEntityCode('catalog_product');
$this->importerModel->processImport($importData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment