| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Splitting credit card number on invoice | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Splitting credit card number on invoice
Is there a way to make the credit card more readable on the invoice?
At the moment it is outputted as one long number and this can cause delays in offline processing -usually the admin staff manually put a space in after each group of 4 numbers after they've decrypted and pasted into the text editor, ready for inputting into the PDQ. What I'm looking for is a bit of code that will take the cc number and split or put a space in after every 4 digts until it reaches the end e.g. xxxx xxxx xxxx xxxx Can it be done? Thanks Dan
__________________
4.4.2 and 4.6.1 |
|||||||
#2
|
|||||||
|
|||||||
OK, so far I know the CC info is pulled from the encrypted "details" field in the orders table. It looks a bit too complex for me to extract that information and then try to format the cc number. Instead I was thinking of pulling the cc number itself, maybe from the customers table but :
Code:
in the orcer_invoice.tpl file doesn't work. My plan was to extract the number and use some smarty code to split the number and display it on screen...make sense? Can the cc number be displayed in a template on it's own? Thanks Dan
__________________
4.4.2 and 4.6.1 |
|||||||
#3
|
|||||||
|
|||||||
Man, I SO want to do this too.
My wife complains bitterly about the single long credit card number . Anyone with a little time on their hands figured this one out?
__________________
Mark J Kaufman X-Cart Gold 4.0.13 Linux, Apache, PHP 4.4.0, Perl 5.006001 LisaKaufmanDesigns.com |
|||||||
#4
|
|||||||
|
|||||||
This is what I got from X-Cart -this works for me and I use offline processing -you may want to give it a go after backing up first!
"Changing of credit card number customization" INSTRUCTIONS 1. The file you need to modify is following: %PATH_TO_YOUR_XCART%/include/func.php 2. Insert two functions at end of file Code:
3. You should find following function: "func_select_order" and change following lines Code:
Code:
Important note. In new function: Code:
Turn your attention on second parameter of this function. This argument shows how many symbols must be in group. As example if you set it to 5 - output string will be something like: "XXXXX XXXXX XXXXX XXX" without quotes If you set it to 2 - output string will be: "XX XX XX XX XX XX XX XX" So, if you want to break the number on another groups - just change this value. Hope that does the trick, as I say it works for me. Dan
__________________
4.4.2 and 4.6.1 |
|||||||
#5
|
|||||||
|
|||||||
How cool are YOU! How did you "get" this from X-Cart?
We have very similar versions of X-Cart, so this should apply pretty directly to me, too. How exciting! I'll back up func.php and try this sometime when it's quiet in the next couple of days. I'll follow up here once it's working. We do offline processing, so that's nice too.
__________________
Mark J Kaufman X-Cart Gold 4.0.13 Linux, Apache, PHP 4.4.0, Perl 5.006001 LisaKaufmanDesigns.com |
|||||||
#6
|
|||||||
|
|||||||
Just took a quick look at func.php. Looks like they added a small enhancement between our two versions of X-Cart. The BEFORE code is now:
Code:
It's clear how to deal with this very minor change, so I'll try it real soon! Thanks again. You rock!
__________________
Mark J Kaufman X-Cart Gold 4.0.13 Linux, Apache, PHP 4.4.0, Perl 5.006001 LisaKaufmanDesigns.com |
|||||||
#7
|
|||||||||
|
|||||||||
Works Great, thanks
Just to say this mod works great on 4.0.16, well done.
Our sales team are very happy with the spaces between 4 digits of the credit card numbers, makes life much easier. Thanks again.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24 PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART Shop carts at http://www.nightscene.co.uk/shop/home.php http://www.theshisha.net/shopcart/home.php http://www.system-maintenance.com/maint/home.php http://www.tabac4u.com |
|||||||||
#8
|
|||||||
|
|||||||
HEY, just verified the code I quoted above from my X-Cart is what's really on my site. I'm no expert, but the three equals signs should be just two, right? So I should fix that when I add the recommended code, eh?
Quote:
__________________
Mark J Kaufman X-Cart Gold 4.0.13 Linux, Apache, PHP 4.4.0, Perl 5.006001 LisaKaufmanDesigns.com |
|||||||
#9
|
|||||||
|
|||||||
I just applied this mod and tested it. It works GREAT on my installation too. Many thanks again DanUK!
Now just have to remember to fix the "===" issue once I hear it's the right thing to do...
__________________
Mark J Kaufman X-Cart Gold 4.0.13 Linux, Apache, PHP 4.4.0, Perl 5.006001 LisaKaufmanDesigns.com |
|||||||
#10
|
|||||||||
|
|||||||||
moved to custom mods
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
|
|||
X-Cart forums © 2001-2020
|