Bestelbevestiging
Bug in VM 1.1.5 for SSL on PHP 5.3?
Error "Undefined Index: 3" trying to use the "Call for Pricing" feature.
Waar het op neer komt is dat sinds PHP 5.3 dit standaard in de .ini staat php_value error_reporting "E_ALL ^ E_NOTICE"
Wat dus inhoud dat hij die notice aangeeft. Een oplossing is om $payment_code = ""; te doen zodat het gewoon een lege string is. Dan ben je dus van die notice af. Let wel dit heb ik van een spaanse blog :D
En dat staat in deze map
www/administrator/components/com_virtuemart/classes/payment
En dan heet het de klasse ps_payment.
Zoek daar $payment_code op en maak er $payment_code = ""; van en de notice zou weg moeten zijn zonder dat je de meldingen onderdrukt mer error_reporting(0);
Gewijzigd op 21/05/2012 13:01:34 door Chris PHP
wel heb ik iets kunnen vinden in checkout.php
Heb je mijn eerdere oplossing al geprobeerd?
nog niet, zal ik zo direkt doen.
dan laat ik het weer weten
@Rene, dan moet je het er gewooon zo in plaatsen bij de ps_payment.
Jouw oplossing heeft helaas niet gewerkt.
Je kunt of de melding gewoon onderdrukken, of $payment_code declareren aan een lege string (= "").
kan je de foutmelding niet onderdrukken met @ ?
Als ik dit in ps_payment.php in plaats dan komt er een andere foutmelding. Geeft een foutmelding in ps_payment.php op de regel waar ik jouw oplossing heb geplaatst.
Ik ga eerst de error reporting weer aanzetten zodat mijn klanten dit niet meer zien.
De info die ik heb komt van de officiele site van virtuemart.
P.S. je zet error reporting uit als je klanten het niet zien :P error_reporting(0);
Toevoeging op 22/05/2012 12:14:09:
P.P.S. jij draait op versie 1.1.9, maar ze zijn al bij 2.0. Misschien overstappen naar een hogere variant?
virtuemart.net/downloads
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
*
* @version $Id: ps_payment.php 1095 2007-12-19 20:19:16Z soeren_nb $
* @package VirtueMart
* @subpackage payment
* @copyright Copyright (C) 2004-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
/**
*
* The ps_payment class, containing the default payment processing code
* for payment methods that have no own class
*
*/
class ps_payment {
var $classname = "ps_payment";
/**
* Show all configuration parameters for this payment method
* @returns boolean False when the Payment method has no configration
*/
function show_configuration() {
/* ... */
}
function has_configuration() {
// return false if there's no configuration
return false;
}
/**
* Returns the "is_writeable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_writeable() {
return is_writeable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Returns the "is_readable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_readable() {
return is_readable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Writes the configuration file for this payment method
* @param array An array of objects
* @returns boolean True when writing was successful
*/
function write_configuration( &$d ) {
/* ... */
}
/**************************************************************************
** name: process_payment()
** returns:
***************************************************************************/
function process_payment($order_number, $order_total, &$d) {
return true;
}
}[code]<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
*
* @version $Id: ps_payment.php 1095 2007-12-19 20:19:16Z soeren_nb $
* @package VirtueMart
* @subpackage payment
* @copyright Copyright (C) 2004-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
/**
*
* The ps_payment class, containing the default payment processing code
* for payment methods that have no own class
*
*/
class ps_payment {
var $classname = "ps_payment";
/**
* Show all configuration parameters for this payment method
* @returns boolean False when the Payment method has no configration
*/
function show_configuration() {
/* ... */
}
function has_configuration() {
// return false if there's no configuration
return false;
}
/**
* Returns the "is_writeable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_writeable() {
return is_writeable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Returns the "is_readable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_readable() {
return is_readable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Writes the configuration file for this payment method
* @param array An array of objects
* @returns boolean True when writing was successful
*/
function write_configuration( &$d ) {
/* ... */
}
/**************************************************************************
** name: process_payment()
** returns:
***************************************************************************/
function process_payment($order_number, $order_total, &$d) {
return true;
}
}[/url]
[size=xsmall][i]Toevoeging op 22/05/2012 12:49:11:[/i][/size]
Dit is dus de complete code van ps_payment
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
*
* @version $Id: ps_payment.php 1095 2007-12-19 20:19:16Z soeren_nb $
* @package VirtueMart
* @subpackage payment
* @copyright Copyright (C) 2004-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
/**
*
* The ps_payment class, containing the default payment processing code
* for payment methods that have no own class
*
*/
class ps_payment {
var $classname = "ps_payment";
/**
* Show all configuration parameters for this payment method
* @returns boolean False when the Payment method has no configration
*/
function show_configuration() {
/* ... */
}
function has_configuration() {
// return false if there's no configuration
return false;
}
/**
* Returns the "is_writeable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_writeable() {
return is_writeable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Returns the "is_readable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_readable() {
return is_readable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Writes the configuration file for this payment method
* @param array An array of objects
* @returns boolean True when writing was successful
*/
function write_configuration( &$d ) {
/* ... */
}
/**************************************************************************
** name: process_payment()
** returns:
***************************************************************************/
function process_payment($order_number, $order_total, &$d) {
return true;
}
}[code]<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
*
* @version $Id: ps_payment.php 1095 2007-12-19 20:19:16Z soeren_nb $
* @package VirtueMart
* @subpackage payment
* @copyright Copyright (C) 2004-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
/**
*
* The ps_payment class, containing the default payment processing code
* for payment methods that have no own class
*
*/
class ps_payment {
var $classname = "ps_payment";
/**
* Show all configuration parameters for this payment method
* @returns boolean False when the Payment method has no configration
*/
function show_configuration() {
/* ... */
}
function has_configuration() {
// return false if there's no configuration
return false;
}
/**
* Returns the "is_writeable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_writeable() {
return is_writeable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Returns the "is_readable" status of the configuration file
* @param void
* @returns boolean True when the configuration file is writeable, false when not
*/
function configfile_readable() {
return is_readable( CLASSPATH."payment/".$this->classname.".cfg.php" );
}
/**
* Writes the configuration file for this payment method
* @param array An array of objects
* @returns boolean True when writing was successful
*/
function write_configuration( &$d ) {
/* ... */
}
/**************************************************************************
** name: process_payment()
** returns:
***************************************************************************/
function process_payment($order_number, $order_total, &$d) {
return true;
}
}[/url]
[size=xsmall][i]Toevoeging op 22/05/2012 12:49:11:[/i][/size]
Dit is dus de complete code van ps_payment
Zoals ik al in een eerdere post aangaf, voeg var $payment_code = ""; toe aan de ps_payment class, op beide plaatsen! Tenzij je per ongelijk 2x gepaste hebt. En aan de code te zien wel!
Doe het dus zo en het probleem is opgelost.
Code (php)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
<?php
class ps_payment {
var $classname = "ps_payment";
var $payment_code = "";
/**
* Show all configuration parameters for this payment method
* @returns boolean False when the Payment method has no configration
*/
?>
class ps_payment {
var $classname = "ps_payment";
var $payment_code = "";
/**
* Show all configuration parameters for this payment method
* @returns boolean False when the Payment method has no configration
*/
?>
Gewijzigd op 23/05/2012 07:41:28 door Chris PHP
ik heb net de code ingevoerd en een testbestelling geplaatst, geen foutmelding meer.:-)
Oh ja, ik wel eerst de errorreporting uitgezet.;-)
Ik ben nog het een en ander aan het testen, waarschijnlijk dat ik mij nog een keer meld met een klein probleempje.
Voor nu eerst ontzettend bedankt voor jullie medewerking. TOP!!!!!
Mooi, dan is dat 'probleem' getackelt ;)
Succes!