Wednesday, August 02, 2017

Prestashop 1.6 Allow import image from file system 프레스타샵 1.6에서 이미지를 로컬 폴더에서 임포트 하기

In Prestashop 1.5, we can able to import images from local folder like "~/upload", it reduce import time considerably and stable. However in Prestashop 1.6 it was blocked

프레스타샵 1.5에서는 이미지를 로컬폴더에 넣어 두고 임포트를 할 수 있었지만, 1.6에서는 막혀 있습니다.

It's easy to allow import image from file system back again by commend single line.
코드 한 줄만 코멘트 처리 해 버리면 간단히 해결됩니다.

In controllers/admin/AdminImportController.php
Line 1070
comment out 
 $url = http_build_url('', $parced_url);
to
//  $url = http_build_url('', $parced_url);

Now you can import image from local file system something like in CSV

 ImageURL 
../upload/637616.jpg;../upload/637616-2.jpg;../upload/637616-3.jpg;../upload/637616-4.jpg;../upload/637616-5.jpg

I use this way to upload bunch of files by FTP or SCP to /upload folder first then import multiple products without hiccup