Re: Paypal Payment options disappeared from admin menue
Then I have this main error to get my website through to taking payments.
Ive been recreating the error and using Chrome Inspect. I dont really know what Im doing or whether this is useful but this is what comes back
Exception: ReferenceError: zcJS is not defined at collectsCardDataOnsite (https://www.xxx.co.uk/checkout_payment:63:2) at check_form (https://www.xxx.co.uk/checkout_payment:716:11) at HTMLFormElement.<anonymous> (https://www.xxx.co.uk/checkout_payment:92:32) at HTMLFormElement.dispatch (https://ajax.googleapis.com/ajax/lib...min.js:2:43090) at HTMLFormElement.v.handle (https://ajax.googleapis.com/ajax/lib...min.js:2:41074)
this: Window
paymentValue: "paypalwpp"
DOMException: Failed to execute 'querySelectorAll' on 'Element': '\' is not a valid selector.
It doesnt seem to like ... If (formPassed == false)
Code:
function collectsCardDataOnsite(paymentValue)
{
zcJS.ajax({
url: "ajax.php?act=ajaxPayment&method=doesCollectsCardDataOnsite",
data: {paymentValue: paymentValue}
}).done(function( response ) {
if (response.data == true) {
var str = $('form[name="checkout_payment"]').serializeArray();
zcJS.ajax({
url: "ajax.php?act=ajaxPayment&method=prepareConfirmation",
data: str
}).done(function( response ) {
$('#checkoutPayment').hide();
$('#navBreadCrumb').html(response.breadCrumbHtml);
$('#checkoutPayment').before(response.confirmationHtml);
$(document).attr('title', response.pageTitle);
});
} else {
$('form[name="checkout_payment"]')[0].submit();
}
});
return false;
}
$(document).ready(function(){
$('form[name="checkout_payment"]').submit(function() {
$('.paymentSubmit').attr('disabled', true);
formPassed = check_form();
if (formPassed == false) {
$('.paymentSubmit').attr('disabled', false);
}
return formPassed;
});
});
Re: Paypal Payment options disappeared from admin menue
I found this ...
https://sourceforge.net/p/zencart-ge...e99e4eb46:1108
Is that the code I should have ? If the answer is yes.
Would it be better/easier to replace what is in my websites includes/modules/pages/checkout_payment/jscript_main.php with with the same file out of a zen cart v1.5.5 download ?
1 Attachment(s)
Re: Paypal Payment options disappeared from admin menue
These are the files I have in includes/modules/payment
Attachment 19782
Re: Paypal Payment options disappeared from admin menue
Quote:
Originally Posted by
toyseller
For those not sighted:
authorizenet.php
authorizenet_aim.php
authorizenet_echeck.php
cod.php
freecharger.php
linkpoint_api.php
moneyorder.php
nochex_apc.php
paypal.php
paypaldp.php
paypalwpp.php
I expect at least linkpoint_api.php to be a problem. There may be trouble with other modules, but linkpoint_api.php has specifically been identified as not compatible in future versions with higher php versions and even if/when modified for compatibility, the payment module was removed because it was not going to be further supported.
Recommendation is to remove includes/modules/payment/linkpoint_api.php and the accompanying language file(s) associated with it: includes/languages/english/modules/payment/linkpoint_api.php
That should either restore the admin modules payment window or at least provide more items in the list. If not, then check the error logs again looking at the myDEBUG-adm file(s) most recently created to see what issue(s) are identified. Note that the file will contain your admin directory name which really should not be shared publicly.
Re: Paypal Payment options disappeared from admin menue
Out of those selections I only use the Paypal options.
I used nochex and moneyorder a long time ago.
Have never had any of the other switched on.
I have never used linkpoint. I dont know what it is.
Do you still think I should remove it ?
1 Attachment(s)
Re: Paypal Payment options disappeared from admin menue
These are the only 2 options I give as a choice for customers ...
Attachment 19783
1 Attachment(s)
Re: Paypal Payment options disappeared from admin menue
This is all I have showing up in admin
Attachment 19786
1 Attachment(s)
Re: Paypal Payment options disappeared from admin menue
Wow ... I renamed the linkpoint files ... and the paypal options have reappeared !!!
Attachment 19787
Re: Paypal Payment options disappeared from admin menue
Do I have to change the function "CollectsCardDataOnsite" to function "doesCollectCardDataOnsite"
in includes/modules/pages/checkout_payment/jscript_main.php
re: this https://www.zen-cart.com/showthread....t-Thread/page7
If so, I assume that "doesCollectCardDataOnsite" has to replace the old "collectsCardDataOnsite" rather than be included with it.
Re: Paypal Payment options disappeared from admin menue
Thank you for your help.
However Im still stuck with a non-working website with no clue how to move forward.
Not sure if I should be copying in any files I find for paypal from a v155 download.
I think it the code stops on return formPassed.
I just know that clicking either of the paypal radio buttons for payment doesnt move the payment forward.
Code:
function methodSelect(theMethod) {
if (document.getElementById(theMethod)) {
document.getElementById(theMethod).checked = 'checked';
}
}
function doesCollectsCardDataOnsite(paymentValue)
{
if ($('#'+paymentValue+'_collects_onsite').val()) {
if($('#pmt-'+paymentValue).is(':checked')) {
return true;
}
}
return false;
}
function doCollectsCardDataOnsite()
{
var str = $('form[name="checkout_payment"]').serializeArray();
zcJS.ajax({
url: "ajax.php?act=ajaxPayment&method=prepareConfirmation",
data: str
}).done(function( response ) {
$('#checkoutPayment').hide();
$('#navBreadCrumb').html(response.breadCrumbHtml);
$('#checkoutPayment').before(response.confirmationHtml);
$(document).attr('title', response.pageTitle);
});
}
$(document).ready(function(){
$('form[name="checkout_payment"]').submit(function() {
$('#paymentSubmit').attr('disabled', true);
formPassed = check_form();
if (formPassed == false) {
$('#paymentSubmit').attr('disabled', false);
}
return formPassed;
});
});
//--></script>