PDA

View Full Version : Adding Mod by hand. Where does this bit of code go?



nfmg
06-29-2004, 05:24 PM
Hi,
I am trying to add the CCCVV_ISSUE_START Selectable with card blacklist (http://www.oscommerce.com/community/contributions,1148) contrib.

I *think* I've figured out how to mesh all the other parts with OSC-MAX with BTS1.2a, but the bit of code referenced herein doesn't exist at all in max and I can't figure out the PHP to tell where to put the new code. I did look in the .tpl.php version of the file checkout_payment.



in catalog/checkout_payment.php

Around line 104 find this:

// one button is not an array
if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].ch ecked=true;
} else {
document.checkout_payment.payment.checked=true;
}
}

function rowOverEffect(object) {
if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}


Add this right after:

//begin BMC cvv contribution
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location =no,directories=no status=no,menubar=no,scrollbars=yes,resizable=yes, copyhistory=no,width=450,
height=450,screenX=150,screenY=150,top=150,left=15 0')
}
//end BMC cvv contribution


Hoping someone can help

Tim[/url]

nfmg
06-29-2004, 06:20 PM
Ahh, typo or semething in the readme. It goes in
checkout_payment.js.php, not checkout_payment.php

I shoulda realized that the code located at line 104 was Javascript, duhh.

The readme for cc_cvv+encryption v1.7 otherwise known as CCCVV_ISSUE_START Selectable with card blacklist
is not up to date for OSC MAX, or plain ol' OSC either, I don't think. But I got it all thrashed together and it seems to work.

Whew!
Took me freakin 4.5 hours to get it all installed. There were a lot of bits and pieces to add to the MAX files.

I hope the next version of OSC has an easier way to install contribs!

Tim