Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Showing items with quantity = 0 backordered


johnsatt

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...