Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

problem with product_listing.php code


2 replies to this topic

#1 tractormad

  • Community Member
  • 296 posts
  • Real Name:David Hamer

Posted 12 January 2009, 14:07

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>&nbsp;';
}
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>&nbsp;';
}
//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.

#2 dreamlab

  • Community Member
  • 58 posts
  • Real Name:Dick Prentiss

Posted 18 November 2009, 20:50

View Posttractormad, 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>&nbsp;';
}
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>&nbsp;';
}
//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 dreamlab

  • Community Member
  • 58 posts
  • Real Name:Dick Prentiss

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