Guest Posted November 28, 2005 Share Posted November 28, 2005 I am using a simple "hack" to avoid displaying a cart for a product that has the quantity set to 0. In almost all files i get it working great except product_listing.php..... From product_listing.php: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $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; } The script idea i can use in other pages except this product_listing: //start no button if quantity 0 <?php if ( $product_info['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 { } ?> //end no button if quantity 0 Anyone an idea how to do it for right now whatever i do with the function i get : a Shoppingcart even when Qunatity=0 for a particular product. OR and that is veryt strange: it displayes the price.... btw: i use TotalB2B contribution but i cannot see how that is connected for the case 'PRODUCT_LIST_BUY_NOW': shouldbe used anyway. Thanks a lot! Quote Link to comment Share on other sites More sharing options...
boxtel Posted November 28, 2005 Share Posted November 28, 2005 I am using a simple "hack" to avoid displaying a cart for a product that has the quantity set to 0.In almost all files i get it working great except product_listing.php..... From product_listing.php: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $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; } The script idea i can use in other pages except this product_listing: //start no button if quantity 0 <?php if ( $product_info['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 { } ?> //end no button if quantity 0 Anyone an idea how to do it for right now whatever i do with the function i get : a Shoppingcart even when Qunatity=0 for a particular product. OR and that is veryt strange: it displayes the price.... btw: i use TotalB2B contribution but i cannot see how that is connected for the case 'PRODUCT_LIST_BUY_NOW': shouldbe used anyway. Thanks a lot! if ( $listing['products_quantity'] > 0 ) { Quote Treasurer MFC Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.