[SOLVED] PRODUCTS Can't upload image via CSV

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

[SOLVED] PRODUCTS Can't upload image via CSV

Post by delve2013 »

I'm trying to upload images to the products module using a CSV file which I exported from the products module edited as necessary and imported back into the module. I've followed the instructions and it manages to populate the site with products but It won't upload any images, no matter which folder they're in on the web server.

It's a bit of a pain because I have over 300 images to upload and I don't want to upload them 1 by 1.

The CSV info is as follows:

Code: Select all

P|Intricate Creations - TEST-TEST-TEST|||0|2013-10-07 16:40:03|2013-10-07 16:40:03|1|published|0||0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Intricate_Creations_-_Amour-Favour-Box.jpg|
Last edited by delve2013 on Tue Oct 22, 2013 3:30 pm, edited 1 time in total.
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

I really need help with this, my client needs to upload hundreds of product entries, and if this doesn't work it's a bit of a pain as I won't be able to manage the client's expectations.

Help, someone..?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: PRODUCTS Can't upload image via CSV

Post by Jo Morg »

http://www.ask.com/question/what-is-a-cvs-file
CVS comma separated values- files are specially formatted plain text files that are used to store spreadsheet and basic database information in simple format. Cvs files provide an easy way of transferring large volume of spreadsheet information between programs.
AFAIK images can not be transfered with this format.
Note: This cvs is NOT a Canvas file.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

I know this, but Product Manager allows you to enter the image file name into your CSV file which is then associated to a path to the image through Product Manager.

The images need to be uploaded via FTP access as a batch into a folder. I then need to specify this path in the CSV file. Which I've done, but product manager fails to locate the images.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: PRODUCTS Can't upload image via CSV

Post by Dr.CSS »

Have you added images that show up in products from it's admin, then export the CSV to see how it was formatted so you can copy it..?
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

Yes I tried that, but it still can't locate the images. All other fields are uploaded successfully.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: PRODUCTS Can't upload image via CSV

Post by paulbaker »

delve2013 wrote:it still can't locate the images.
What exactly happens then? Do you get broken images when you view the products in front end? If so post the HTML of the IMG tag created. Or do you get no IMG tag at all? Or do you get an error in the admin back end? If so what was it?
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

Hi Paul,

After importing the CSV and product list into the products manager all the fields are imported but no images are imported. When viewing the front end code using firebug there's no value for where the image should be.

I've had a look at the images that are already visible which I uploaded through the products manager module and they all have the following path:

Code: Select all

<img src="http://www.mydomain.co.uk/uploads/Products/product_315/Intricate-Creations-Laser-Cut-Save-The-Date-Enchanted-Garden-3.jpg">
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: PRODUCTS Can't upload image via CSV

Post by paulbaker »

I've just looked at an instance of Products on one of my sites and there are individual folders created for each Product's images. The example you posted has product_315 as part of the path which means it is the 315th product in the database.

I was hoping all the images would be in the same directory.

I'm out of ideas at the moment. :'( Hopefully someone else will chime in.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: PRODUCTS Can't upload image via CSV

Post by Jo Morg »

I'm inferring, from the bits of info I could gather from your posts, that one of the following may have happened:
  1. you uploaded all files to the same folder which apparantly is not the correct way of doing it. By the sample you have given:
    uploads/Products/product_n where n is probably the id of the product;
  2. you uploaded correctly but CVS file doesn't affect the product id of the database so products are given new unique db ids on import;
  3. some other error occurred and you're not giving enough details for us to be able to try to understand what it might have been;
Either way, I think that point a or b may be valid and you need to check if the folder structure and names correspond to the original ones.
Then if it is b you may have to alter the DB tables or change folder names manually.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

Here's the problem, you are meant to put images inside any folder relative to the 'uploads' folder and the products manager module will locate those images by their file name which is mentioned in the CSV file, it should them upload them to their corresponding ID which is generate upon the upload.

If you upload images from the admin area, the module creates the separate folders for you within the Products folder.

I think you're right and it's definitely point b)
you uploaded correctly but CVS file doesn't affect the product id of the database so products are given new unique db ids on import;
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

I've found a related post where the guy had the same problem but fixed it, but he doesn't provide any detailed info on how it was fixed:

http://forum.cmsmadesimple.org/viewtopi ... 14#p305114

??? ??? ??? ???
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: PRODUCTS Can't upload image via CSV

Post by delve2013 »

UPDATE

I got the bloody thing working. The issue was the path to the images folder. It's a trial and error situation and I spent hours on it and finally found the correct path that the module will accept and it's /images/

That's all I needed to do!

All working now, thanks for the help guys.

;D :D
janvl
Power Poster
Power Poster
Posts: 985
Joined: Wed Aug 13, 2008 10:57 am

Re: [SOLVED] PRODUCTS Can't upload image via CSV

Post by janvl »

Hi

could you tell me if in the listing of the products in admin the filter is working (sort on weght or price) and if so could you list your modules-versions for me please?

Thanks,
Jan
delve2013
Forum Members
Forum Members
Posts: 91
Joined: Thu Jan 31, 2013 4:23 pm

Re: [SOLVED] PRODUCTS Can't upload image via CSV

Post by delve2013 »

Hi, I'm not using weight, but I am using price and my own filter for colour which both work fine.



----------------------------------------------

Cms Version: 1.11.7

Installed Modules:

CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
Gallery: 1.6.1
CGSimpleSmarty: 1.7
CGExtensions: 1.37.2
JQueryTools: 1.2.5
Products: 2.19.6
Cataloger: 0.11.3
CGBlog: 1.10.2
CMSFoundation: 1.5.1
CGSmartImage: 1.12
ListIt2: 1.4
ListIt2Testimonials: 1.4
ListIt2BlackBook: 1.4
ListIt2showsandevents: 1.4
FormBuilder: 0.7.4
ListIt2suppliers: 1.4
ListIt2WeddingGalleryLanding: 1.4
TinyMCE: 2.9.12


Config Information:

php_memory_limit: 64M
process_whole_template:
max_upload_size: 40000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.4.21
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 64M
max_execution_time: 50000
output_buffering: 0
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 40M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.71
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


----------------------------------------------
Locked

Return to “Modules/Add-Ons”