PDA

View Full Version : Credit Card Fields


ajo
11-Dec-2003, 01:49 PM
Hi-
Some of my products are free with a variable monthly subscription. My business requires credit card details to be taken whether they have chosen a free product or not. In actinic if I choose a free product the credit card fields do not come up during checkout. Does anyone know of a means of forcing the credit card fields to come up whether any money is taken or not?

http://www.phone4u.co.uk/test/acatalog/

smiffy
11-Dec-2003, 02:12 PM
You could always make it 1p - obviously not Free - but very nearly!

:D

ajo
11-Dec-2003, 02:27 PM
Thanks but unfortunately we cant for legal reasons.

rmladden
11-Dec-2003, 09:44 PM
OK, just for fun, I took a look at this (note to self: get a life).

In Orderscript.pl, find this line:
if ($nTotal > 0 && $$::g_pSetupBlob{'PRICES_DISPLAYED'}) # if their is money involed, display the payment panel

change $nTotal > 0 to $nTotal >= 0

this makes that part of the logic always true and is easy to change back if necessary.

I don't know when $$::g_pSetupBlob{'PRICES_DISPLAYED'} is set, so you may have to change the '&&' to '||' too. This also makes it easy to change back.

I have not tested this. Test carefully.

ajo
12-Dec-2003, 10:32 AM
Thanks Bob, I tried these changes but couldn’t see any difference – (not even any errors!). Do you think the '&&' change to '||' needs changing anywhere other than:
if ($nTotal > 0 && $$::g_pSetupBlob{'PRICES_DISPLAYED'}) # if their is money involed, display the payment panel ?
ajo

rmladden
12-Dec-2003, 10:55 AM
Look for all the occurances of $nTotal in Orderscript.pl. If it checks for 0, modify it. This could take a night of hacking.

Just to make sure, did you do a site update after you made the changes. It gets merged into os000001.pl.

ajo
12-Dec-2003, 11:27 AM
Please pardon my ignorance Bob, my programming knowledge is somewhat limited, how should I change this line?:
my ($bPaymentHidden) = ($nTotal == 0 || !$$::g_pSetupBlob{'PRICES_DISPLAYED'});


The only other instance I found where $nTotal > 0 was:
$nTotal > 0) # and there is something to show
Which I changed to:
$nTotal >= 0) # and there is something to show

ajo

rmladden
12-Dec-2003, 12:27 PM
Let's force this false.

my ($bPaymentHidden) = $::FALSE;

I was hoping this would be easier and the statements can stay almost the same.

ajo
12-Dec-2003, 01:16 PM
BINGO seems to work fine! Looking for errors but nothing so far – too good to be true - If it was to through up errors would they be fairly obvious?

ajo
12-Dec-2003, 08:24 PM
Still working fine - Many thanks for your input!

smiffy
12-Dec-2003, 08:33 PM
*If at Current Address For Less Than 3 Years State Previous Address:

is this field really going to be long enough if I have to add in my previous address. I beleive that norman has a tip to make this a proper multi line text box.



I've just placed order AF78LZ10000015 and my only other comment would be that It would be nice to se £0.00 on the receipt page.

ajo
15-Dec-2003, 09:40 AM
Thanks for observation on £0.00 value – sounds like you have an idea how this can be achieved?

rmladden
16-Dec-2003, 01:38 AM
There must be another check of $nTotal in the script. I haven't had a chance to look through it.