twistedindustries.com Posted November 3, 2007 Posted November 3, 2007 Does anyone know how to show credit card numbers seperated by dashes like on admin/orders.php thanks in advance for the help
twistedindustries.com Posted November 4, 2007 Author Posted November 4, 2007 nm i got it and for anyone that wants to know here is the solution: 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>
davlak Posted November 6, 2007 Posted November 6, 2007 nm i got it and for anyone that wants to know here is the solution: 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> Solution works a treat! Thanks very much :thumbsup:
Busface Posted September 9, 2009 Posted September 9, 2009 no problem I was just looking for this work-around and stumbled across your post. Great work! Thanks so much!!
burt Posted September 9, 2009 Posted September 9, 2009 <td class="main"><?php echo rtrim(chunk_split($order->info['cc_number'], 4 , "-"), "-"); ?></td>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.