johnsatt Posted March 5, 2004 Posted March 5, 2004 I'm trying to show products that have a quanity of 0 display a backordered image in products_listing.php. here is the code that I'm trying to use in products_listing.php around line 131: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; if ($listing['products_quantity'] == 0) { $lc_text = tep_image_button('button_backordered.gif', IMAGE_BUTTON_BACKORDERED); } else { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; } break; How do I define ($listing['products_quantity'] == 0)? Any help on this would be quite welcome. Thanks.
johnsatt Posted March 5, 2004 Author Posted March 5, 2004 Do I have to perform another sql query then define this or is it defined in index.php? I'm not sure how to get the quantity for the product being displayed.
johnsatt Posted March 5, 2004 Author Posted March 5, 2004 I still can't get this to work. When used at shown above, some show backordered and some instock. Except it's not doing it based on stock levels. hmmmm.
johnsatt Posted March 5, 2004 Author Posted March 5, 2004 I got it to work! You have to add p.products_quantity in the sql queries in index.php starting around line 190 enter it in all 4 queries.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.