【发布时间】:2013-03-25 22:26:46
【问题描述】:
我通过使用 magento 中的导入/导出工具导出产品来编辑我的产品,导入它们后我遇到了重新索引过程存在问题,我终于修复了。
但是现在我所有的图片都丢失了,并且没有显示在前端,有人可以帮我解决这个问题吗?
/1/_/1_7_138.jpg 是 CSV 图像位置的格式
我还尝试将 media/category/product 中的图像移动到 media/import 但仍然无法正确显示
我还尝试在媒体文件夹中将文件权限从 755 编辑到 77,但仍然没有
我也在相应的 SQL 数据库中运行了这个
INSERT INTO catalog_product_entity_media_gallery (attribute_id, entity_id, `value`)
SELECT ga.attribute_id, v.entity_id, v.value
FROM catalog_product_entity_varchar v
INNER JOIN eav_entity_type et ON et.entity_type_code=\'catalog_product\'
INNER JOIN eav_attribute va ON va.entity_type_id=et.entity_type_id AND
va.frontend_input=\'media_image\' AND va.attribute_id=v.attribute_id
INNER JOIN eav_attribute ga ON va.entity_type_id=et.entity_type_id AND
ga.attribute_code=\'media_gallery\'
LEFT JOIN catalog_product_entity_media_gallery g ON g.entity_id=v.entity_id AND
g.value=v.value
WHERE v.value<>\'no_selection\' AND v.value<>\'\' AND g.value IS NULL;
并得到以下错误:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '\'catalog_product\' INNER JOIN
eav_attribute va ON va.entity_ty
【问题讨论】:
标签: mysql magento csv import magento-1.7