why not just wrap the product listing image with a div
$lc_text = '<div id="listingPImage">' . '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>' . '</div>';
then right below id add an if statement so it knows to place the sold out overlay image over product image if the products quantity is 0 like this:
if ($listing->fields['products_quantity'] == 0) {
$lc_text .= zen_image(DIR_WS_IMAGES . 'button_sold_out_sm.gif', 'Sold Out', '51','18', 'class="soldOutOverlay"');
}
using the default sold out image as an example - simply replace with your overlay image and upload to YOUR_TEMPLATES button file
then add this to your stylesheet
.listingPImage {
position:absolute;
}
.soldOutOverlay {
position:relative;
top:-80px;
}
again top:-80px moves the overlay image over the product image (set the -XXpx to the height of product image) or change as needed