PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

[SOLVED] CSV Import Images

31 replies to this topic
#1
the_el_man

    PrestaShop Apprentice

  • Members
  • PipPip
  • 35 posts
Hi,

I was just wondering what the default directory is if you use CSV import for images. e.g. if in the csv you put image1.jpg in the image url column.

I cannot seem to get them to work. Using clean 1.2.5.

Thanks in advance

#2
JAKCRABBIT

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2163 posts
Hi,

its easy, dont USE dir IMG, create your new dir in root of Prestashop etc imgimport and to this dir copy your images of imports products.

In csv file in URL column type:
../imgimport/nameofimage.jpg


Try it, i think, it help :)

When it doesnt work, use my AdminImport.php and replace it in Admin/tabs.

Attached Files


,,Pokiaľ mi nedáš aspoň hviezdičku tak sa ma ani na nič nepýtaj!"

FORCE COMPILE - ZAPNOUT, CACHE - VYPNOUT

ICQ: 275784332


#3
the_el_man

    PrestaShop Apprentice

  • Members
  • PipPip
  • 35 posts
YOU LEGEND!!

You dont realise how many attempts I did to get it working. I read loads of forum posts and nothing!

The "../mydirectory/myimage.jpg" worked a treat!
If anyone is having problems with Image Url on their CSV import try that first!

Thank you so much!
Rep your way!

#4
oberton

    PrestaShop Apprentice

  • Members
  • PipPip
  • 51 posts
Just adding on this: I struggled the whole night last night to import images and I confirm that the above path worked for me at the end. For beginners like me, I confirm that you need the double dots with / and no quotation marks, ../imgimport/test1.jpg for example, imgimport being created just under the root of your domain name redirection and all necessary jpg in there

I tried so many combinations of URL that I got mad! This one also works by the way for 1&1;:
/homepages/12/d1234567/htdocs/yourPSdirectoryname/imgimport/test.jpg

Also, the case is important...after trying 20 times I relaised I had .JPG instead of .jpg...

I suggest trying with a small csv of 3-4 lines, using notepad++ and for each product ID try a different path if unsure...one will eventually work!
For each subsquent test, increment the ID so that you can see what changed.

Finally, I realised sharing a database with a magento install created issues and starting from scratch on a blank one helped.

Overall, first impression of PS is very good for me, nice and easy. Not as rich as Magento but probably as efficient and faster...and time is money!

#5
the_el_man

    PrestaShop Apprentice

  • Members
  • PipPip
  • 35 posts
Ah another Magento mover. I love Magento when it works, but it simply doesnt 99% of the time, and the CSV import takes FOREVER!! I couldnt believe how fast and simple Prestashop was in comparison. When I get the time my Magento shop is becoming a PS one for sure.

#6
istage

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts
it didn't work for me.
1.2.5.0+xamp

#7
the_el_man

    PrestaShop Apprentice

  • Members
  • PipPip
  • 35 posts
Follow the steps exactly. I cant remember what I did, but I did it wrong. You have to upload the images first though I remember that.

#8
razaro

    PrestaShop Addict

  • Members
  • PipPipPip
  • 954 posts
I tried on 1.2.5+wamp and it works.
In cvs file lines are following this pattern
ProductID;"../productImages/image.jpg";ProductName

312;"../productImages/table1.jpg";Kitchen table


When you select cvs file set drop-down to Products,and in this example
i choose columns ID,Image URLs (x,y,z...),Name

Hope that this helps :-)

#9
istage

    PrestaShop Newbie

  • Members
  • Pip
  • 8 posts
PROBLEM SOLVED.

THANKS

i found that the point it's , i have to add " to the URL address.

thanks again.

#10
t-prod

    PrestaShop Newbie

  • Members
  • Pip
  • 22 posts
Hi,

Just an other question, what do you change in the file AdminImport.php ?
I see a lot of modifications like image management can you explain a little bit ?
I'm gonna try image tip in 1.2.5

