Looking for a collaborator that is familiar with AJAX and Zen Cart;s image naming and matching structure:
The idea is to allow shop owner to upload main image to directory and image name to database and all additional, _MED and _LRG images to directory only, maintaining Zen Cart stock image structure. Also allows shop owner to delete those images from directory all via the admin product info page.
This is what I currently have:
1.) Replaced stock image upload table with AJAX upload for Products Main Image:
1.1) Select images from computer or drag and drop
1.1) inserts image to images directory
1.2) adds image directory/image name to database
2.) Replaced stock image upload table with AJAX upload for Products Additional, _MED and _LRG Images:
2.1) Select multiple images from computer or drag and drop multiple images
2.1) inserts image to images directory
Attachment 13551
Attachment 13552
Now this is done without any page reloads: when returning to edit product, a preview of the main image and additional, _MED and _LRG images appear.
1.) Included a jQuery "Delete" button which removes image from image directory
Attachment 13553
Here is where I am having a little trouble:
All image files get uploaded to correct directories.
Only images in the images/ directory will appear in admin.
But for the life of me can not get images uploaded in sub directories to return in admin.
Anyone interested in taking a look?
Bookmarks