Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

checkout error please help


judoka

Recommended Posts

Hi I was wonder if someone could please help me with this problem. I need to get this resolve so that I can go live. I just uploaded my website up to my host and now I am having the following problem. :( When I try to make a test purchase and I click on continue to go to the payment information screen all I get is a blank screen. In my cpanel I get the following error message:

 

PHP Fatal error: Call to undefined function: javascript_validation() in /home2/giftttny/public_html/catalog/includes/classes/payment.php on line 82

 

When I look at my payment.php file this is line 82

 

$js .= $GLOBALS[$class]->javascript_validation();

 

I'm not 100% sure where I need to go to check on this validation but I have look in all the usual place, english.php, configure.php etc. but not really knowing what I am looking for, I'm really just kind of shooting in the dark hoping that something will just pop out at me. I've search in the forum hoping to find something but no luck. I have even cut and paste most of the above file from my local machine to the live host file hoping to fix the problem but no luck there either. But the funny thing is that everything is working ok on my local machine :roll:

Could someone please help me figure this one out? :cry:

Thank you for any and all help.

Jose :)

Link to comment
Share on other sites

Sorry... I only read the first part of the error.... you have an incompatible version of payment.php... probably came with a contribution... it should contain the function:

 

    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" .

             '  }' . "nn";



       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" .

              '  }' . "nn" .

              '  if (error == 1) {' . "n" .

              '    alert(error_message);' . "n" .

              '    return false;' . "n" .

              '  } else {' . "n" .

              '    return true;' . "n" .

              '  }' . "n" .

              '}' . "n" .

              '//--></script>' . "n";

     }



     return $js;

   }

Link to comment
Share on other sites

Thanks Matti, I found what was causing the problem. It was the free shipping module that was casing the problem now I need to figure out why. :roll: I do appreciate your help and hope I can return the favor sometime :D :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...