DivaVocals,
Thanks for all the Work and Support you have done and still do to patch up Super Orders 2.0 along with everyone else that has contributed. I think this is a Great Mod by BlindSide.
I noticed that starting in REV 48, you took out ( I think it was you) the modify button and left these comments in it's place.
So, here is a fix for those that are interested.
The reason MODIFY does not work is because of a Security Patch
Code:
admin/includes/init_includes/init_security_patch_v138
It removes the ability to use the word
update in a
$_GET statement.
I agree, adjustments are the way to go, but what if you entered a check number incorrectly or something similar, I myself would rather Modify the payment.
That being said, There is a way to make Modify work again. You will need to edit two files. They are:
Code:
admin/includes/classes/super_order.php
Look around Line # 358 for:
// Displays a button that will open a popup window to update an existing payment entry
// This code assumes you have the popupWindow() function defined in your header!
// Valid $payment_mode entries are: 'payment', 'purchase_order', 'refund'
function button_update($payment_mode, $index) {
echo ' <a href="javascript:popupWindow(\'' .
zen_href_link(FILENAME_SUPER_PAYMENTS, 'oID=' . $this->oID . '&payment_mode=' . $payment_mode . '&index=' . $index . '&action=update', 'NONSSL') . '\', \'scrollbars=yes,resizable=yes,width=400,height=300,screenX=150,screenY=100,top=100,left=150\')">' .
zen_image_button('btn_modify.gif', sprintf(ALT_TEXT_UPDATE, str_replace('_', ' ', $payment_mode))) . '</a>';
}
and
/admin/super_payments
Look around Line# 450 for:
case 'update':
$index = $_GET['index'];
echo ' ' . zen_draw_form('update', FILENAME_SUPER_PAYMENTS, '', 'get', '', true) . NL;
echo ' ' . zen_draw_hidden_field('action', $action) . NL;
echo ' ' . zen_draw_hidden_field('process', 1) . NL;
echo ' ' . zen_draw_hidden_field('payment_mode', $payment_mode) . NL;
echo ' ' . zen_draw_hidden_field('oID', $so->oID) . NL;
Change the word
update in both files to anything you want to use as long as you use the same word in both files.
Remember to change the lines back in
Code:
admin/super_orders.php
starting around line #'s 477, 495, 539, 564, 582 and 637. (This is in REV 48a of Super Orders 2.0 and Zen-Cart 138a)
Copy your updated files to your store and Modify will now work.
REMEMBER: Always have a BACKUP of ANY file that you change.