2017-02-24 76 views
0

我正在使用Magmi数据泵将一些产品导入到Magento中。使用Magmi数据泵从外部URL导入图像

到目前为止,我有这样的:

require_once("../../magmi/inc/magmi_defs.php"); 
require_once("../../magmi/integration/inc/magmi_datapump.php"); 

$dp = Magmi_DataPumpFactory::getDataPumpInstance("productimport"); 

$dp->beginImportSession("Default","create"); 

$newProductData = array(
    'type'     => 'simple', 
    'sku'     => "test-simple", 
    'qty'     => 1000, 
    'color'     => 'Brown', 
    'price'     => 10, 
    'name'     => 'test simple', 
    'tax_class_id'   => 1, 
    'is_in_stock'   => 1, 
    'store'     => 'admin', 
    'economic_productgroup' => 700, 
    'image'     => '+http://blogs.smh.com.au/entertainment/getflickd/44655_native.jpeg.jpg', 
    'small_image'   => 'http://blogs.smh.com.au/entertainment/getflickd/44655_native.jpeg.jpg', 
    'thumbnail'    => 'http://blogs.smh.com.au/entertainment/getflickd/44655_native.jpeg.jpg' 
); 

$dp->ingest($newProductData); 

$dp->endImportSession(); 

所有属性都得到正确的进口,除了图像。这不起作用。

这是“默认”配置文件的屏幕截图。

enter image description here

enter image description here

Magmi在这里安装:http://www.example.com/import/magmi/web/magmi.php

为什么我的图片的进口不工作?

回答

0

问题通过在web界面中创建新配置文件解决,具有与我在“默认”配置文件中完全相同的设置。不知道为什么。