简体   繁体   中英

Magmi Image Upload Remore Url from PHP

Trying to upload image with magmi from url.

Does not work. Image not visible in back and frontend.

Really only code, tried everything not working, images also not work when using http.

 $newProductData = array(
        'name'          => (string)$v[title],        // name
        'sku'           => (string)$v[manufacturer_item_id],        // sku
        'special_price' => ((real)$v[recommended_retail_price]),    // special price        
        'price'         => ((real)$v[recommended_retail_price]),    // price
        'attribute_set' => 'Fahrrad',            // attribute_set
        'type'          => 'configurable',
        'store'         => 'admin',            
        'description'   => (string)$v[title],        // full description
        'short_description' => (string)$v[title],    // short description
        'qty'           => (string) 10,        // qty
        'category_ids'    => $v[category],                // ID of categories
        'weight'        => (string) '',        // weight
        'tax_class_id'  => '2',                    // tax class id (check your ids)
        'manufacturer'    => (string) $v[manufacturer_name],        // manufacturer
        'meta_title' =>   (string) $v[title],            // meta title
        'meta_description' => (string)$v[title],    // meta description
        'meta_keyword' => (string)$v[title]      // meta keywords
);
$newProductData['image']='+'.(string)'http://www.velo-zuerich.ch/velo-zuerich-bilder/velo-news/kettenlos-700C-Curve-velo.jpg';        // + show picture, - dont show picture
$newProductData['small_image']='+'.(string)'http://www.velo-zuerich.ch/velo-zuerich-bilder/velo-news/kettenlos-700C-Curve-velo.jpg';            // small img
$newProductData['thumbnail']='+'.(string)'http://www.velo-zuerich.ch/velo-zuerich-bilder/velo-news/kettenlos-700C-Curve-velo.jpg';            // thumbnail
//echo "<pre>";
//print_r($newProductData);
//echo "</pre>";
$dp->ingest($newProductData);

Make sure you have the Image attributes processor plugin enabled, which is required for Magmi to import images.

Also make sure you set the Pre-download check for remote images to Enable for the Image attributes processor config.

Lastly, check your Magmi log file and see what Magmi is outputting. If the images are not importing, Magmi will usually produce an error or warning describing why in it's log.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM