Hey everyone, haven't posted in a bit! I've been to busy, but a recent injury freed up some time in my life. Horrible way to come onto free time, but it goes that way sometimes!
Anyways here's the backstory:
I notice at a lot of the open entry sports events I attend (sporting events where anyone can enter), photographers take a ton of pictures and sell them back to the participants. My girlfriend likes photography, and it seemed like a good way to help her earn some extra money while attending college. So, I offered to help her get setup online. The only pre-made places I found take huge commissions, and most just take everything and leave you nothing! No way was I going to stand for that, especially since I work in Drupal, only the awesomest open source CMS ever!
The problem:
Amongst Drupal's many shortcomings appears to be massive image importation. Now, you can use image Fupload, which is buggy and long unsupported and loses track of it's own steps. There is also the stock image import... which kind of works... except I can't use image cache nor CCK or anything fun, it's all handled separately. This all also doesn't really tie into selling the images either, and ESPECIALLY doesn't tie in to organizing them one bit either!
What I'd like to be able to do:
1- Set two parameters in advance for image importing, such as Taxonomy term (Event Name) and base price to use for the uploaded images ($2 an image)
2- Select an FTP Directory which has all the images in it already for import.
3- Click go, and have it process through all the images, pulling them into the ubercart "product" content type with all of the correct information.
4- Users can then purchase the full size original image for just $2
Anyone got any ideas or ways to make this work? Right now what I've been playing with gets me a portion of the way there and then just sort of falls apart. It also doesn't fall into the realm of user friendly by any shade of the imagination.
Thanks in advance,
Jesse Nicola

Comments
One option: plupload
If this is D6, then check out http://drupal.org/project/plupload. With it, you upload from your browser, not via an FTP location. It doesn't let you configure defaults for additional fields on the node type, but maybe you can configure those defaults directly on the node type first, and it will work? I'm not sure, but give it a shot.
For D7, you might want to check out http://drupal.org/sandbox/vingborg/1138512.
Feeds will do most of this...
Out of the box, Feeds will
There's also a module for basic ubercart integration with feeds - http://drupal.org/project/uc_feeds. The documentation says you can map to price and weight...sounds like this might work for your needs...so the process will look something like this:
Good luck...
Thanks Darren, only issue I
Thanks Darren, only issue I see is this requires a CSV document of all the files...
Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio
Here's my usual approach
Probably a bunch of ways to do this without coding... It's easy to get a CSV of your files using a couple of steps. CSV files are actually very simple if you look inside them with a text editor, so no worries.
For example, you could just get a list of them using the command line and direct the output to a file. For example, in Windows, "dir /b > images.csv" will write out a list of files. If working on a Mac or Linux, use "ls -1 > images.csv" to list each file on it's own line. You could open the contents of this list in your spreadsheet editor and manipulate as needed. Using variations on this, you can output the full folder location also or use your spreadsheet editor to add a column of your own design.
What I end up doing is adding a column with the server accessible location, i.e "http://.../" in front of the filename and. I copy the contents of the spreadsheet into a text document and search and replace the tabs between the location and the filename, removing them. Then I save the file as a CSV (or whatever) and all done.
It's not that I'm incapable
It's not that I'm incapable of creating a CSS file, it's that this I'm trying to find a generic and easy to use method I can hand off to clients. Nothing about what you've said is easy for a client, 99% of which haven't ever seen a command line interface.
I suppose I could write some PHP code to dump out a CSV file of a directory, and fork it over to feeds... but I'm going for something user friendly here...
I'm now trying plupload with node gallery, which appears to be a pretty good solution. More on this to come...
Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio
@jnicola: Did you manage to
@jnicola: Did you manage to complete the solution to this issue? I'm looking for a similar solution.
Not really unfortunately
Not really unfortunately :(
The real hangup I encountered was that all the imagecache images were to be generated only once an image was viewed... which makes sense from one side of the performance perspective (why generate something that may not be seen?) but on the other hand, when a user wants to visit a page with 20 images being processed down from a large size, it bogs down the server.
So, the current solution would require an ungodly robust server. This lead me to think about distributed computing, where I setup a local environment on my PC (with gobs of horsepower), run all the imagecache stuff there, and then I swap my local environment out with the remote environment. Essentially my PC does the heavy lifting, and the hosting does the delivery.
I never got past that though... and who knows what has developed since :(
Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio
Thanks for the quick reply
Thanks for the quick reply and the explanation of your possible solutions. If I find a better solution I will post back here.
Batch?
Is this something the batch API might be able to help with? http://drupal.org/node/180528
If the batch api could be
If the batch api could be used to run through all the image cache variations of all the images, yes it would work.
Currently imagecache doesn't render an image until a request for the image is made. So, when a user goes to a views page of 30 images, and all 30 have to be generated at once, and if the high quality originals are 8mb each, that's 240mb of images to process through... and needless to say it all stalls out and winds up causing rendering issues for the customer.
So yeah, batch api might be the way to fix this... but I'm not familiar enough with the batch API to resolve this issue.
Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio