Exemple #1
0
include 'Managers/StoreConfigManager.php';
include 'Helpers/Slug.php';
//Form
$storeConfig = StoreConfig::withPost($_POST);
//Manual run
//$storeConfigData = array(
//    'departmentId' => '',
//    'categoryId' => '',
//    'brandId' => '',
//    'name' => '',
//    'url' => '',
//    'dbHost' => '',
//    'dbName' => '',
//    'dbUser' => '',
//    'dbPass' => '',
//    'vtexUser' => '',
//    'vtexPass' => '',
//    'vtexAccountName' => '',
//    'magentoUser' => '',
//    'magentoPass' => '',
//    'productType' => ''
//);
//$storeConfig = StoreConfig::withData($storeConfigData);
StoreConfigManager::setStoreConfig($storeConfig);
foreach (CustomerManager::getList() as $customer) {
    CustomerManager::setCurrentCustomer($customer);
    CustomerManager::setStoreConfig($storeConfig);
    //BrandService::run();
    //CategoryService::run();
    ProductService::run();
}