Okay fantastic!!! looks like I solved it by defining products_image before the while statement for the first item, and by moving the second definition before the require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE))
I definitely didnt expect to be able to do that.
Which is plenty good for me now. I guess this means I will put this code in New_products, Featured_products, products_all and everything where my small images are used?
Please let me know if there is a better way to affect all of these templates. Thanks!
So the end it looks like this:Now i need to have these preloaded, however the hell you do that.PHP Code:if ($num_products_count > 0) {
if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == 0 ) {
$col_width = floor(100/$num_products_count);
} else {
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
}
$products_image = $new_products->fields['products_image'];
while (!$new_products->EOF) {
$products_image = $new_products->fields['products_image'];
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE));
$products_price = zen_get_products_display_price($new_products->fields['products_id']);
$new_products->fields['products_name'] = zen_get_products_name($new_products->fields['products_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT, 'style="position:relative" onmouseover="showtrail(\'' . $products_image_medium . '\',\'' . $new_products->fields['products_name'] . '\',250,130,350,373,this,0,0,250,130);" onmouseout="hidetrail();"') . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);



