あなたはWebサービスAPIで画像を送信することができます。
私は、私たちのプロジェクトの1つで、次のスニペットを使用:
$image_entry = ...
$imagePath = $dir.$image_entry['nimi'];
if(file_exists($imagePath)){
//$sku = microtime();//$result['kood'];
$newImage = array(
'file' => array(
'name' => $image_entry['nimi'],
'content' => base64_encode(file_get_contents($imagePath)),
'mime' => 'image/jpeg'
),
'label' => $image_entry['nimi'],
'position' => 0,
'types' => array('image', 'small_image', 'thumbnail'),
'exclude' => 0
);
try {
$imageFilename = $proxy->call($sessionId, 'product_media.create', array($sku, $newImage));
}
catch(Exception $e) {
print("Error assigning image to $sku: " . $e->getMessage() . "\n");
}
}
別のオプションは、Magentoのデフォルトを上書きすることです他のホストからのファイルを直接リンクする動作 - 本当に悪いオプション。
もう1つのオプションがあります - PHPで画像をダウンロードしますが、画像をダウンロードするためにインポートのモジュール動作を変更する必要があります。