Jump to content

[Resolved] upload multiple images through admin


cutecube

Recommended Posts

In admin, Images, you can send up to four images. Just keep drag-n-dropping image files onto the Browse... button. They will get listed with a small 'x' to their left so that you remove a file from the Upload list.

There is a javascript edit that will allow more, but then you run the risk of hitting both web server limits and PHP limits regarding byte count.

There is a danger with CC608 and earlier -- yes, you can FTP all the images you want. Then, in admin, Images, you can click on the "Update File List" tab and CubeCart will rescan the /images/source/ folder and all subfolders, and rebuild the entire image catalogue. BUT!!!

In so doing, the Filemanager database table gets all new 'file_id' values. These 'file_id' values are not the same as those already logged in the Inventory and Image Index tables. So, what happens is that the existing Images assigned to Products will become disconnected and you will need to start all over again.

Hopefully, this unfortunate result will be fixed soon.

Link to comment
Share on other sites

Thanks, bsmither. I didn't know about the drag-n-drop feature. Still looks like just one file at a time though. Ideally, it should allow you to select all the files to upload and have the code upload one at a time.

Not that I have time right now, but if I write code to do things like this, how do I submit it for review to be included in future versions?

Link to comment
Share on other sites

Not that I have time right now, but if I write code to do things like this, how do I submit it for review to be included in future versions?

CubeCart is held within a github repository and you can get to this by clicking on the "Report an Issue" link of the homepage of this forum.  Once you have an account you can log bugs and enhancement requests (it is better to explore and verify issues through these forums first and only create an issue if 100% verified so that area doesn't get filled up with spurious and invalid requests) and can submit code for solutions to these and other issues if you want

Ian

Link to comment
Share on other sites

So, let me see if I understand this. I CAN upload multiple images in the admin/file manager, and if I don't click "Update File List", everything will work properly? i.e. After uploading bulk images, I can go to the 'image' section of the product and select which images I want for that product?

If that's correct, the "Update File List" sounds dangerous! What would that be used for normally?

Link to comment
Share on other sites

You would use and must use "Update File List" ONLY after FTP'ing the hundreds of images to the site.

Only after FTP'ing the hundreds of images, the only current mechanism for CubeCart to enumerate them and get them logged in the database is the "Update File List".

So, in conclusion, there is no current way to FTP images AND have CubeCart know about them -- other than the "Update File List". Therefore, the only appropriate time to use the "Update File List" is before you have assigned any (or very few) images to products.

Note: FTP is not the same as using the "Upload" tab in the FileManager. Using the "Upload" tab in the FileManager will get the images logged into the database.

Link to comment
Share on other sites

I ran into this same issue so I wrote a script to import already uploaded files (i.e. FTPed to your site) into the CubeCart database. It's smart enough not to generate new file_ids for already existing files, and can even auto-associate files with products if the filenames match a product code.

It has a Dry Run mode that I suggest you run first to see what will change; only hit Submit after reviewing the results and making sure they are what you expect.

Hope you find it useful ;)

EDIT: I should mention that I have only been using the script locally so far, so let me know how it works on a live site if you give it a go. Cheers.

Edited by bsandall
Clarification
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...