Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CURRECNY HELP - ANY PROGRAMERS?


L!mit

Recommended Posts

Hello,

 

Hopefully somebody can help me. I am trying to set the credit card module to only enable if a particular currency is selected. I have tried PHP if else functions in cc.php, but for some reason I cant get it to work. I was hoping maybe a programmer could take a quick look and give me some suggestions.

 

I am new to PHP any suggestions would be appreicated below is what I thought would work, but didnt.

 

Thanks for your time.

 

class cc {

var $code, $title, $description, $enabled;

 

// class constructor

function cc() {

global $order;

 

$this->code = 'cc';

$this->title = MODULE_PAYMENT_CC_TEXT_TITLE;

$this->description = MODULE_PAYMENT_CC_TEXT_DESCRIPTION;

$this->sort_order = MODULE_PAYMENT_CC_SORT_ORDER;

$this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true : false);

 

if ((int)MODULE_PAYMENT_CC_ORDER_STATUS_ID > 0) {

$this->order_status = MODULE_PAYMENT_CC_ORDER_STATUS_ID;

}

 

if (is_object($order)) $this->update_status();

}

 

// class methods

function update_status() {

global $order;

 

 

if ($currecny == 'USD') {

$this->enabled = false;

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...