While trying to figure out how to set an attribute image size, I inadvertently created some code that did exactly what I wanted.
Here is my setup:
-Image Handler 3 Installed
-Product Attribute Grid w/vertical single attributes & RoboPhung fix
I was working on includes/modules/template_name/attributes.php attempting to get the attributes to resize to specified dimensions.
At the line where attribute images are called for the grid layout,
I changed this line:
PHP Code:
$attrib_grid .= zen_image(DIR_WS_IMAGES . $grid_records['V']['options'][$grv]['image']);
to:
PHP Code:
$attrib_grid .= zen_image(DIR_WS_IMAGES . $grid_records['V']['options'][$grv]['image'], $grid_records['H']['options'][$grh]['name'], '50', '50');
While this did solve my problem, I don't know why or how.
At first I was playing with the zen_image parameters, adding '50', '50' to see if the dimensions would pass through the function as parameters.
But then I found that the first '50' was being echoed as the img's 'title' value. So I took the code $grid_records['H']['options'][$grh]['name'] and put it in that zen_image location in an attempt to replace the title tag with the attribute's value name. Low and behold something completely different occured, and I believe image handler 3 created a resize of the attribute because it is proportional and has the bmz prefix.
... 
Anyone know what happened here?
Bookmarks