Thanks for your contribution.
Module Jquery SIFR - Remplacer vos textes par la police de votre choix - Visualiser
Création site web Prestashop
Immobilier Hyères
Vanille

#11
t-prod

    PrestaShop Newbie

  • Members
  • Pip
  • 22 posts
I have tested but it doesn't work. Images are copied but not displayed.

Thay are copied in img dir like that :

0-10-home.jpg
0-10-large.jpg
0-10-medium.jpg
0-10-small.jpg
0-10-thickbox.jpg

This is the information I put in my CSV file

../images/vignette-produits-557.jpg

I just want image in my product listing.

Any ideas ?

Thanks for your help
Module Jquery SIFR - Remplacer vos textes par la police de votre choix - Visualiser
Création site web Prestashop
Immobilier Hyères
Vanille

#12
Lance Monotone

    PrestaShop Newbie

  • Members
  • Pip
  • 9 posts

From 1260892390:

Ah another Magento mover. I love Magento when it works, but it simply doesnt 99% of the time, and the CSV import takes FOREVER!! I couldnt believe how fast and simple Prestashop was in comparison. When I get the time my Magento shop is becoming a PS one for sure.


And I am another one...I sold my clients on Magento and wasted a month and a half trying to get it to work. If PS would step up with great documentation, it would be a world-class product.

CSV image import is a case in point. How hard would it be to write documentation on how to import? Thanks to @jakcrabbit and @razaro for the solution...make sure you put quotes around your path: ".../imgupload/image.jpg". Straight quotes, not right and left quotes.

#13
serdar-slv

    PrestaShop Newbie

  • Members
  • Pip
  • 6 posts
i tried to delete my entry here, it is not possible. i will open new thread for my problem.

#14
vishal123

    PrestaShop Newbie

  • Members
  • Pip
  • 1 posts
It is not working for me, can you explain me the proper procedure, of importing images, also categories are not getting defined for the products. can you please help me out.

#15
JAKCRABBIT

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2163 posts
Hi, this is my manual for import in .pdf (in czech language), but i think, you understand, what to do :)

http://www.prestasho...d/43659/#195931

,,Pokiaľ mi nedáš aspoň hviezdičku tak sa ma ani na nič nepýtaj!"

FORCE COMPILE - ZAPNOUT, CACHE - VYPNOUT

ICQ: 275784332


#16
sixty7

    PrestaShop Newbie

  • Members
  • Pip
  • 18 posts
hi at all.

first, sorry about my english ;-)

my problem is, that there are no images shown at my shop, when i do the csv-import in presta. i have ca. 10.000 of extern picture-URLs to import, but not one is shown after importing the csv ... i only see the "grey questionmark". the rest of the imported datas are ok shown. only ZERO pictures!!!

i tried a lot but nothing helped ... :(

did i understand it correctly, that the AdminImport.php could change to the new directory bsp: /IMGtest ??? how must i do the changings?

#17
JAKCRABBIT

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2163 posts
hi, you dont need to edit adminimport.php... when you want import pictures from external url, you need on server turn on this function (open external url)

,,Pokiaľ mi nedáš aspoň hviezdičku tak sa ma ani na nič nepýtaj!"

FORCE COMPILE - ZAPNOUT, CACHE - VYPNOUT

ICQ: 275784332


#18
sixty7

    PrestaShop Newbie

  • Members
  • Pip
  • 18 posts
hi,

so you mean the allow_url_fopen ??? this is ON.

Ok, then i will try it.

thanks a lot.

greets

#19
JAKCRABBIT

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2163 posts
Yup, when it doesnt work, you have problem with PHP on server.

,,Pokiaľ mi nedáš aspoň hviezdičku tak sa ma ani na nič nepýtaj!"

FORCE COMPILE - ZAPNOUT, CACHE - VYPNOUT

ICQ: 275784332


#20
sixty7

    PrestaShop Newbie

  • Members
  • Pip
  • 18 posts
ok, thanks ... i don´t hope so ;-)