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.
Latest News: (loading..)
problem with product_listing.php code
Started by tractormad, Jan 12 2009, 14:07
2 replies to this topic
#1
Posted 12 January 2009, 14:07
#2
Posted 18 November 2009, 20:50
tractormad, on 12 January 2009, 14:07, said:
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.
//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.
#3
Posted 18 November 2009, 20:52
Hello,
I have the same problem.
Did you ever find a solution?
If so, your help would be greatly appreciated.
Regards,
DP
I have the same problem.
Did you ever find a solution?
If so, your help would be greatly appreciated.
Regards,
DP














