Hi
I need to re-create customer's orders already paid but gone from my database in order to provide missing orders/invoices.
My payment methods are bank card and Paypal so if i re-create an order using the master password I have to pay somehow to validate the order.
I tried to enable COD as the only payment method for this specific case (use of master password), and not having COD available to others customers, I don't know if it can be done with the encrypted master password.
I found leads on an old OScommerce forum and tried to adapt but it doesn't work.
Basically coding would be to add something like that:
1- add in the file password_funcs.php into function zen_validate_password:
function zen_validate_password($plain, $encrypted) {
if (md5($plain) == MASTER_PASS) {
tep_session_register('the_master_pass');
$the_master_pass = 'my_password';
}
I tried to zen the above OSC code:
function zen_validate_password($plain, $encrypted) {
if ($plain == MASTER_PASS) {
$_SESSION['the_master_pass'];
$the_master_pass = 'my_password';
return true; }
2 - add to cod.php into function update_status() something like:
function update_status() {
global $order, $db;
$this->enabled = false;
if (tep_session_is_registered['the_master_pass'] && $the_master_pass == 'my_password') $this->enabled = true;
I zenned it a little:
function update_status() {
global $order, $db;
$this->enabled = false;
if ($_SESSION['the_master_pass'] && $the_master_pass == 'my_password') $this->enabled = true;
Master password logging works fine and I don't get any specific error but I can't get the COD payment to show up as unique payment method when I log using the master password....
Any idea what is wrong?
Thanks
L.
Bookmarks