Hi,
First time posting but searched the site and FAQs and found no love, so here's my question/report.
Problem: The value for $src (first parameter of zen_image) is sometimes expected to be web site-relative and other times filesystem-relative
Precondition: mod_rewrite is enabled and functioning (or some other method is used to append subdirectories to store URL - e.g. http://mysite.com/store/index.php becomes http://mysite.com/store/clothes/men/index.php)
1. call zen_image with a $src value of 'images/medium/myProductImage_MED.jpg'
Expected Result: an IMG tag with the width and height set to the actual width and height of the selected image
Actual Result: an IMG tag with width and height of the default (small) product image
Workaround: I am unaware of a way to work-around this.
I see in zen_image that there are a few calls to file_exists($src) (line 232, for example) but if the $src value provided is web site-relative (as, I assume, it should be) or if the site is using any kind of virtual file structure, such a value will always return false.
In my case I'm pretty sure the code is failing when calling @getimagesize($src) (lines 257 and 277 of includes/functions/html_output.php) and is then defaulting the the small image size. I can't think of any way to work around this and I've been racking my brain for a couple hours on this one issue.
Any suggestions/thoughts would be greatly appreciated (even including suggesting to not use zen_image).
Thanks.
Ted Stresen-Reuter
http://chicagoitsystems.com
Zen-Cart: 1.5.1
PHP 5.3.4
MySQL: 5.1.30
Apache: 2.2something
No add-ons installed
No customizations to core files


Reply With Quote

