Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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?

  • 1 month later...
Posted

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;

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...