Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What am I missing in this Code (Easy Call for Price)


rocketpromo

Recommended Posts

Thanks in advance Board:

 

Here are the instructions:

 

FIND:

 

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

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

 

REPLACE WITH:

 

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

// BOF: MOD - EASY CALL FOR PRICE v1.4

// return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

define ('CALL_FOR_PRICE_VALUE', 0);

// If you sell products for $0.00 and want to display "Call for Price!" for other products, set their price and the CALL_FOR_PRICE_VALUE to -1.

if ($products_price > CALL_FOR_PRICE_VALUE){

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

} else {

define ('TEXT_CALL_FOR_PRICE', 'TEXT_CALL_FOR_PRICE');

// You can set CALL_FOR_PRICE_TEXT to anything you want. Its style is determined by the page it is displayed on. Changes made here will be visible throughout your site.

return TEXT_CALL_FOR_PRICE;

// BOF: MOD - EASY CALL FOR PRICE v1.4

}

}

* SAVE AND CLOSE FILE

 

And here is what my code looks like which is getting the error.

 

 

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

// BOF: MOD - EASY CALL FOR PRICE v1.4

// return $this->format($this->calculate_price($products_price, $products_tax, $quantity));

define ('CALL_FOR_PRICE_VALUE', 0);

// If you sell products for $0.00 and want to display "Call for Price!" for other products, set their price and the CALL_FOR_PRICE_VALUE to -1.

if ($products_price > CALL_FOR_PRICE_VALUE){

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

} else {

define ('TEXT_CALL_FOR_PRICE', 'TEXT_CALL_FOR_PRICE');

// You can set CALL_FOR_PRICE_TEXT to anything you want. Its style is determined by the page it is displayed on. Changes made here will be visible throughout your site.

return TEXT_CALL_FOR_PRICE;

// BOF: MOD - EASY CALL FOR PRICE v1.4

}

}

?>

Link to comment
Share on other sites

  • 10 months later...

Archived

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

×
×
  • Create New...