Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change "Add to Cart" Image if Price $0


DataMouse

Recommended Posts

Hi all

 

I hope everyone's well!

 

I'm customising a store and have hit a snag.

 

There are some products that I don't want to show a price for. Instead I would like to show a message saying "call us for pricing".

I have this done already by changnig my currencies.php file (includes/classes):

 

function display_price($products_price, $products_tax, $quantity = 1) {

if ($products_price > 0.01){ //for change price by 'contact'

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}else{

return 'Contact us for pricing';

}

}

 

That changes the text and is perfect when used in new products etc.

 

However, in product_info.php and other places, the "add to cart" button is an image, which I need to replace - both with a new image and a new link location.

 

Can anyone help, please?

 

Thanks all

 

 

DM

Link to comment
Share on other sites

Thanks!

That's part way there.

Rather than a text <a href"#"> link, I would like it to show an image.

How is this done?

Link to comment
Share on other sites

I got it.

 

// LINE ADDED: MOD - EASY CALL FOR PRICE v1.4

define('TEXT_CALL_FOR_PRICE', '<a href="contact_us.php">' . tep_image_button('button_contact_pricing.gif', IMAGE_BUTTON_CONTACT) . '</a>');

?>

 

In Includes/languages/english.php

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...