Many users have reported issues when trying to import images using the default Import/Export within Magento. I too have suffered this headache. Luckily, I have figured out a way to bypass any issues by separating out our import files.
Traditionally when we import our CSV, we have one giant document full of attributes. Including all the image references Well, in my version don’t include the image attributes. Instead, we’ll put those into a new CSV along side a column with the SKU of the product.
In order to import a second CSV that is customised like this we’ll need a separate import profile. I’ll teach you how to create one now.
Step 1) Create the advanced profile
The solution is to create a custom import profile (System > Import/Export > Dataflow – Profiles). You only need to include the attributes that are required, which is just the SKU. Plus the appropiate image attributes. Plus labels if you want to go all out.
When you are creating your new profile, enter the following settings:
Now you can hit save! With our Profile now complete, we just need to create the folder media/import. This is where you will be storing all your images awaiting import.
Step 2) Create your Magento images import CSV
So now we have our profile created all we need to do is create our CSV. The CSV is pretty standard format. First of we have our SKU, and then followed by our image attributes.
When uploading images, they need to be within a folder called media/import
. Once saved to that folder you can then reference them relatively. By that I mean if your image is in media/import/test.jpg
in your csv reference it as /test.jpg
. It’s as easy as that.
Now finally all you need to do is modify your CSV file to include only the following columns:
sku, image, image_label, small_image, small_image_label, thumbnail, thumbnail_label
Here is how I managed to import a product with images:
1. Create a new Import Profile:
Entity Type: Products
Direction: Import
Data Transfer: Interactive
Data Format: CSV
Value Delimiter: ,
Enclose Values In: “
Original Magento attribute names in first row: No
2. Field Mapping - click “+ Add Field Mapping” and specify each of the columns in your CSV file in the order that they appear. Use the example above for which fields you need. I have a custom Attribute set, so I had a couple different fields.
Tip: start out by not mapping your images—make sure everything else works fine
3. Click “Save and Continue Editing” (of your import profile)
4. Create your CSV file: start out with 1 product until things work
a. It’s okay to start with Excel, but after you save as CSV, open the CSV file in NOTEPAD
b. Enclose all fields in “ “
c. I also removed any weird/special characters such as hard returns
d. Keep your Short Description short. I hit errors when I tried including several sentences. I believe this is a bug since I can add a pretty long “short description” via the gui.
e. Delete the top, header row with attribute names. No one else has mentioned having to do this, but I had to. Make sure there are no blank lines above or below your product row.
5. Try your import
a. In your Import Profile, click “Upload File” on the left menu
b. Browse and select your file
c. Click “Save and Continue Editing”
d. Click “Run Profile” in the menu on the left
e. Select the file you uploaded in the dropdown menu. After you have done this once, you may want to delete the old import files from the /var/import directory
f. Click “Run Profile in Popup”
6. If you get errors, double-check that you have included all required attributes and in the correct order, don’t have spelling errors, all items are enclosed in double-quotes, there are no extra line breaks before/after your row of data, you removed the header row…
7. Once things are working (go back and delete the newly added product), try the images
a. Upload your image file(s) to /media/import
b. Update your field mapping and add image, small_image, thumbnail
c. Update your CSV file (just do this in Notepad to avoid any issues): add your images at the end of the line, separated by a comma, preceded by a backslash and enclosed in double-quotes. I.e. you will need to type: ,"/myimage.gif”,"/mysmallimage.gif”,"/mythumbnail.gif"
d. Upload your new CSV file and try the import again
相关推荐
Magento No Flash Upload插件,替换原有的Flash上传
NULL 博文链接:https://justcoding.iteye.com/blog/2100394
MagentoBeginner's Guide.pdf [Packt]出品,最早的Magento精品书之一,原书地址:http://www.amazon.com/Magento-Beginners-Guide-William-Rice/dp/1847195946
Apress.The.Definitive.Guide.to.Magento.Dec.2009.pdf Apress于2009重磅推出的Magento上手书籍,原书地址:http://www.apress.com/book/view/9781430272298
magento:magento-ce 2.4.0
通过SFTP或SSH导航到Magento [Magento]/app/code/ 。 上载带有扩展名的Dropday/OrderAutomation目录。 打开终端并导航到Magento根目录。 运行以下命令以启用Dropday扩展: php bin/magento module:enable Dropday_...
Magento:registered:2数据集成借助Datatric Connect扩展程序,可以轻松地将Magento:registered:2商店与Datatrics平台连接起来。安装在开始安装过程之前,我们建议您对webshop文件以及数据库进行备份。 有两种安装...
magento2在产品详情添加自定义tab,1. Enable module with php bin/magento module:enable BelVG_ProductTabs 2. Run php bin/magento setup:upgrade 3. Recompile DI php bin/magento setup:di:compile 4. Recompile...
magento:Magento CE 1.x源代码
fresh-magento:新鲜的magento
docker-magento:Mark Shust的Magento Docker配置
VueFrontCMS Connect App for Magento 显示你的 :red_heart: -给我们一个 :star: 帮助我们将这个项目发展到最好! VueFront是CMS不可知的SPA和PWA前端,适用于您的老式Blog和电子商务网站。 Magento通过最佳的电子...
ansible-magento要求: -流浪汉-可以指示: 克隆此仓库无所事事在浏览器中导航到magento.dev。MySQL 数据库:magento 用户名:magento 密码:password123 这是基于的工作而进行的一些更改,以简化启动和运行过程...
magento:megento电子商务网站
马恩托 magento 项目
Magento Python API 用于连接到Magento Web服务的Python库。 用法 import magento url = 'http://domain.com/' apiuser = 'user' apipass = 'password' # Create an instance of API client = magento . API ( url ...
马真托Magento片段。
$ cd /path/to/magento $ modgit init $ modgit add epicomtech_magento https://github.com/epicomtech/magento.git Antes deComeçar Epicom的API协议 通过电子邮件联系API,电子邮件地址: Conhecendo omó...
Gimmie Magento 插件 为 Magento 添加 Gimmie 奖励,让用户在购买和推荐朋友时获得积分并获得真正的奖励。 要安装此插件,我们提供。 建造 克隆此插件所需的所有子模块(gimmie php 项目) $git submodule init &&...
Magento 食谱 使用为部署构建应用程序堆栈的食谱集合 ... knife rackspace server create --run-list 'recipe[magento]' --server-name magebox --image 125 --flavor 3 在浏览器中导航到节点 URL 或