High2K Posted November 17, 2006 Posted November 17, 2006 I've been messing around with some CVV contributions and now find that the remove cvv number function has disappeared. The button is there, but it doesn't actually remove the number. The relevant code I have in admin/orders.php is as follows:- <td class="main"><?php echo ENTRY_CREDIT_CARD_CVV2; ?></td> <td class="main"><?php echo $order->info['cc_cvv2']; ?></td> <td colspan="2"> <?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, 'oID=' . $HTTP_GET_VARS['oID'] . '&action=deletecc_cvv') . '">' . tep_image_button('button_removecvv.gif', RemoveCVV) . ' </a>';?></td> Any ideas how I can reinstate this? Quote
High2K Posted January 12, 2007 Author Posted January 12, 2007 Still struggling with this. Does anyone know how I can get this button to work again? Quote
insomniac2 Posted January 13, 2007 Posted January 13, 2007 Since you can't find the original contrib .. they are all pretty much the same. You can use this code. You need to add this case near the top of your orders.php with the other cases: Change all cases below of cvvnumber to whatever your orders.php $HTTP_POST_VARS cvv number value is. case 'deletecc_cvv': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $cvvnumber = tep_db_prepare_input ($HTTP_POST_VARS['cvvnumber']); tep_db_query("update " . TABLE_ORDERS . " set cvvnumber = null " . tep_db_input($cvvnumber) . " where orders_id = '" . tep_db_input($oID) . "'"); $order_updated = true; if ($order_updated) { $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } else { $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning'); } tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit')); break; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.