Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with product_listing.php code


Guest

Recommended Posts

I've had to make some tweeks to the SoldOut but listed contribution, and have the following code in my product_listing.php file;

 

//BEGIN SOLDOUT

 

if ($listing['products_quantity']>0) {

$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> ';

}

else{

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=info_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('more_info.gif', IMAGE_BUTTON_MORE_INFO) . '</a> ';

}

//END SOLDOUT

 

Products are all being listed with the button_buy_now.gif, but if a product's quantity is set to zero (or below) it SHOULD be displaying more_info.gif

 

I have lot of products at zero quantity, but they are just displaying with the buy-now button.

 

Cany anyone see what the problem is?

 

Many thanks.

Link to comment
Share on other sites

  • 10 months later...

I've had to make some tweeks to the SoldOut but listed contribution, and have the following code in my product_listing.php file;

 

//BEGIN SOLDOUT

 

if ($listing['products_quantity']>0) {

$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> ';

}

else{

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=info_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('more_info.gif', IMAGE_BUTTON_MORE_INFO) . '</a> ';

}

//END SOLDOUT

 

Products are all being listed with the button_buy_now.gif, but if a product's quantity is set to zero (or below) it SHOULD be displaying more_info.gif

 

I have lot of products at zero quantity, but they are just displaying with the buy-now button.

 

Cany anyone see what the problem is?

 

Many thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...