sashaben Posted September 8, 2006 Share Posted September 8, 2006 (edited) I was wondering if anyone knew how to change the credit card number details from XXXXXXXXXXXXXXXX To XXXX-XXXX-XXXX-XXXX Or even just XXXX XXXX XXXX XXXX It would be good if if it showed up like this both when the customer was entering the details as well as on the admin order information page. Makes it easier to read. Thanks in advance for any help Edited September 8, 2006 by sashaben Quote Link to comment Share on other sites More sharing options...
wonton Posted September 10, 2006 Share Posted September 10, 2006 Here is the code to do it: in /catalog/admin/orders.php, Search on the word "cc_number". You will see: <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td> <td class="main"><?php $order->info['cc_number']; </td> </tr> Change to: <td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td> <td class="main"><?php //py: code to format cc_number with spaces $cc_p1=substr($order->info['cc_number'],0,4); $cc_p2=substr($order->info['cc_number'],4,4); $cc_p3=substr($order->info['cc_number'],8,4); $cc_p4=substr($order->info['cc_number'],12,4); echo $cc_p1 . '-' . $cc_p2 . '-' . $cc_p3 . '-' . $cc_p4; ?></td> </tr> This will put dashes between groups of 4 numbers. Quote Link to comment Share on other sites More sharing options...
sashaben Posted September 11, 2006 Author Share Posted September 11, 2006 thanks so much, exactly what I wanted :) Quote Link to comment Share on other sites More sharing options...
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.