OK. Kind of a one man conversation here so far but that's ok.
Here is a very very rough solution. I eliminated a bunch of code that I was unable to read well but it works.
PLEASE BACK UP YOUR product_listing.php file before beginning.
Basically, this shows a link to the page and an in stock button if the product quantity is greater than 0 and it shows a link to the page and an out of stock text if the product quantity is equal to 0.
As I said before, I erased a lot of code for the other conditions in order to get this to work. Use at your own risk.
Code:
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']);
$lc_align = 'right';
$lc_text = $lc_price;
// in stock or not
$lc_button = '';
if ($listing->fields['products_quantity'] > '0') {
$lc_button = '<br /><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '"><img src="LINK TO VIEW PRODUCT BUTTON"></a><br /><img src="LINK TO SOME KIND OF IN STOCK BUTTON">';
} else {
if ( ($listing->fields['products_quantity'] == '0' ) ) {
$lc_button = '<br /><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '"><img src="LINK TO SOME KIND OF VIEW PRODUCT BUTTON></a><br />Temporarily Out of Stock';
}
}
$the_button = $lc_button;
$products_link = '<br /><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '"><img src="LINK TO SOME KIND OF VIEW PRODUCT BUTTON"></a>';
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? 'FREE SHIPPING!' : '') : '');
break;
That's all.
As you can tell, I am a novice but this gets done what I want. Hope I explained this correctly.
Bookmarks