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:后台添加预览按钮 View product in frontend from Magento admin”主要探讨了如何通过自定义开发来实现这一功能,让管理员能够快速检查商品在网站前台的显示状态。 在Magento中,通常管理员需要...
### Magento新手指南知识点详解 #### 一、Magento简介与特性 **Magento**是一款功能强大的开源电子商务平台,由Varien公司(后被Adobe收购)于2008年首次发布。它以其灵活性、可扩展性和丰富的功能集而闻名,是...
### Magento权威指南 #### 书籍概述 《Magento权威指南》是由Adam McCombs与Robert Banh共同编著的一本深入探讨Magento电商平台的技术手册。该书由Apress出版社于2009年出版发行,旨在为读者提供一个全面、系统的...
Magento No Flash Upload插件是专为Magento电子商务平台设计的一个组件,旨在解决原生系统依赖Flash进行文件上传的问题。由于Adobe Flash在安全性、性能和移动设备兼容性方面的限制,越来越多的浏览器开始逐步淘汰对...
通过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...
docker-magento:Mark Shust的Magento Docker配置
Magento是一款开源的电子商务平台,由Adobe公司开发,用于构建高度可定制的在线商店。它基于PHP语言,利用了Zend框架,提供了丰富的功能和强大的性能,让商家能够灵活地管理产品、订单、客户以及营销活动。 在...
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 ...
$ 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 或
Magento 2 是一款开源的电子商务平台,用于构建和管理在线商店。它由Adobe公司拥有,是Magento 1的升级版本,提供了许多改进的功能和性能优化。Magento 2 的设计目标是提供一个高度可定制、功能丰富的电商解决方案,...
以下是一些关于 Magento CE 2.4.0 的核心知识点: 1. **增强的安全特性**: - Magento 2.4.0 强化了安全防护,包括对 SQL 注入、XSS 攻击的防御,以及增强了密码策略和支付网关的加密。 - 集成了 PCI DSS...
Laravel-马捷托用于访问Laravel中本地安装的Magento类的软件包。用法初始化Mage类,然后可以像在Magento框架中一样...sku加载产品的示例$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);