Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide ?0.00 prices


Guest

Recommended Posts

Posted

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 ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...