dontech Posted July 16, 2005 Report Share Posted July 16, 2005 Nachdem ich das Contrib jetzt aufgetrieben habe und soweit installiert habe ich eine Fehlermeldung in der checkout_payment.php Warning: constant(): Couldn't find constant MODULE_PAYMENT_OT_PAYMENT_ALLOWED in /home/www/web111/html/includes/classes/payment.php on line 63 Fatal error: Call to undefined function: javascript_validation() in /home/www/web111/html/includes/classes/payment.php on line 137 Weiss jemand wo der Fehler liegt und was ich ?ndern muss ? Link to comment Share on other sites More sharing options...
nom Posted July 16, 2005 Report Share Posted July 16, 2005 Es fehlt eine Konstante in der Datenbank. insert into configuration (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ( 'MODULE_PAYMENT_OT_PAYMENT_ALLOWED', '', '6', '0', now() ); Link to comment Share on other sites More sharing options...
dontech Posted July 16, 2005 Author Report Share Posted July 16, 2005 Dankeeee !!! Damit ist ein Fehler weg. Die Fehlermeldung Fatal error: Call to undefined function: javascript_validation() in /home/www/web111/html/includes/classes/payment.php on line 137 erscheint immer noch. Der Code-Abschnitt um den es gehen m?sste lautet : 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; } Was muss ich denn da noch ?ndern ? Link to comment Share on other sites More sharing options...
nom Posted July 16, 2005 Report Share Posted July 16, 2005 Wo ist die Funktion javascript_validation() definiert?! Link to comment Share on other sites More sharing options...
dontech Posted July 17, 2005 Author Report Share Posted July 17, 2005 $js .= $GLOBALS[$class]->javascript_validation(); } Das m?sste es doch sein Link to comment Share on other sites More sharing options...
dontech Posted July 17, 2005 Author Report Share Posted July 17, 2005 Habe mir jetzt die Datei zum x-ten mal angeschaut und steige nicht durch. // class methods /* The following method is needed in the checkout_confirmation.php page due to a chicken and egg problem with the payment class and order class. The payment modules needs the order destination data for the dynamic status feature, and the order class needs the payment module title. The following method is a work-around to implementing the method in all payment modules available which would break the modules in the contributions section. This should be looked into again post 2.2. */ function update_status() { if (is_array($this->modules)) { if (is_object($GLOBALS[$this->selected_module])) { if (function_exists('method_exists')) { if (method_exists($GLOBALS[$this->selected_module], 'update_status')) { $GLOBALS[$this->selected_module]->update_status(); } } else { // PHP3 compatibility @call_user_method('update_status', $GLOBALS[$this->selected_module]); } } } } 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; } function selection() { $selection_array = array(); if (is_array($this->modules)) { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $selection = $GLOBALS[$class]->selection(); if (is_array($selection)) $selection_array[] = $selection; } } } return $selection_array; } Da ist auch die validation enthalten und soll die Daten weitergeben wenn ich das richtig verstanden habe. Aber warum das nun nicht mehr funktioniert ( ich komme ja nicht mehr dazu die Zahlungsweise auszuw?hlen, eas das Script ?berpr?fen sollte ?!? ) weiss ich leider nicht Link to comment Share on other sites More sharing options...
dontech Posted July 17, 2005 Author Report Share Posted July 17, 2005 Habe das Problem ( wahrscheinlich...) gel?st . Die OT-Payment muss noch in zig andere Ordner rein... Daf?r taucht jetzt ein neuer Fehler auf Fatal error: Cannot redeclare class ot_payment in /home/www/web111/html/includes/modules/payment/ot_payment.php on line 19 weiss jemand was das bedeutet ? Der Code von Zeile 19 lautet : class ot_payment { var $title, $output; Link to comment Share on other sites More sharing options...
nom Posted July 17, 2005 Report Share Posted July 17, 2005 Jetzt sehe ich die Ursache aller deiner Probleme :laugh: Die ot_payment Modul geh?rt in den Ordner order_total und nicht in payment. Link to comment Share on other sites More sharing options...
dontech Posted July 18, 2005 Author Report Share Posted July 18, 2005 Wenn ich die OT_Pament aber aus dem Ordner Payment entferne Erscheint wieder eine Fehlermeldung... Warning: payment(): Failed opening '/home/www/web111/html/includes/modules/payment/ot_payment.php' for inclusion (include_path='.:/usr/share/php') in /home/www/web111/html/includes/classes/payment.php on line 71 Link to comment Share on other sites More sharing options...
dontech Posted July 18, 2005 Author Report Share Posted July 18, 2005 Und der n?chste Versuch... Alles gel?scht und wieder hochgeladen... Nun erscheint wieder : Fatal error: Call to undefined function: javascript_validation() in /home/www/web111/html/includes/classes/payment.php on line 137 Langsam glaube ich das Contrib will mich ?rgern Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.