private function advanced($type, $data = null) { $mageSOAPAdvanced = new mageSOAPAdvanced(); switch ($type) { case 'reindex': $mageSOAPAdvanced->reindexAll(); echo "Reindex done\n"; break; case 'images': return $mageSOAPAdvanced->getImageList(); break; case 'cloaksimple': return $mageSOAPAdvanced->cloaksimpleproducts(); break; case 'addcatnamestoproducts': return $mageSOAPAdvanced->addcatnamestoproducts(); break; case 'firstaddcatnamestoproducts': return $mageSOAPAdvanced->initcatproducts(); break; case 'orderstatusupdate': return $mageSOAPAdvanced->updateorderstatus($data); break; case 'createurlkeys': return $mageSOAPAdvanced->createurlkeys($data); break; case 'createurlrewrite': return $mageSOAPAdvanced->prepareurlrewrites($data); break; case 'addImages': if (isset($data)) { return $mageSOAPAdvanced->assignImages($data); } break; case 'numbers': return $mageSOAPAdvanced->getNumberList(); break; case 'urllist': return $mageSOAPAdvanced->getUrlList(); break; case 'configprods': return $mageSOAPAdvanced->getConfigList(); break; case 'simpleprods': return $mageSOAPAdvanced->getSimpleList(); break; case 'showStock': return $mageSOAPAdvanced->showStock(); break; case 'deletespecials': return $mageSOAPAdvanced->deletespecials(); break; case 'setStock': if (isset($data)) { return $mageSOAPAdvanced->setStock($data); } break; case 'geturlkeylist': return $mageSOAPAdvanced->geturlkeyjson($data['path']); break; case 'orderByOID': if (isset($data) && isset($data['increment_id'])) { return $mageSOAPAdvanced->getOrderByOID($data['increment_id']); } break; case 'categories': if (isset($data)) { return $mageSOAPAdvanced->updateCategories($data); } break; case 'linkProductsToCategories': if (isset($data)) { return $mageSOAPAdvanced->linkProductsToCategories($data); } break; case 'linkCrossselling': if (isset($data)) { return $mageSOAPAdvanced->linkCrossselling($data); } break; case 'cleanUpProductFamilies': if (isset($data)) { return $mageSOAPAdvanced->cleanUpProductFamilies($data); } break; case 'disableConfigurableProductsWithNoEnabledChildren': return $mageSOAPAdvanced->disableConfigurableProductsWithNoEnabledChildren(); break; } }
<?php require __DIR__ . "/mageSOAPAdvanced.php"; $path = "/var/www/mey/shared/public/media/"; $mage = new mageSOAPAdvanced(); $data = $mage->getUrlList(); foreach ($data as $storeId => $storeUrls) { file_put_contents($path . "urllist_{$storeId}.txt", implode("\r\n", $storeUrls)); }