Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Hide £0.00 prices


  • You cannot reply to this topic
No replies to this topic

#1 crazyperoformance

  • Community Member
  • 22 posts
  • Real Name:jules

Posted 31 January 2003, 17:52

Hi I have a problem with my cart. Where if I have a product with multiple attributes I want to set the base price to £0.00 and add all the prices as attributes. But I want the £0.00 not to show on the site. I used to use this line of code supplied by linda from another post.

function display_price($products_price, $products_tax, $quantity = 1) {
if ($products_price==0) {
return '';
} else {
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}
}
}

But I have now installed quantity controller and that line no longer exits and now shows this.

// BOF: WebMakers.com Added: Change display of prices based on Maintenance, Login, etc.
function display_price($products_price, $products_tax, $quantity = 1) {
switch (true) {
case (DOWN_FOR_MAINTENANCE_NO_PRICES=='1'):
if ( (DOWN_FOR_MAINTENANCE_NO_PRICES_DISPLAY) ) {
$show_what_price= DOWN_FOR_MAINTENANCE_NO_PRICES_DISPLAY;
} else {
$show_what_price='';
}
break;
break;

case (NO_LOGIN_NO_PRICES=='1' and !tep_session_is_registered('customer_id')):
if ( (NO_LOGIN_NO_PRICES_DISPLAY) ) {
$show_what_price= NO_LOGIN_NO_PRICES_DISPLAY;
} else {
$show_what_price='';
}
break;

default:
$show_what_price=$this->format(tep_add_tax($products_price, $products_tax) * $quantity);
break;
}

return $show_what_price;
}
// BOF: WebMakers.com Added: Change display of prices based on Maintenance, Login, etc.
}

I don't know what changes to make to change this back to how it was without messing up quantity controller any suggestions anyone please ?