Jump to content
Sign in to follow this  

Remove CVV number disappeared

Recommended Posts

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?

Share this post

Link to post
Share on other sites

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'));


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this