| 1 |
<?php |
<?php |
| 2 |
// $Id: uc_turkish_banks.module,v 1.7 2008/06/23 04:57:36 bakyildiz Exp $ |
// $Id: uc_turkish_banks.module,v 1.10 2008/11/16 10:00:42 bakyildiz Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 26 |
/** |
/** |
| 27 |
* Implementation of hook_menu(). |
* Implementation of hook_menu(). |
| 28 |
*/ |
*/ |
| 29 |
function uc_turkish_banks_menu($may_cache) { |
function uc_turkish_banks_menu() { |
| 30 |
if ($may_cache) { |
$items = array(); |
| 31 |
$items[] = array( |
$items['cart/banks/complete'] = array( |
|
'path' => 'cart/banks/complete', |
|
| 32 |
'title' => t('Payment Result'), |
'title' => t('Payment Result'), |
| 33 |
'callback' => 'uc_turkish_banks_complete', |
'page callback' => 'uc_turkish_banks_complete', |
| 34 |
'access' => user_access('access content'), |
'access arguments' => array('access content'), |
| 35 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 36 |
); |
); |
| 37 |
$items[] = array( |
$items['admin/store/settings/banks'] = array( |
|
'path' => 'admin/store/settings/banks', |
|
| 38 |
'title' => t('Turkish Bank Settings'), |
'title' => t('Turkish Bank Settings'), |
| 39 |
'description' => t('Manage Banks'), |
'description' => t('Manage Banks'), |
| 40 |
'callback' => 'uc_turkish_banks_display', |
'page callback' => 'uc_turkish_banks_display', |
| 41 |
'callback arguments' => array('active'), |
'page arguments' => array('active'), |
| 42 |
|
'access arguments' => array('administer store'), |
| 43 |
'type' => MENU_NORMAL_ITEM, |
'type' => MENU_NORMAL_ITEM, |
| 44 |
); |
); |
| 45 |
|
$items['admin/store/settings/banks/overview'] = array( |
|
$items[] = array( |
|
|
'path' => 'admin/store/settings/banks/edit', |
|
| 46 |
'title' => t('Overview'), |
'title' => t('Overview'), |
| 47 |
'description' => t('Manage Banks'), |
'description' => 'View the Turkish Bank Settings.', |
| 48 |
'callback' => 'uc_turkish_banks_display', |
'access arguments' => array('administer store'), |
| 49 |
'callback arguments' => array('active'), |
'weight' => -10, |
|
'access' => user_access('view banks'), |
|
| 50 |
'type' => MENU_DEFAULT_LOCAL_TASK, |
'type' => MENU_DEFAULT_LOCAL_TASK, |
| 51 |
); |
); |
| 52 |
|
$items['admin/store/settings/banks/add'] = array( |
|
$items[] = array( |
|
|
'path' => 'admin/store/settings/banks/add', |
|
| 53 |
'title' => t('Add New Bank'), |
'title' => t('Add New Bank'), |
| 54 |
'description' => t('Add a New Bank'), |
'description' => t('Add a New Bank'), |
| 55 |
'callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 56 |
'callback arguments' => array('uc_turkish_banks_add_form', 'add'), |
'page arguments' => array('uc_turkish_banks_add_form', 'add'), |
| 57 |
'access' => user_access('manage banks'), |
'access arguments' => array('administer store'), |
| 58 |
'type' => MENU_LOCAL_TASK, |
'type' => MENU_LOCAL_TASK, |
| 59 |
'weight' => 10, |
'weight' => 10, |
| 60 |
); |
); |
| 61 |
$items[] = array( |
$items['admin/store/settings/banks/%/edit'] = array( |
| 62 |
'path' => 'admin/store/settings/banks/instalments', |
'title' => t('Edit Banks'), |
| 63 |
|
'description' => t('Edit an available bank'), |
| 64 |
|
'page callback' => 'drupal_get_form', |
| 65 |
|
'page arguments' => array('uc_turkish_banks_add_form', 'edit', 4), |
| 66 |
|
'access arguments' => array('administer store'), |
| 67 |
|
'type' => MENU_CALLBACK, |
| 68 |
|
); |
| 69 |
|
$items['admin/store/settings/banks/%/delete'] = array( |
| 70 |
|
'title' => t('Delete Bank'), |
| 71 |
|
'description' => t('Delete a bank'), |
| 72 |
|
'page callback' => 'drupal_get_form', |
| 73 |
|
'page arguments' => array('uc_turkish_banks_delete_confirm', 4), |
| 74 |
|
'access arguments' => array('administer store'), |
| 75 |
|
'type' => MENU_CALLBACK, |
| 76 |
|
); |
| 77 |
|
|
| 78 |
|
|
| 79 |
|
$items['admin/store/settings/banks/instalments'] = array( |
| 80 |
'title' => t('Bank Instalments Settings'), |
'title' => t('Bank Instalments Settings'), |
| 81 |
'description' => t('Manage Instalments'), |
'description' => t('Manage Instalments'), |
| 82 |
'callback' => 'uc_turkish_banks_instalments_display', |
'page callback' => 'uc_turkish_banks_instalments_display', |
| 83 |
'access' => user_access('manage banks'), |
'access arguments' => array('administer store'), |
| 84 |
'type' => MENU_NORMAL_ITEM, |
'type' => MENU_NORMAL_ITEM, |
| 85 |
); |
); |
| 86 |
$items[] = array( |
$items['admin/store/settings/banks/instalments/overview'] = array( |
| 87 |
'path' => 'admin/store/settings/banks/instalments/add', |
'title' => t('Overview'), |
| 88 |
|
'description' => 'View the Turkish Bank Settings.', |
| 89 |
|
'access arguments' => array('administer store'), |
| 90 |
|
'weight' => -10, |
| 91 |
|
'type' => MENU_DEFAULT_LOCAL_TASK, |
| 92 |
|
); |
| 93 |
|
$items['admin/store/settings/banks/instalments/add'] = array( |
| 94 |
'title' => t('Add Instalment'), |
'title' => t('Add Instalment'), |
| 95 |
'description' => t('Add a New Instalment'), |
'description' => t('Add a New Instalment'), |
| 96 |
'callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 97 |
'callback arguments' => array('uc_turkish_banks_instalments_add_form', 'add'), |
'page arguments' => array('uc_turkish_banks_instalments_add_form', 'add'), |
| 98 |
'access' => user_access('manage banks'), |
'access arguments' => array('administer store'), |
| 99 |
'type' => MENU_LOCAL_TASK, |
'type' => MENU_LOCAL_TASK, |
| 100 |
'weight' => 10, |
'weight' => 10, |
| 101 |
); |
); |
| 102 |
} |
|
| 103 |
else { |
$items['admin/store/settings/banks/instalments/%/%/delete'] = array( |
|
$items[] = array( |
|
|
'path' => 'admin/store/settings/banks/'. arg(4) .'/edit', |
|
|
'title' => t('Edit Banks'), |
|
|
'description' => t('Edit an available bank'), |
|
|
'callback' => 'drupal_get_form', |
|
|
'callback arguments' => array('uc_turkish_banks_add_form', 'edit', arg(4)), |
|
|
'access' => user_access('manage banks'), |
|
|
'type' => MENU_DYNAMIC_ITEM, |
|
|
); |
|
|
$items[] = array( |
|
|
'path' => 'admin/store/settings/banks/'. arg(4) .'/delete', |
|
|
'title' => t('Delete Bank'), |
|
|
'description' => t('Delete a bank'), |
|
|
'callback' => 'drupal_get_form', |
|
|
'callback arguments' => array('uc_turkish_banks_delete_confirm', arg(4)), |
|
|
'access' => user_access('manage banks'), |
|
|
'type' => MENU_DYNAMIC_ITEM, |
|
|
); |
|
|
$items[] = array( |
|
|
'path' => 'admin/store/settings/banks/instalments/'. arg(5) .'/'. arg(6) .'/delete', |
|
| 104 |
'title' => t('Delete instalment'), |
'title' => t('Delete instalment'), |
| 105 |
'description' => t('Delete an instalment'), |
'description' => t('Delete an instalment'), |
| 106 |
'callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 107 |
'callback arguments' => array('uc_turkish_banks_instalments_delete_confirm', arg(5), arg(6)), |
'page arguments' => array('uc_turkish_banks_instalments_delete_confirm', 5, 6), |
| 108 |
'access' => user_access('manage banks'), |
'access arguments' => array('administer store'), |
| 109 |
'type' => MENU_DYNAMIC_ITEM, |
'type' => MENU_CALLBACK, |
| 110 |
); |
); |
|
} |
|
| 111 |
|
|
| 112 |
return $items; |
return $items; |
| 113 |
} |
} |
| 114 |
|
|
| 115 |
/** |
/** |
| 116 |
* Implementation of hook_perm(). |
* Implementation of instalments. |
| 117 |
*/ |
*/ |
|
function uc_turkish_banks_perm() { |
|
|
return array('view banks', 'manage banks'); |
|
|
} |
|
|
|
|
| 118 |
function uc_turkish_banks_instalments_display() { |
function uc_turkish_banks_instalments_display() { |
| 119 |
$cid = arg(5); |
$cid = arg(5); |
| 120 |
$result = db_query("SELECT cid, instalment, instalment_ratio, valid_until FROM {uc_turkish_banks_instalments} where cid = %d ORDER BY instalment", $cid); |
$result = db_query("SELECT cid, instalment, instalment_ratio, valid_until FROM {uc_turkish_banks_instalments} where cid = %d ORDER BY instalment", $cid); |
| 147 |
} |
} |
| 148 |
|
|
| 149 |
function uc_turkish_banks_instalments_add_form($action, $cid = NULL) { |
function uc_turkish_banks_instalments_add_form($action, $cid = NULL) { |
| 150 |
$form['uc_turkish_banks_instalments'] = array('#type' => 'fieldset', |
$form['uc_turkish_banks_instalments'] = array( |
| 151 |
|
'#type' => 'fieldset', |
| 152 |
'#title' => t('Instalments'), |
'#title' => t('Instalments'), |
| 153 |
'#collapsible' => TRUE, |
'#collapsible' => TRUE, |
| 154 |
'#collapsed' => FALSE, |
'#collapsed' => FALSE, |
| 155 |
'#weight' => 0, |
'#weight' => 0, |
| 156 |
); |
); |
| 157 |
$form['cid'] = array('#type' => 'value', |
$form['cid'] = array( |
| 158 |
|
'#type' => 'value', |
| 159 |
'#value' => arg(6), |
'#value' => arg(6), |
| 160 |
); |
); |
| 161 |
|
|
| 162 |
$form['uc_turkish_banks_instalments']['instalment'] = array('#type' => 'textfield', |
$form['uc_turkish_banks_instalments']['instalment'] = array( |
| 163 |
|
'#type' => 'textfield', |
| 164 |
'#title' => t('Instalment'), |
'#title' => t('Instalment'), |
| 165 |
'#default_value' => $value['instalment'], |
'#default_value' => $value['instalment'], |
| 166 |
'#size' => 3, |
'#size' => 3, |
| 202 |
/** |
/** |
| 203 |
* Validate the instalment |
* Validate the instalment |
| 204 |
*/ |
*/ |
| 205 |
function uc_turkish_banks_instalments_add_form_validate($form_id, $form) { |
function uc_turkish_banks_instalments_add_form_validate($form, &$form_state) { |
| 206 |
$result = db_result(db_query("SELECT instalment FROM {uc_turkish_banks_instalments} WHERE cid = %d and instalment = %d", $form['cid'], $form['instalment'])); |
$result = db_result(db_query("SELECT instalment FROM {uc_turkish_banks_instalments} WHERE cid = %d and instalment = %d", $form_state['values']['cid'], $form_state['values']['instalment'])); |
| 207 |
if ($result) { |
if ($result) { |
| 208 |
form_set_error($form['cid'], t('Instalment exist.')); |
form_set_error($form_state['values']['cid'], t('Instalment exist.')); |
| 209 |
} |
} |
| 210 |
} |
} |
| 211 |
|
|
| 212 |
/** |
/** |
| 213 |
* Insert instalment |
* Insert instalment // BA $form['instalment'] bilgisi $form_state['values']['instalment'] olacak |
| 214 |
*/ |
*/ |
| 215 |
function uc_turkish_banks_instalments_add_form_submit($form_id, $form) { |
function uc_turkish_banks_instalments_add_form_submit($form, &$form_state) { |
| 216 |
$valid_until = mktime(23, 59, 59, |
$valid_until = mktime(23, 59, 59, |
| 217 |
$form['valid_until']['month'], |
$form_state['values']['valid_until']['month'], |
| 218 |
$form['valid_until']['day'], |
$form_state['values']['valid_until']['day'], |
| 219 |
$form['valid_until']['year'] |
$form_state['values']['valid_until']['year'] |
| 220 |
); |
); |
| 221 |
$result = db_query("INSERT INTO {uc_turkish_banks_instalments} (cid, instalment, instalment_ratio, valid_until) |
$result = db_query("INSERT INTO {uc_turkish_banks_instalments} (cid, instalment, instalment_ratio, valid_until) |
| 222 |
VALUES (%d, %d, %f, %d)", $form['cid'], $form['instalment'], $form['instalment_ratio'], $valid_until); |
VALUES (%d, %d, %f, %d)", $form_state['values']['cid'], $form_state['values']['instalment'], $form_state['values']['instalment_ratio'], $valid_until); |
| 223 |
if ($result) { |
if ($result) { |
| 224 |
$message = "New instalment {$form['name']} added succesfully."; |
$message = "New instalment {$form_state['values']['bankname']} added succesfully."; |
| 225 |
} |
} |
| 226 |
else { |
else { |
| 227 |
$message = "Sorry instalment could not be added. Try again."; |
$message = "Sorry instalment could not be added. Try again."; |
| 228 |
} |
} |
| 229 |
drupal_set_message($message); |
drupal_set_message($message); |
| 230 |
drupal_goto('admin/store/settings/banks/instalments/'. $form['cid']); |
drupal_goto('admin/store/settings/banks/instalments/'. $form_state['values']['cid']); |
| 231 |
} |
} |
| 232 |
|
|
| 233 |
/** |
/** |
| 288 |
/** |
/** |
| 289 |
* Form builder for product attributes. |
* Form builder for product attributes. |
| 290 |
*/ |
*/ |
| 291 |
function uc_turkish_banks_add_form($action, $cid = NULL) { |
function uc_turkish_banks_add_form($form_state,$action, $cid) { |
| 292 |
if ($action == 'edit') { |
if ($action == 'edit') { |
| 293 |
// If the action is edit, we load the coupon from the database with default values |
// If the action is edit, we load the coupon from the database with default values |
| 294 |
$value = uc_turkish_banks_load($cid); |
$value = uc_turkish_banks_load($cid); |
| 307 |
$permissions = $value['roles']; |
$permissions = $value['roles']; |
| 308 |
$allowed_users = explode(',', $value['users']); |
$allowed_users = explode(',', $value['users']); |
| 309 |
} |
} |
| 310 |
$form['bank'] = array('#type' => 'fieldset', |
$form['bank'] = array( |
| 311 |
|
'#type' => 'fieldset', |
| 312 |
'#title' => t('General Definitions'), |
'#title' => t('General Definitions'), |
| 313 |
'#collapsible' => TRUE, |
'#collapsible' => TRUE, |
| 314 |
'#collapsed' => FALSE, |
'#collapsed' => FALSE, |
| 315 |
'#weight' => 0, |
'#weight' => 0, |
| 316 |
); |
); |
| 317 |
|
|
| 318 |
$form['bank']['bankname'] = array('#type' => 'textfield', |
$form['bank']['bankname'] = array( |
| 319 |
|
'#type' => 'textfield', |
| 320 |
'#title' => t('Bank Name'), |
'#title' => t('Bank Name'), |
| 321 |
'#default_value' => $value['bankname'], |
'#default_value' => $value['bankname'], |
| 322 |
'#size' => 30, |
'#size' => 30, |
| 399 |
/** |
/** |
| 400 |
* Validate the coupon form |
* Validate the coupon form |
| 401 |
*/ |
*/ |
| 402 |
function uc_turkish_banks_add_form_validate($form_id, $form) { |
function uc_turkish_banks_add_form_validate($form, &$form_state) { |
| 403 |
// check to ensure a unique coupon code |
// check to ensure a unique coupon code |
| 404 |
$result = db_result(db_query("SELECT cid, bankname FROM {uc_turkish_banks} WHERE bankname = '%s' AND cid <> %d", $form['bankname'], $form['cid'])); |
$result = db_result(db_query("SELECT cid, bankname FROM {uc_turkish_banks} WHERE bankname = '%s' AND cid <> %d", $form_state['values']['bankname'], $form_state['values']['cid'])); |
| 405 |
if ($result) { |
if ($result) { |
| 406 |
form_set_error($form['cid'], t('Bank name already used by bank: %bankname.', array('%bankname' => $result->bankname))); |
form_set_error($form_state['values']['cid'], t('Bank name already used by bank: %bankname.', array('%bankname' => $result->bankname))); |
| 407 |
} |
} |
| 408 |
} |
} |
| 409 |
|
|
| 410 |
/** |
/** |
| 411 |
* Insert/Update coupon |
* Insert/Update coupon |
| 412 |
*/ |
*/ |
| 413 |
function uc_turkish_banks_add_form_submit($form_id, $form) { |
function uc_turkish_banks_add_form_submit($form, &$form_state) { |
| 414 |
$valid_until = mktime(23, 59, 59, |
$valid_until = mktime(23, 59, 59, |
| 415 |
$form['valid_until']['month'], |
$form_state['values']['valid_until']['month'], |
| 416 |
$form['valid_until']['day'], |
$form_state['values']['valid_until']['day'], |
| 417 |
$form['valid_until']['year'] |
$form_state['values']['valid_until']['year'] |
| 418 |
); |
); |
| 419 |
|
|
| 420 |
if (!isset($form['cid'])) { |
if (!isset($form_state['values']['cid'])) { |
| 421 |
if (db_query("INSERT INTO {uc_turkish_banks} (bankname, clientid, username, password, bankurl, storekey, processtype, cardname, valid_until) |
if (db_query("INSERT INTO {uc_turkish_banks} (bankname, clientid, username, password, bankurl, storekey, processtype, cardname, valid_until) |
| 422 |
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s', '%d')", |
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s', '%d')", |
| 423 |
$form['bankname'], $form['clientid'], $form['username'], $form['password'], $form['bankurl'], $form['storekey'], $form['processtype'], $form['cardname'], $valid_until)) { |
$form_state['values']['bankname'], $form_state['values']['clientid'], $form_state['values']['username'], $form_state['values']['password'], $form_state['values']['bankurl'], $form_state['values']['storekey'], $form_state['values']['processtype'], $form_state['values']['cardname'], $valid_until)) { |
| 424 |
$message = "New bank {$form['name']} added succesfully"; |
$message = "New bank {$form_state['values']['bankname']} added succesfully"; |
| 425 |
} |
} |
| 426 |
else { |
else { |
| 427 |
$message = "Sorry bank could not be added. Try again"; |
$message = "Sorry bank could not be added. Try again"; |
| 430 |
else { |
else { |
| 431 |
// Otherwise we try to update the coupon with matching coupon id |
// Otherwise we try to update the coupon with matching coupon id |
| 432 |
if (db_query("UPDATE {uc_turkish_banks} SET bankname = '%s', clientid = '%s', username = '%s', password = '%s', bankurl = '%s', storekey = '%s', processtype = '%s', cardname = '%s', valid_until = %d WHERE cid = %d", |
if (db_query("UPDATE {uc_turkish_banks} SET bankname = '%s', clientid = '%s', username = '%s', password = '%s', bankurl = '%s', storekey = '%s', processtype = '%s', cardname = '%s', valid_until = %d WHERE cid = %d", |
| 433 |
$form['bankname'], $form['clientid'], $form['username'], $form['password'], $form['bankurl'], $form['storekey'], $form['processtype'], $form['cardname'], $valid_until, $form['cid'])) { |
$form_state['values']['bankname']['bankname'], $form_state['values']['bankname']['clientid'], $form_state['values']['bankname']['username'], $form_state['values']['bankname']['password'], $form_state['values']['bankname']['bankurl'], $form_state['values']['bankname']['storekey'], $form_state['values']['bankname']['processtype'], $form_state['values']['bankname']['cardname'], $valid_until, $form_state['values']['bankname']['cid'])) { |
| 434 |
$message = "Bank updated succssfully"; |
$message = "Bank updated succssfully"; |
| 435 |
} |
} |
| 436 |
else { |
else { |
| 438 |
} |
} |
| 439 |
} |
} |
| 440 |
drupal_set_message($message); |
drupal_set_message($message); |
| 441 |
drupal_goto("admin/store/settings/banks"); |
$form_state['redirect'] = 'admin/store/settings/banks'; |
| 442 |
} |
} |
| 443 |
|
|
| 444 |
/** |
/** |
| 448 |
$object = db_fetch_array(db_query("SELECT * FROM {uc_turkish_banks} WHERE cid = %d", $cid)); |
$object = db_fetch_array(db_query("SELECT * FROM {uc_turkish_banks} WHERE cid = %d", $cid)); |
| 449 |
if ($object == '') { |
if ($object == '') { |
| 450 |
drupal_set_message("Sorry Bank $cid does not exist. Choose another bank to edit or compose a new one"); |
drupal_set_message("Sorry Bank $cid does not exist. Choose another bank to edit or compose a new one"); |
| 451 |
drupal_goto('admin/store/settings/banks'); |
drupal_goto('admin/store/settings/banks'); |
| 452 |
} |
} |
| 453 |
return $object; |
return $object; |
| 454 |
} |
} |
| 456 |
/** |
/** |
| 457 |
* Delete confirm |
* Delete confirm |
| 458 |
*/ |
*/ |
| 459 |
function uc_turkish_banks_delete_confirm($cid) { |
function uc_turkish_banks_delete_confirm($form_state, $cid) { |
| 460 |
$form['cid'] = array('#type' => 'value', '#value' => $cid); |
$form['cid'] = array('#type' => 'value', '#value' => $cid); |
| 461 |
return confirm_form($form, |
return confirm_form($form, |
| 462 |
t('Confirm Deletion of Bank %cid', array('%cid' => $cid)), |
t('Confirm Deletion of Bank %cid', array('%cid' => $cid)), |
| 470 |
/** |
/** |
| 471 |
* Delete coupon |
* Delete coupon |
| 472 |
*/ |
*/ |
| 473 |
function uc_turkish_banks_delete_confirm_submit($form_id, $form) { |
function uc_turkish_banks_delete_confirm_submit($form, &$form_state) { |
| 474 |
$bank_id = $form['cid']; |
$bank_id = $form_state['values']['cid']; |
| 475 |
if (db_query("DELETE FROM {uc_turkish_banks}, {uc_turkish_banks_instalments} USING {uc_turkish_banks}, {uc_turkish_banks_instalments} WHERE {uc_turkish_banks}.cid = {uc_turkish_banks_instalments}.cid AND {uc_turkish_banks}.cid = %d", $bank_id)) { |
if (db_query("DELETE FROM {uc_turkish_banks}, {uc_turkish_banks_instalments} USING {uc_turkish_banks}, {uc_turkish_banks_instalments} WHERE {uc_turkish_banks}.cid = {uc_turkish_banks_instalments}.cid AND {uc_turkish_banks}.cid = %d", $bank_id)) { |
| 476 |
|
db_query("DELETE FROM {uc_turkish_banks} WHERE {uc_turkish_banks}.cid = %d", $bank_id); // if there is not any installment the bank is not deleted with above query |
| 477 |
$msg = t('Bank and related instalments has been deleted successfully'); |
$msg = t('Bank and related instalments has been deleted successfully'); |
| 478 |
} |
} |
| 479 |
else { |
else { |
| 480 |
$msg = t('Error deleting bank.'); |
$msg = t('Error deleting bank.'); |
| 481 |
} |
} |
| 482 |
drupal_goto('admin/store/settings/banks'); |
drupal_set_message($msg); |
| 483 |
|
$form_state['redirect'] = 'admin/store/settings/banks'; |
| 484 |
} |
} |
| 485 |
|
|
| 486 |
// BURASI MUALLAK BAKILACAK.... |
// BURASI MUALLAK BAKILACAK.... |
| 512 |
/** |
/** |
| 513 |
* Implementation of hook_form_alter(). |
* Implementation of hook_form_alter(). |
| 514 |
*/ |
*/ |
| 515 |
function uc_turkish_banks_form_alter($form_id, &$form) { |
function uc_turkish_banks_form_alter(&$form, $form_state, $form_id) { |
| 516 |
if ($form_id == 'uc_cart_checkout_review_form' && ($order_id = intval($_SESSION['cart_order'])) > 0) { |
if ($form_id == 'uc_cart_checkout_review_form' && ($order_id = intval($_SESSION['cart_order'])) > 0) { |
| 517 |
$order = uc_order_load($order_id); |
$order = uc_order_load($order_id); |
| 518 |
|
|