Words about stuff, and things related to stuff

Cartweaver Mod: multiple product images, auto photo resizing, mouseover js display

A very nice CartWeaver user contacted me for some help with her product images - basically, she wanted to add more images per product (easier than ever in CW3) and, most importantly, she wanted a way to let her clients upload a single image, and have the thumbnails and other sizes made automatically.

I set up a demo version of the add-on, saving a copy of the modified CW code so I can use it again for my own clients. ( That link shows a default product page with a very basic multiple image javascript display... in theory, the finished product would be much nicer. A demo of the admin is here ( use admin/admin to log in)

I added an automatic uploader / image resizer, and set up her images table in the CartWeaver database to handle 5 images for each product, with 4 sizes for tiny preview, details thumbnail, large image, and zoom.

In the CartWeaver admin, she simply uploads a single image file for each photo slot, and the thumbnails are made on the server (instead of a separate upload slot for each image size). Otherwise, it works and looks exactly like the regular CartWeaver admin.

On the display side, the single results page composes the mouseover image swap display for 1 to 5 mages, whatever is available.

The way this code works, any number of images and any number of sizes for each can be used - and any type of gallery, lightbox, list or display of the images can be populated from the image query.

Updated spring 2008: Now using CFimage for super fast, high quality resizing on the fly with more accurate height/width scaling.

The resizer works with both tall and wide images, with a maximum width and height set in the database for each size of image.

Each image upload slot can have its own set of sizes and max w/h dimensions, so the possibilities are almost endless.

The CW site I was working on was on a CF7 server, so instead of using the onboard CFimage functions in CF8, I went with Massimo Foti's tmt_img.cfc  - so in theory it should work on any server, running any recent version of ColdFusion.

Contact me directly to log in and test the admin on that demo site, or if you are interested in using this code on your own CartWeaver (or other) sites.

Cartweaver featured customer

What an honor from the Cartweaver crew!
I've been involved with CW for a few years now, first as a 'total noob', then as an enthusiastic user for multiple sites, and most recently as part of the beta team for version 3, as well as producing some fun custom add-ons for the admin and trying to be helpful whenever possible in the support groups.
Now they've more than reciprocated by giving me my own page on the Cartweaver site.

If you are looking for a great, customizable, affordable and well-supported eCommerce solution, check out Cartweaver - asp, php and of course ColdFusion versions are available.

...Show Newer

Recent Comments

Add content to a category in Mura content bean, and how to see other methods
Tony said: Thanks Simon, I'm new to MURA and that saved me a lot of time. Don't know if this will help anyone b... [More]

Download CFQuery results as Excel with CFspreadsheet
Seth said: You can use CFCONTENT to set the MIME type and avoid the warning message. You also don't need to wri... [More]

Add index.cfm as default doucment in .htaccess
Michael Evangelista said: Hi Alex, you can use the web.config or the .htaccess file. But in Mura, as far as I know you would a... [More]

Add index.cfm as default doucment in .htaccess
WebmasterAlex said: Mike, Long time no see.... :) Is there any other way to set default doc in Mura? [More]

Feed Unavailable