Update Magento products with multiple images

2020-05-08 06:55发布

问题:

I'm developing a Magento store and I imported some products, but in these products there were more than just one image and when I imported the products just one came with, now I need to update all the products with the images left, somebody knows how to do it in some quick mode?

Thanks!

回答1:

Step 1: Export All Products

  1. Before you begin, make sure that all changes to the product data have been saved.
  2. On the Admin menu, select System > Import/Export > Dataflow - Profiles.
  3. In the list of profiles, select Export All Products.
  4. In the panel on the left, click Run Profile.
  5. To begin the process, click the Run Profile in Popup button.
  6. Wait a few moments for the profile to begin execution. The length of time it takes to complete the process depends on the size of the database. Do not close the window.
  7. When the process is complete,you can find the exported CSV file in the following location on the server:

    [magento-install-dir]/var/export/export_all_products.csv

The CSV data appears in the spreadsheet as rows of product records organized into columns of attributes, with the Attribute Code in the header of each column.

Step 2: Copy the Product Images to the Server

The CSV file contains a path to each product image, but the actual image files must be uploaded to the server. To make the images available to import, place them in the media/import directory.

[magento-install-dir]/media/import Use your SFTP utility to copy the product images that you want to import to the media/import folder.

Step 3: Edit the CSV File

Edit image, small_image, thumbnail columns as you need.

Magento creates a directory structure of product image files that is organized alphabetically. You can see that path before each image file name in the CSV data. However, when you import images, you must never include that path before the file name. The only thing you have to do is to enter a forward slash before the file name of each image that you want to import. Magento takes care of the rest. For this example, we need to add the three image files that were uploaded to the media/import folder.

/hdb005_HOTP_600.jpg
/hdb005_MARM
/hdb005_SALM_600.jpg

Step 4: Import the Products

  1. On the Admin menu, select System > Import/Export > Dataflow - Profiles.
  2. In the list of profiles, select Import All Products. This general-purpose profile that can be used to import or update any number or product records.
  3. In the panel on the left, select Upload File.
  4. Because we’re uploading only one file, click the Browse button for File 1. Then, find the file on your computer and click to select it. The path to the file appears in the input box.
  5. Click the Save and Continue Edit button.
  6. In the panel on the left, select Run Profile.
  7. Select the CSV file that you edited. If there are several files in the list, make sure to select the right one. Then, click the Run Profile in Popup button.
  8. Wait a few moments for the profile to begin the import process. Do not close the window or interrupt the process. Look for the “Finished Profile Execution” message at the bottom of the list when the import process is complete. If you receive an error message, correct the problem in the CSV file, and try again.

For more details check this out:

http://merch.docs.magento.com/ce/user_guide/content/store-operations/dataflow.html