Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide price if $0 problem


Micke

Recommended Posts

Hi there!

 

I'm trying to implement the "Hide price if $0".

For some reason it hides all prices... No not only those at 0.

I also have the SPPC contrib installed. Is there a conflict here?

 

I'ts my experience that when these things happen, I have often overseen some little detail...

Thanks in advance,

// Micke

Link to comment
Share on other sites

Did you check the Hide Price if $0 for SPPC yet?

 

 

I have had a look at it but I'm not sure that I'm ready to make the change to "Quantity price breaks". It's such a lot of work and I'm scared I'll mess things up real bad...

Maybe I'lll take the chance and do it if there is no other way to get the "Hide price if $0" feature working.

Do you think it's worht the chance?

Link to comment
Share on other sites

I have had a look at it but I'm not sure that I'm ready to make the change to "Quantity price breaks". It's such a lot of work and I'm scared I'll mess things up real bad...

Maybe I'lll take the chance and do it if there is no other way to get the "Hide price if $0" feature working.

Do you think it's worht the chance?

You are right, this is for the QPBPB version. I know for a fact that Jeep-ice is almost ready with the version for SPPC alone, so I suggest to wait a little bit longer before going ahead.
Link to comment
Share on other sites

You are right, this is for the QPBPB version. I know for a fact that Jeep-ice is almost ready with the version for SPPC alone, so I suggest to wait a little bit longer before going ahead.

 

Thanks!

(Waiting is always the hardest part in development, but it's not that complicated....)

Link to comment
Share on other sites

You can hide zero dollar values quite simply in osCommerce - in /includes/classes/currencies.php - down the bottom of the file find:

 

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

 

and chage it to:

 

	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);
   }
}

 

*Note: there is another closing curly bracket after this that should remain.

 

Matti

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...