sql 找到Magento媒体库ID以通过CSV导入图像

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 找到Magento媒体库ID以通过CSV导入图像相关的知识,希望对你有一定的参考价值。

-- https://makandracards.com/magento/16457-importing-images

-- to import images you first need these columns:

_media_attribute_id - the attribute_id of media_gallery (see below)
_media_image - the path of the image, i.e. /some_image.jpg
_media_lable - the image label, i.e. "My nice image"
_media_position - the position, 1, 2 etc
_media_is_disabled - whether the image is excluded from the gallery or not

_media_attribute_id is the most important field, it needs to correspond to the media_gallery attribute id, you can find this out by running this SQL:


select attribute_id from eav_attribute where attribute_code = 'media_gallery';


-- When you have this structure set up correctly, you can put all your iamges in media/import and you're all done!

 -- If you want to use any of the images as the image, small_image or thumbnail
-- then just add the same path you entered in _media_image in the column for the
-- relevant image.




以上是关于sql 找到Magento媒体库ID以通过CSV导入图像的主要内容,如果未能解决你的问题,请参考以下文章

Magento 导入纯文本密码

如何实现Magento产品批量导入

在 magento 中导入 csv 产品时出错

以编程方式运行 Magento 1.9.1.0 数据流导入配置文件

关于Magento数据库的一系列查询

sql Magento的,以客户为view.sql