Anyone know how I can use a products medium image in the featured sidebox, rather than the default small? I have Image Handler 2 installed.....?
Cheers
Lee
Anyone know how I can use a products medium image in the featured sidebox, rather than the default small? I have Image Handler 2 installed.....?
Cheers
Lee
ok, can anyone explain this function then, please...!
zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
I understand that it builds <img> tag src, name, alt, width, hight but how does DIR_WS_IMAGES work..?
I try adding
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE));
and using
zen_image($products_image_medium, addslashes($products_name), FEATURED_PRODUCTS_WIDTH, FEATURED_PRODUCTS_HEIGHT)
but understand that this will only work on the actual product page when product id id defined.
Any ideas, I just need a push in the write direction...??![]()
Any ideas on the above, just coming to the end of a 4 month build and if I can't resolve this it's time for a re-think / re-design..?
Cheers
Lee
Had one last try and it was easy!
This might not be the right way to do it but I rebuilt the image link by using the small image name and stripping out the extension and adding _med etc.
$image_path = $random_featured_product->fields['products_image'];
$image_path = substr($image_path, 0 , -4);
$med_path = "_MED.jpg";
Using the origanal link
$content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">';
Adding the medium image
$content .= '<img src="images/medium/' . $image_path . $med_path . '" alt="' . $random_featured_product->fields["products_name"] . '"' . '"/>';
Closing the image link
$content .= '</a>';
Cheers
Lee