'Enable Image Lookup' Code

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
draneb
Captain (CAPT)
Captain (CAPT)
Posts: 314
Joined: Sun Jun 12, 2005 4:07 pm
Location: Texas
Contact:

'Enable Image Lookup' Code

Post by draneb » Wed Jul 01, 2009 7:45 pm

Hello...

Is there anyway we can edit the code so that the Enable Image Lookup feature will look for the product image in
the /Assets/ProductImages folder as well as any sub categories that are under the ProductImages folder?
If that is not possible perhaps something generic like
/Assets/ProductImages/1
/Assets/ProductImages/2
etc...

This way we could keep the ProductImages folder from growing too large and becoming unresponsive in the Admin, which mine has just done :(

Thank you,
Draneb
AC 7.0.3 build 13937

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: 'Enable Image Lookup' Code

Post by mazhar » Thu Jul 02, 2009 8:08 am

Edit Catalog/OrphanedItems.aspx.cs file and try to update

Code: Select all

string[] directories = System.IO.Directory.GetDirectories(imagesFolderPath);
with

Code: Select all

string[] directories = System.IO.Directory.GetDirectories(imagesFolderPath, string.Empty, System.IO.SearchOption.AllDirectories);

User avatar
draneb
Captain (CAPT)
Captain (CAPT)
Posts: 314
Joined: Sun Jun 12, 2005 4:07 pm
Location: Texas
Contact:

Re: 'Enable Image Lookup' Code

Post by draneb » Thu Jul 02, 2009 8:33 am

Hi Mazhar,

Unfortunately that didn't work :(
If you have any other ideas I am more than happy to give them a try.
Getting it to look in all sub directories under Assets/ProductImages would be so great.

Thank you.
AC 7.0.3 build 13937

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: 'Enable Image Lookup' Code

Post by mazhar » Thu Jul 02, 2009 8:50 am

Just looked at the code in details and it seems to me that its been already coded in way to take care of this case. Did you checked by creating some folder ProductImages and then by putting some snaps into that folder.

User avatar
draneb
Captain (CAPT)
Captain (CAPT)
Posts: 314
Joined: Sun Jun 12, 2005 4:07 pm
Location: Texas
Contact:

Re: 'Enable Image Lookup' Code

Post by draneb » Thu Jul 02, 2009 9:17 am

Hi,

Yes, I created a folder under ProductImages called gc
and then I have about 20 product images in that folder - thumbnails and regular size - to test
but nothing is showing up on the site and when going into the admin the image path is blank
but if I move the images to /ProductImages they show up.

It seems like they would have coded it to look into sub folders because at a minimum 2 images per product (thumbnail and regular size) the directory can grow quickly if you have a lot of products. I have about 1,200.

Thank you for your help.
AC 7.0.3 build 13937

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: 'Enable Image Lookup' Code

Post by mazhar » Thu Jul 02, 2009 9:32 am

I logged the issue, you can track progress here
http://bugs.ablecommerce.com/show_bug.cgi?id=8179

User avatar
triplw
Commander (CMDR)
Commander (CMDR)
Posts: 144
Joined: Sat Jan 12, 2008 5:34 pm
Contact:

Re: 'Enable Image Lookup' Code

Post by triplw » Wed Feb 15, 2012 1:56 pm

I'm having trouble with images in a subdirectory not showing up. Has this bug been fixed?

Post Reply