Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

kittmaster

Archived
  • Posts

    100
  • Joined

  • Last visited

Everything posted by kittmaster

  1. Hopefully this isn't considered a cross post since it APPLIES THE SAME CONTRIBUTION (MODS) I've added the osCommerce Credit Class and Gift Voucher "Easier to Understand" Payment Addon v1.2 Everything works as far as can be seen, but this is the error........i've tried searching for the function on line 84 with this part of the function flagging the error Warning: Missing argument 1 for javascript_validation() in /homepages/2/XXXXXXXXXXX/htdocs/GForce/shopping/includes/classes/payment.php on line 84..........Line 84 is where the function javascript_validation($coversAll) { begins // #################### Begin Added CGV JONYO ###################### // function javascript_validation() { function javascript_validation($coversAll) { //added the $coversAll to be able to pass whether or not the voucher will cover the whole //price or not. If it does, then let checkout proceed when just it is passed. $js = ''; if (is_array($this->modules)) { if ($coversAll) { $addThis='if (document.checkout_payment.cot_gv.checked) { payment_value=cot_gv; alert (\'hey yo\'); } else '; } else { $addThis=''; } $js = '<script language="javascript"><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var payment_value = null;' . "\n" .$addThis . //added by jonyo, yo ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } // ############ Added CCGV Contribution ########## // $js .= "\n" . ' if (payment_value == null) {' . "\n" . $js .= "\n" . ' if (payment_value == null && submitter != 1) {' . "\n" . // CCGV Contribution // ############ End Added CCGV Contribution ########## ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . // ############ Added CCGV Contribution ########## // ICW CREDIT CLASS Gift Voucher System Line below amended // ' if (error == 1) {' . "\n" . ' if (error == 1 && submitter != 1) {' . "\n" . // ############ End Added CCGV Contribution ########## ' alert(error_message);' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '//--></script>' . "\n"; } return $js; } // #################### End Added CGV JONYO ######################
  2. I found that if I used another version that is slightly modified to a "purer" form?? that it kills the error.......it seems the java arguement is invalid or I missed something. Here is the code that kills the error but I'm sure the mod isn't 100%...........any ideas ......??? function javascript_validation() { $js = ''; if (is_array($this->modules)) { $js = '<script language="javascript"><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var payment_value = null;' . "\n" . ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } $js .= "\n" . ' if (payment_value == null) {' . "\n" . ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . ' if (error == 1 && submitter != 1) {' . "\n" . // GV Code Start/End ' alert(error_message);' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '//--></script>' . "\n"; } return $js; }
  3. Ok I've added the osCommerce Credit Class and Gift Voucher "Easier to Understand" Payment Addon v1.2 Everything works as far as can be seen, but this is the error........i've tried searching for the function on line 84 with this part of the function flagging the error Warning: Missing argument 1 for javascript_validation() in /homepages/2/XXXXXXXXXXX/htdocs/GForce/shopping/includes/classes/payment.php on line 84..........Line 84 is where the function javascript_validation($coversAll) { begins // #################### Begin Added CGV JONYO ###################### // function javascript_validation() { function javascript_validation($coversAll) { //added the $coversAll to be able to pass whether or not the voucher will cover the whole //price or not. If it does, then let checkout proceed when just it is passed. $js = ''; if (is_array($this->modules)) { if ($coversAll) { $addThis='if (document.checkout_payment.cot_gv.checked) { payment_value=cot_gv; alert (\'hey yo\'); } else '; } else { $addThis=''; } $js = '<script language="javascript"><!-- ' . "\n" . 'function check_form() {' . "\n" . ' var error = 0;' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var payment_value = null;' . "\n" .$addThis . //added by jonyo, yo ' if (document.checkout_payment.payment.length) {' . "\n" . ' for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" . ' if (document.checkout_payment.payment[i].checked) {' . "\n" . ' payment_value = document.checkout_payment.payment[i].value;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else if (document.checkout_payment.payment.checked) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' } else if (document.checkout_payment.payment.value) {' . "\n" . ' payment_value = document.checkout_payment.payment.value;' . "\n" . ' }' . "\n\n"; reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $js .= $GLOBALS[$class]->javascript_validation(); } } // ############ Added CCGV Contribution ########## // $js .= "\n" . ' if (payment_value == null) {' . "\n" . $js .= "\n" . ' if (payment_value == null && submitter != 1) {' . "\n" . // CCGV Contribution // ############ End Added CCGV Contribution ########## ' error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n\n" . // ############ Added CCGV Contribution ########## // ICW CREDIT CLASS Gift Voucher System Line below amended // ' if (error == 1) {' . "\n" . ' if (error == 1 && submitter != 1) {' . "\n" . // ############ End Added CCGV Contribution ########## ' alert(error_message);' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '//--></script>' . "\n"; } return $js; } // #################### End Added CGV JONYO ###################### Thanks
  4. im having the same issue........... :(
  5. Hi guys I've checked and rechecked and I keep gettin this error..........driving me nuts.......what is wrong?? Fatal error: Cannot instantiate non-existent class: splitvendorpageresults in /homepages/2/XXXXXXXXXXXXx/htdocs/GForce/shopping/vendor.php on line 157 I looked at the split_file.php and the vendor.php and nothing fits or can be seen what is wrong..........HELP!! Chris UPDATE: Found if i comment that line out it seems to work, but I'm sure not as designed............I'm leaving it for now but I'd like official comment about what I just did and what the real fix is to make this contrib 100%.........thanks
×
×
  • Create New...