http://www.amazon.com/gp/product/B000FLT8TI/ref=amb_link_1835102_3/102-7...

Sorry for the long link, but I want to illustrate what I am looking for in the way of product pictures. It seems to me that the ability to have multiple pictures of a product would be a basic feature of e-commerce. Unfortunately, I haven't found any way to do this with Drupal.

Now, before anyone gets upset, I realize that Drupal's e-commerce is still young, so that's why I'm coming here to ask advice on direction.

Since I'm a hands-on type of person anyway, I decided to see what I could do/hack/mutilate on my own first.

I began with killes' upload-image module (awesome job, btw). It works by creating an image node for any picture file attached to a node via the upload module. Since the uploaded pictures become nodes themselves, this means that a thumbnail and preview size is automatically generated as well.

I created my own module using much of the upload-image basic functionality, but implemented differently.

What I achieved was a "product gallery" area for each product, with javascript "onclick" calls (which I guess could be rollovers, too) to show a preview picture from the thumbnail picture in the style of the aforementioned Amazon.com website. The large, original sized pic will also be incorporated into a popup box, I just haven't done it yet. I know that this is simple compared to what the original author has already done, but I'm learning. ;o)

A nice side effect is that this does not have to be limited to products. It could be used in a story node, for example.

All of that is to ask this: Have I missed the boat? Is there an easier way to do this, or should I continue working on it, and possibly submit it as a contributed module?

Thanks for your time!

-Corey

Comments

Ludwig’s picture

I've heard my partner Tracey mutter her need for just such a capability. I can't answer any of your questions other than that it seems a good idea to me. Why not directly ask the ecommerce people what they think. Gordon Heydon - the lead developer (?) of ecommerce is a hero and - like many module developers in Drupal - is open minded and helpful.

ontwerpwerk’s picture

I used a similar approach in this real estate site (click foto's after the page has loaded) but without ecommerce modules
Here I used a modded lightbox.module (with lightbox2 script) and the upload_image.module on a cck node

It works pretty good, only deleting attached images/image nodes is a bit buggy (but so are my modifications to the code)

--
modules used
http://drupal.org/project/lightbox2 (This is a newer version of the lightbox module used in the site)
http://drupal.org/project/upload_image (I modded it a little)
and cck, views, location, gmap etc.
--
I work for Ontwerpwerk

nsyll’s picture

nice and handy site

coreyp_1’s picture

OK. I decided that it was stupid to copy and replace the upload-image module, when all I wanted were cosmetic changes!

I have now done this:

  1. I submitted a patch (http://drupal.org/node/79209) to allow for the theming change needed.
  2. I have written my module to act as a "chameleon" of sorts. For whatever theme is in use, it creates a theme-based override function to implement my changes. The beauty of this approach is that, when I change themes, my modifications will integrate themselves into the new theme silently and seamlessly! OK, it may not be a big deal to you, but I'm excited about it!

What to do:

  1. Make it more CSS friendly. Yes, I hardcoded all the <center></center> tags and such. I was just trying to get it working!
  2. Provide different options for presentation (putting thumbnails on different sides of the preview, allowing for a full-sized javascript popup, etc.)
  3. Maybe release it to the community, if anyone wants it.

Any additional thoughts?

- Corey

coreyp_1’s picture

I posted the afore-mentioned module in this thread. I think I'm making some headway!

- Corey