Guest Posted March 18, 2007 Posted March 18, 2007 hello, I need help in this script disable price CODE function display_price($products_price,$products_tax,$quantity=1){ is(tep_session_is_registered('customer_id')){ return $this->format(tep_add_tax($products_price,$products_tax)*$quantity); }else{ return''; } } } ?> I want it to be changed into this: If product's price is 0(zero) then return ' '. The product which has price more than 0 must remain the same
djmonkey1 Posted March 18, 2007 Posted March 18, 2007 function display_price($products_price,$products_tax,$quantity=1) { if(tep_session_is_registered('customer_id')){ if ($products_price == 0) { //customer is registered but price is 0 return ''; } else { //customer is registered and price != 0 return $this->format(tep_add_tax($products_price,$products_tax)*$quantity); }//end if product_price = 0 }else{ //customer is not registered return ''; }//end if session is registered }//end function display_price Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread.
jimsheri Posted March 18, 2007 Posted March 18, 2007 thx Djmonkey bat there stil is ADD TO CART how can I remove it I read in manuals but there is only: if user is registered show cart. I need IF price is 0 (zero) remove ADD TO CART can you help me plzzzzzzz :D
djmonkey1 Posted March 19, 2007 Posted March 19, 2007 thx Djmonkey bat there stil is ADD TO CARThow can I remove it I read in manuals but there is only: if user is registered show cart. I need IF price is 0 (zero) remove ADD TO CART can you help me plzzzzzzz :D Well, that has nothing to do with the currency class file. You have to edit product_info.php for that. In that file change <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> to <?php if ($product_info['products_price'] > 0) { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } ?> Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.