开发者

How to import images into magento using an absolute path? [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

I tried importing开发者_StackOverflow中文版 product images into Magento using an absolute path, but it did not work. The image was not uploaded.

For example, I tried importing "http://somewebsite.com/someimage.jpg". The image was not imported.

(I listed the abosolute path on a csv doc and imported using a Profile on the Import/Export screen of the Magento Admin.)

Does anyone know a way to do this?


Roll your own curl program to read the csv and download the images to a local directory. You can do this ahead of time, or try your hand at tricking magento into thinking a local alias to the curl script is a local image.


Magento is hard-wired to only import images from the /media/import/ directory. I think it needs the images to be on it's own server to properly copy them to a new location within /media/catalog/product/. You'll have to either download all the images your self manually and upload them to /media/import/, or write a module that will override some of the core functionality that will get the images and process them properly from an outside source.


you need to edit your phtml files under $magento_dir/app/design/frontend/yourtheme/..//template/catalog/product/view.phtml create a custom attribute of product (ie. absolute_image_url) then edit view.phtml if absolute_image_url is set use it instead product image

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