
Originally Posted by
frank18
Mod needs to be upgraded for 154 as per #67.
Since this is a payment module, I am interested to know for the update_status function of includes\modules\payment\dirbankaus.php whether:
1) "delivery" should be changed to "billing"
2) and the code that checks for "virtual products" should be removed
such that replace
Code:
function update_status() {
global $order, $db;
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_DIRBANKAUS_ZONE > 0) ) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_DIRBANKAUS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$this->enabled = false;
}
}
// disable the module if the order only contains virtual products
if ($this->enabled == true) {
if ($order->content_type == 'virtual') {
$this->enabled = false;
}
}
}
with
Code:
function update_status() {
global $order, $db;
if ($this->enabled && (int)MODULE_PAYMENT_DIRBANKAUS_ZONE > 0 && isset($order->billing['country']['id'])) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_DIRBANKAUS_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$this->enabled = false;
}
}
// disable the module if the order only contains virtual products
// if ($this->enabled == true) {
// if ($order->content_type == 'virtual') {
// $this->enabled = false;
// }
// }
}
Bookmarks