且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用多个图像更新Magento产品

更新时间:2023-11-30 12:20:34

第1步:全部导出产品


  1. 在开始之前,请确保已保存对产品数据的所有更改。

  2. 在Admin菜单上,选择System> Import / Export> Dataflow - Profiles。

  3. 在配置文件列表中,选择Export All Products。

  4. 在左侧面板中,单击运行配置文件。

  5. 要开始此过程,请单击弹出窗口中的运行配置文件按钮。

  6. 等一下,让配置文件开始执行。完成该过程所需的时间长度取决于数据库的大小。请勿关闭窗口。

  7. 完成此过程后,您可以在服务器上的以下位置找到导出的CSV文件:

  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

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

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.

步骤2:复制产品图像到服务器

CSV文件包含每个产品图像的路径,但实际的图像文件必须上传到服务器。要使图像可以导入,请将它们放在media / import目录中。

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
使用SFTP用于将要导入的产品图像复制到媒体/导入文件夹的实用程序。

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

步骤3:编辑CSV文件

根据需要编辑图像,small_image,缩略图列。

Edit image, small_image, thumbnail columns as you need.

Magento创建按字母顺序组织的产品图像文件的目录结构。您可以在CSV数据中的每个图像文件名之前看到该路径。但是,导入图像时,必须永远不要在文件名之前包含该路径。您要做的唯一事情是在要导入的每个图像的文件名之前输入正斜杠。 Magento负责其余的工作。对于此示例,我们需要添加上传到media / import文件夹的三个图像文件。

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

第4步:导入产品


  1. 在Admin菜单上,选择System> Import / Export> Dataflow - Profiles。

  2. 在配置文件列表中,选择导入所有产品。
    此通用配置文件,可用于导入或更新任何数字或产品记录。

  3. 在左侧面板中,选择上传文件。

  4. 因为我们只上传了一个文件,所以单击文件1的浏览按钮。然后,在计算机上找到该文件并单击以选中它。该文件的路径显示在输入框中。

  5. 单击保存并继续编辑按钮。

  6. 在左侧面板中,选择运行。个人资料。

  7. 选择您编辑的CSV文件。如果列表中有多个文件,请确保选择正确的文件。然后,单击弹出窗口中的运行配置文件按钮。

  8. 稍等片刻,以便配置文件开始导入过程。不要关闭窗口或中断过程。导入过程完成后,在列表底部查找完成的配置文件执行消息。如果您收到错误消息,请更正CSV文件中的问题,然后重试。

  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.

有关详细信息,请检查此项out:

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