I cheated... Exported products and categories with apsona and matched filenames from products to category images. Actually only took about 3 minutes... Anyone need better explanation let me know. Wanted more of the random thing going on...
ooh. aponsa. had never heard of that one before. love it. thanks.
did anyone get the random image code bit to work? i copy and pasted it as is, but no go... i would love a randomizer for category images.
:) emily
http://store.inspiritcommon.com/
ZC 1.3.8a on Godaddy :: EP 1.2.5.4 :: Adv Search 1.1 and a buncha other stuff
i've implemented this and it's working now that i got a pesky template issue ironed out. and i've got two questions/wishes:
is there a way to have it not to display images from products where there are no images? i'm seeing a lot of the 'photo not available' image as my category photos. really, there aren't a ton of unavailable images either...
is there a way to restrict the width of the image displayed? in one of my sections one random image is wide, the other are tall... the wide one runs off the edge into the right sideboxes (see attached) and i don't know if i can control that, short of re-saving that image as a portrait orientation...
:) emily
http://store.inspiritcommon.com/
ZC 1.3.8a on Godaddy :: EP 1.2.5.4 :: Adv Search 1.1 and a buncha other stuff
I should of pointed out this code this code wont work for categories which contain subcategories as obviously in zen cart you cant have both products and categories on the same level, and therefore the query wont find any images. But You can still add those in manually....
Also when playing around with code I never intended to have catetory images on product info - if you did you would probably need to place the code there also.....
If you play around with the sql you could reduce the chances of it picking up an empty image......"AND products_image IS NOT NULL" ( I only have .jpg in these because I concatenated this string to the image names in excell and if it was empty would have left that)
Last edited by WebMC; 5 Oct 2010 at 11:02 PM.
That's weird - that usually happens when you have a really thin picture, I think thats going to happen even if you added it manually - you just need to edit the image and make sure it is taller - Ideally square by modifying the canvas size.
I would recommend installing image handler if you havent already (don't quote me on that as I can't verify how well it works throughout the versions but it works well for me...)
failing that you could add max-width in your css somewhere - but that usually gives you unproporitonal results....
(use firebug and check the class if you don't know it)
Wow. Yes, that's wide:)
Do you have custom settings for these in Configuration > Images?
Small Image Width
Small Image Height
Calculate Image Size
Image - Product Listing Width
Image - Product Listing Height
Image - Product New Listing Width
Image - Product New Listing Height
Image - New Products Width
Image - New Products Height
Image - Featured Products Width
Image - Featured Products Height
Image - Product All Listing Width
Image - Product All Listing Height
As long as you use "proportional images" setting, the images should be shrunk if necessary to fit the dimensions.
Last edited by gjh42; 6 Oct 2010 at 12:17 AM.
i definitely have some custom image sizes in there... i adjusted them when i didn't really know what i was doing, so maybe that's what (some of*) the issue is:
Small Image Width 222
Small Image Height 222
Calculate Image Size true
Image - Product Listing Width 144
Image - Product Listing Height 222
Image - Product New Listing Width 100
Image - Product New Listing Height 80
Image - New Products Width 100
Image - New Products Height 80
Image - Featured Products Width 100
Image - Featured Products Height 80
Image - Product All Listing Width 100
Image - Product All Listing Height 80
my product categories are pretty deep. big bummer that it doesn't display images of upper categories.
:) emily
http://store.inspiritcommon.com/
ZC 1.3.8a on Godaddy :: EP 1.2.5.4 :: Adv Search 1.1 and a buncha other stuff
yeah, it makes sense, no products, no images registered.... thanks. i'm no php guru. i know only enough to really mess stuff up and not be able to figure out the issue for months!
:) emily
http://store.inspiritcommon.com/
ZC 1.3.8a on Godaddy :: EP 1.2.5.4 :: Adv Search 1.1 and a buncha other stuff
Bookmarks