Auto-recognize additional images

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Auto-recognize additional images

Post by jmestep » Mon May 05, 2008 7:18 am

I've got a client who want to upload his additional product images into a certain folder, then have Able recognize them. I had thought of investigating a couple of ways of doing that and wanted to see if anyone had looked into it yet.
Name the images according to a pattern, like SKU_B1.jpg, SKU_B2.jpg.
Then
1. Try to institute code for Able to look for those automatically in that folder according to the naming pattern and insert that data into the additional image fields in the database.
2. Try to code the additional image display to run down the folder and look for the images, display them.
Any thoughts? I think adding them to the database would help site performance so the data would be there when the page is browsed.

Any thoughts?
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Auto-recognize additional images

Post by nickc » Mon May 05, 2008 1:45 pm

Thoughts:
- Add a user group or role for "Image Editor" and assign it to your client
- Build (or integrate the existing) file upload control directly into the store product detail page
- Toggle visiblility of the control based on Token.Instance.User.IsInGroup(intGroupId) - maybe a button that reveals a panel?

That way, your client just visits the product page for the product they wish to update, clicks the "Add Image" button and uploads. Looks like the existing page (Admin/Products/Assets/UploadAdditionalImage.aspx?ProductId=x) would be relatively easy to co-opt/convert to ascx and has the added advantage in that file naming convention won't matter - the image is bound to the item via the called product id, and is inserted in the database (ac_ProductImages)

-Nick

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Auto-recognize additional images

Post by jmestep » Mon May 05, 2008 4:34 pm

Thanks for this info. I think some of the things would be good if we put them on the main edit product page, but everyone probably has different preferences.
In this case, the client doesn't want to do anything but upload the image via ftp- he doesn't want to go to the product page, even if the additional image control didn't require another click to get to it.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Auto-recognize additional images

Post by nickc » Tue May 06, 2008 11:09 am

Hmm.
If you bypass the site to load images, you'll have to resort to some "after the fact" processing, capturing/reviewing feedback etc., in addition to losing easy access to CommerceBuilder methods.

Why not have the client save all images in a zip file, inside folders named as ProductId values? They could then upload that zip file directly to the site and bypass ftp completely, allowing you to recursively process those images with easy access to ProductId, and Product, ProductImage, FileHelper classes. The provided image filenames wouldn't even matter - you could easily build new names based using Sku_(select count(ProductId)+1 from ac_ProductImages)...

-Nick

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Auto-recognize additional images

Post by jmestep » Tue May 06, 2008 12:37 pm

Nick, I will look into that. Thanks for the suggestions.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply