Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Replace 0.00 price with an Icon?


Recommended Posts

Hi there,


I want to replace where ever there is price witch equals 0.00€ with a telephone icon ( in order to call for price). I have STS 3.0 (beta something) and I don't understant what file to edit and when to put the if statement.


Please if anybody could help it would be great. I found a contrib about this but its not for STS websites...

Link to comment
Share on other sites

Try this ..






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



Replace with ..


// #### Replaced to add an image when price = 0
//	function display_price($products_price, $products_tax, $quantity = 1) {
//	  return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
//	}
//#### End Replaced
function display_price($products_price, $products_tax, $quantity = 1) {
  if ($products_price == '0') return tep_image(DIR_WS_IMAGES . 'MYFREEIMAGE.jpg', 'myfreeimagetext', '100px', '30px');
  else return $this->format($this->calculate_price($products_price, $products_tax, $quantity));


Obviously you add your own values to ..


tep_image(DIR_WS_IMAGES . 'MYFREEIMAGE.jpg', 'myfreeimagetext', '100px', '30px')

Link to comment
Share on other sites

  • 2 weeks later...


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

  • Create New...