NOP Shopping Cart Hulp!!
http://www.nopdesign.com/freecart/ een gratis werkende Shop gedownload en geinstalleerd.
Alles perfect in de Engelse uitvoering vanaf het bestellen tot het bekijken van de winkelwagen en het toevoegen of verwijderen van artikelen.
Alleen wanneer ik op "CheckOut" klik en de Nederlandse versie installeer dan wordt ik doorverwezen naar een PhP Script die ervoor zorg draagt dat ik automatisch een ordermail ontvang waarbij plotseling de bestelde artikelen en de tarieven er niet meer in staan.
Nu heb ik nog nooit met PhP gewerkt en vraag me dan ook af wat ik fout doe. Gebruikt toevalligiemand dit script en kan iemand mij vertellen wat ik fout doe??
Alvast dank voor de suggesties c.q. oplossing.
Ik heb op Alles perfect in de Engelse uitvoering vanaf het bestellen tot het bekijken van de winkelwagen en het toevoegen of verwijderen van artikelen.
Alleen wanneer ik op "CheckOut" klik en de Nederlandse versie installeer dan wordt ik doorverwezen naar een PhP Script die ervoor zorg draagt dat ik automatisch een ordermail ontvang waarbij plotseling de bestelde artikelen en de tarieven er niet meer in staan.
Nu heb ik nog nooit met PhP gewerkt en vraag me dan ook af wat ik fout doe. Gebruikt toevalligiemand dit script en kan iemand mij vertellen wat ik fout doe??
Alvast dank voor de suggesties c.q. oplossing.
Zou je eens kunnen kijken mocht je tijd hebben. Ik heb namelijk nooit met PhP gewerkt!
Als je dit zo hebt gedownload, zonder eigen aanpassingen dan zou ik het eerder als bug beschouwen die je aan de makers moet doorgeven.
http://regio.tv/testshop/index.html
Wanneer op het laatste alles is ingevuld, ontvang ik een mail van de order, echter zie ik daar het aantal, de prijs en de verzendkosten niet op terug.
Wanneer ik echter de normale Engelse taal instel dan werkt alles prima.
Onderstaand het PhP script zoals ik het u gebruik :
Ik heb een testshop met 1 artikel gemaakt op Wanneer op het laatste alles is ingevuld, ontvang ik een mail van de order, echter zie ik daar het aantal, de prijs en de verzendkosten niet op terug.
Wanneer ik echter de normale Engelse taal instel dan werkt alles prima.
Onderstaand het PhP script zoals ik het u gebruik :
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<?php
$admin_email = '[email protected]';
$admin_subject = 'Nieuwe bestelling';
$customer_subject = 'Uw boek is besteld';
$success_url = 'shop_success.html';
$error_url = 'shop_error.html';
$csv_file = './orders.csv';
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
$billing_first = isset($_POST['billing_first']) ? $_POST['billing_first'] : '';
$billing_last = isset($_POST['billing_last']) ? $_POST['billing_last'] : '';
$billing_address = isset($_POST['billing_address']) ? $_POST['billing_address'] : '';
$billing_address2 = isset($_POST['billing_address2']) ? $_POST['billing_address2'] : '';
$billing_city = isset($_POST['billing_city']) ? $_POST['billing_city'] : '';
$billing_state = isset($_POST['billing_state']) ? $_POST['billing_state'] : '';
$billing_zip = isset($_POST['billing_zip']) ? $_POST['billing_zip'] : '';
$billing_phone = isset($_POST['billing_phone']) ? $_POST['billing_phone'] : '';
$billing_fax = isset($_POST['billing_fax']) ? $_POST['billing_fax'] : '';
$billing_email = isset($_POST['billing_email']) ? $_POST['billing_email'] : '';
$shipping_first = isset($_POST['shipping_first']) ? $_POST['shipping_first'] : '';
$shipping_last = isset($_POST['shipping_last']) ? $_POST['shipping_last'] : '';
$shipping_address = isset($_POST['shipping_address']) ? $_POST['shipping_address'] : '';
$shipping_address2 = isset($_POST['shipping_address2']) ? $_POST['shipping_address2'] : '';
$shipping_city = isset($_POST['shipping_city']) ? $_POST['shipping_city'] : '';
$shipping_state = isset($_POST['shipping_state']) ? $_POST['shipping_state'] : '';
$shipping_zip = isset($_POST['shipping_zip']) ? $_POST['shipping_zip'] : '';
$shipping_phone = isset($_POST['shipping_phone']) ? $_POST['shipping_phone'] : '';
$shipping_fax = isset($_POST['shipping_fax']) ? $_POST['shipping_fax'] : '';
$SUBTOTAL = isset($_POST['SUBTOTAL']) ? $_POST['SUBTOTAL'] : '';
$TOTAL = isset($_POST['TOTAL']) ? $_POST['TOTAL'] : '';
$TAX = isset($_POST['TAX']) ? $_POST['TAX'] : '';
$SHIPPING = isset($_POST['SHIPPING']) ? $_POST['SHIPPING'] : '';
$comments = isset($_POST['comments']) ? $_POST['comments'] : '';;
if (($billing_first == '') || ($billing_last == '') || ($billing_address == '') || ($billing_city == '') || ($billing_state == '') || ($billing_zip == '') || ($billing_phone == '') || ($billing_email == ''))
{
// invalid input
header('Location: '. $error_url);
exit;
}
if (!preg_match('/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i', $billing_email))
{
// invalid email address
header('Location: '. $error_url);
exit;
}
$today = date("l, F jS Y");
$message = "";
$message .= "U heeft een nieuwe bestelling ontvangen. Onderstand treft u meer gegevens aan over deze bestelling.\n";
$message .= "\n";
$message .= "Besteldatum: $today \n";
$message .= " \n";
$message .= "Betaalinformatie: \n";
$message .= "-------- \n";
$message .= " $billing_first $billing_last \n";
$message .= " $billing_address \n";
$message .= " $billing_address2 \n";
$message .= " $billing_city, $billing_state $billing_zip \n";
$message .= " $billing_phone \n";
$message .= " $billing_fax \n";
$message .= " $billing_email \n";
$message .= " \n";
$message .= " \n";
if ($shipping_first != '')
{
$message .= "Verzenden naar: \n";
$message .= "-------- \n";
$message .= " $shipping_first $shipping_last \n";
$message .= " $shipping_addr \n";
$message .= " $shipping_addr2 \n";
$message .= " $shipping_city, $shipping_state $shipping_zip \n";
$message .= " $shipping_phone \n";
$message .= " \n";
$message .= " \n";
}
$message .= "Aantal Prijs(\€) Product ID - Artikel\n";
$message .= "===================================================================== \n";
for ($i = 1; $i< 25; $i++)
{
if (isset($_POST['NAME_' . $i]))
{
$name = $_POST['NAME_' . $i];
$quantity = $_POST['QUANTITY_' . $i];
$price = $_POST['PRICE_' . $i];
$id = $_POST['ID_' . $i];
$addtlinfo = $_POST['ADDTLINFO_' . $i];
$message .= "$quantity \$$price $id - $name $addtlinfo \n";
}
}
$message .= "===================================================================== \n";
$message .= "SUBTOTAAL: $SUBTOTAL \n";
$message .= "TOTAAL: $TOTAL \n";
$message .= "\n";
$message .= "VERZENDKOSTEN: $SHIPPING \n";
$message .= "\n\n";
$message .= "Extra Informatie: \n";
$message .= "--------- \n";
$message .= "$comments \n";
$message .= " \n";
// write to log
foreach ($_POST as $key => $value)
{
$logdata .= ',';
$logdata .= str_replace(",", " ", $value);
}
$logdata = str_replace("\r", "", $logdata);
$logdata = str_replace("\n", " ", $logdata);
$logdata .= "\r\n";
$handle = fopen($csv_file, 'a') or die("can't open csv file");
fwrite($handle, date("Y-m-d H:i:s,"));
fwrite($handle, $_SERVER['REMOTE_ADDR']);
fwrite($handle, $logdata);
fclose($handle);
// send message to admin
$header = "From: $billing_email\r\n";
$header .= "Reply-To: $billing_email\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "X-Mailer: PHP Mail generated by: NOP Shopping Cart\r\n";
mail($admin_email, $admin_subject, $message, $header);
// send message to customer
$header = "From: $admin_email\r\n";
$header .= "Reply-To: $admin_email\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "X-Mailer: PHP Mail generated by: NOP Shopping Cart\r\n";
mail($billing_email, $customer_subject, $message, $header);
header('Location: '.$success_url);
exit;
}
?>
$admin_email = '[email protected]';
$admin_subject = 'Nieuwe bestelling';
$customer_subject = 'Uw boek is besteld';
$success_url = 'shop_success.html';
$error_url = 'shop_error.html';
$csv_file = './orders.csv';
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
$billing_first = isset($_POST['billing_first']) ? $_POST['billing_first'] : '';
$billing_last = isset($_POST['billing_last']) ? $_POST['billing_last'] : '';
$billing_address = isset($_POST['billing_address']) ? $_POST['billing_address'] : '';
$billing_address2 = isset($_POST['billing_address2']) ? $_POST['billing_address2'] : '';
$billing_city = isset($_POST['billing_city']) ? $_POST['billing_city'] : '';
$billing_state = isset($_POST['billing_state']) ? $_POST['billing_state'] : '';
$billing_zip = isset($_POST['billing_zip']) ? $_POST['billing_zip'] : '';
$billing_phone = isset($_POST['billing_phone']) ? $_POST['billing_phone'] : '';
$billing_fax = isset($_POST['billing_fax']) ? $_POST['billing_fax'] : '';
$billing_email = isset($_POST['billing_email']) ? $_POST['billing_email'] : '';
$shipping_first = isset($_POST['shipping_first']) ? $_POST['shipping_first'] : '';
$shipping_last = isset($_POST['shipping_last']) ? $_POST['shipping_last'] : '';
$shipping_address = isset($_POST['shipping_address']) ? $_POST['shipping_address'] : '';
$shipping_address2 = isset($_POST['shipping_address2']) ? $_POST['shipping_address2'] : '';
$shipping_city = isset($_POST['shipping_city']) ? $_POST['shipping_city'] : '';
$shipping_state = isset($_POST['shipping_state']) ? $_POST['shipping_state'] : '';
$shipping_zip = isset($_POST['shipping_zip']) ? $_POST['shipping_zip'] : '';
$shipping_phone = isset($_POST['shipping_phone']) ? $_POST['shipping_phone'] : '';
$shipping_fax = isset($_POST['shipping_fax']) ? $_POST['shipping_fax'] : '';
$SUBTOTAL = isset($_POST['SUBTOTAL']) ? $_POST['SUBTOTAL'] : '';
$TOTAL = isset($_POST['TOTAL']) ? $_POST['TOTAL'] : '';
$TAX = isset($_POST['TAX']) ? $_POST['TAX'] : '';
$SHIPPING = isset($_POST['SHIPPING']) ? $_POST['SHIPPING'] : '';
$comments = isset($_POST['comments']) ? $_POST['comments'] : '';;
if (($billing_first == '') || ($billing_last == '') || ($billing_address == '') || ($billing_city == '') || ($billing_state == '') || ($billing_zip == '') || ($billing_phone == '') || ($billing_email == ''))
{
// invalid input
header('Location: '. $error_url);
exit;
}
if (!preg_match('/^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i', $billing_email))
{
// invalid email address
header('Location: '. $error_url);
exit;
}
$today = date("l, F jS Y");
$message = "";
$message .= "U heeft een nieuwe bestelling ontvangen. Onderstand treft u meer gegevens aan over deze bestelling.\n";
$message .= "\n";
$message .= "Besteldatum: $today \n";
$message .= " \n";
$message .= "Betaalinformatie: \n";
$message .= "-------- \n";
$message .= " $billing_first $billing_last \n";
$message .= " $billing_address \n";
$message .= " $billing_address2 \n";
$message .= " $billing_city, $billing_state $billing_zip \n";
$message .= " $billing_phone \n";
$message .= " $billing_fax \n";
$message .= " $billing_email \n";
$message .= " \n";
$message .= " \n";
if ($shipping_first != '')
{
$message .= "Verzenden naar: \n";
$message .= "-------- \n";
$message .= " $shipping_first $shipping_last \n";
$message .= " $shipping_addr \n";
$message .= " $shipping_addr2 \n";
$message .= " $shipping_city, $shipping_state $shipping_zip \n";
$message .= " $shipping_phone \n";
$message .= " \n";
$message .= " \n";
}
$message .= "Aantal Prijs(\€) Product ID - Artikel\n";
$message .= "===================================================================== \n";
for ($i = 1; $i< 25; $i++)
{
if (isset($_POST['NAME_' . $i]))
{
$name = $_POST['NAME_' . $i];
$quantity = $_POST['QUANTITY_' . $i];
$price = $_POST['PRICE_' . $i];
$id = $_POST['ID_' . $i];
$addtlinfo = $_POST['ADDTLINFO_' . $i];
$message .= "$quantity \$$price $id - $name $addtlinfo \n";
}
}
$message .= "===================================================================== \n";
$message .= "SUBTOTAAL: $SUBTOTAL \n";
$message .= "TOTAAL: $TOTAL \n";
$message .= "\n";
$message .= "VERZENDKOSTEN: $SHIPPING \n";
$message .= "\n\n";
$message .= "Extra Informatie: \n";
$message .= "--------- \n";
$message .= "$comments \n";
$message .= " \n";
// write to log
foreach ($_POST as $key => $value)
{
$logdata .= ',';
$logdata .= str_replace(",", " ", $value);
}
$logdata = str_replace("\r", "", $logdata);
$logdata = str_replace("\n", " ", $logdata);
$logdata .= "\r\n";
$handle = fopen($csv_file, 'a') or die("can't open csv file");
fwrite($handle, date("Y-m-d H:i:s,"));
fwrite($handle, $_SERVER['REMOTE_ADDR']);
fwrite($handle, $logdata);
fclose($handle);
// send message to admin
$header = "From: $billing_email\r\n";
$header .= "Reply-To: $billing_email\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "X-Mailer: PHP Mail generated by: NOP Shopping Cart\r\n";
mail($admin_email, $admin_subject, $message, $header);
// send message to customer
$header = "From: $admin_email\r\n";
$header .= "Reply-To: $admin_email\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "X-Mailer: PHP Mail generated by: NOP Shopping Cart\r\n";
mail($billing_email, $customer_subject, $message, $header);
header('Location: '.$success_url);
exit;
}
?>
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Winkelwagen</title>
<style type="text/css">
body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
text-align: center;
}
div#container
{
margin-left: auto;
margin-right: auto;
width: 50em;
text-align: left;
}
}
input
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.title
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #006600;
}
.blacktext
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.nobr
{
white-space: nowrap;
}
.nopcart
{
background: #464444;
border: 1px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #ffffff;
}
.nopheader
{
background: #464444;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
}
.nopentry
{
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.noptotal
{
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.nopbutton
{
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
</style>
<script type="text/javascript" src="./language-en.js"></script>
<script type="text/javascript" src="./nopcart.js"></script>
<script type="text/javascript">
function CheckForm(theform)
{
var bMissingFields = false;
var strFields = "";
if (theform.billing_first.value == '')
{
bMissingFields = true;
strFields += " Billing: First Name\n";
}
if (theform.billing_last.value == '')
{
bMissingFields = true;
strFields += " Billing: Last Name\n";
}
if (theform.billing_address.value == '')
{
bMissingFields = true;
strFields += " Billing: Address\n";
}
if (theform.billing_city.value == '')
{
bMissingFields = true;
strFields += " Billing: City\n";
}
if (theform.billing_state.value == '')
{
bMissingFields = true;
strFields += " Billing: State\n";
}
if (theform.billing_zip.value == '')
{
bMissingFields = true;
strFields += " Billing: Zipcode\n";
}
if (theform.billing_phone.value == '')
{
bMissingFields = true;
strFields += " Billing: Phone\n";
}
if (theform.billing_email.value == '')
{
bMissingFields = true;
strFields += " Billing: Email\n";
}
if (bMissingFields)
{
alert("We're sorry, but you must provide the following field(s) before continuing:\n" + strFields);
return false;
}
return true;
}
</script>
</head>
<body>
<div id="container">
<blockquote>
<form method="post" action="<?php echo basename(__FILE__); ?>" onsubmit="return CheckForm(this)">
<span class="nobr">
<script type="text/javascript">
CheckoutCart();
</script>
</span>
<br>
<p><span class="blacktext"><b>Voer onderstaand uw gegevens in om uw order te kunnen verzenden.</b></span></p>
<p><span class="title"><b>Betaal Informatie:</b></span></p>
<table class="blacktext">
<tr><td>Naam: </td><td><input type="text" size="18" name="billing_first"> <input type="text" size="15" name="billing_last"></td></tr>
<tr><td>Adres: </td><td><input type="text" size="37" name="billing_address"></td></tr>
<tr><td>Plaats: </td><td><input type="text" size="21" name="billing_city"></td></tr>
<tr><td>Provincie: </td><td><input type="text" size="1" name="billing_state"></td></tr>
<tr><td>Postcode: </td><td><input type="text" size="5" name="billing_zip"></td></tr>
<tr><td>Telefoon: </td><td><input type="text" size="37" name="billing_phone"></td></tr>
<tr><td>Email: </td><td><input type="text" size="37" name="billing_email"></td></tr>
</table>
<p><input type="submit" value="Bestellen"> <input type="reset" value="Annuleren"></p>
</form>
</blockquote>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Winkelwagen</title>
<style type="text/css">
body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
text-align: center;
}
div#container
{
margin-left: auto;
margin-right: auto;
width: 50em;
text-align: left;
}
}
input
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.title
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #006600;
}
.blacktext
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.nobr
{
white-space: nowrap;
}
.nopcart
{
background: #464444;
border: 1px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #ffffff;
}
.nopheader
{
background: #464444;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
}
.nopentry
{
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.noptotal
{
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
.nopbutton
{
background: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
</style>
<script type="text/javascript" src="./language-en.js"></script>
<script type="text/javascript" src="./nopcart.js"></script>
<script type="text/javascript">
function CheckForm(theform)
{
var bMissingFields = false;
var strFields = "";
if (theform.billing_first.value == '')
{
bMissingFields = true;
strFields += " Billing: First Name\n";
}
if (theform.billing_last.value == '')
{
bMissingFields = true;
strFields += " Billing: Last Name\n";
}
if (theform.billing_address.value == '')
{
bMissingFields = true;
strFields += " Billing: Address\n";
}
if (theform.billing_city.value == '')
{
bMissingFields = true;
strFields += " Billing: City\n";
}
if (theform.billing_state.value == '')
{
bMissingFields = true;
strFields += " Billing: State\n";
}
if (theform.billing_zip.value == '')
{
bMissingFields = true;
strFields += " Billing: Zipcode\n";
}
if (theform.billing_phone.value == '')
{
bMissingFields = true;
strFields += " Billing: Phone\n";
}
if (theform.billing_email.value == '')
{
bMissingFields = true;
strFields += " Billing: Email\n";
}
if (bMissingFields)
{
alert("We're sorry, but you must provide the following field(s) before continuing:\n" + strFields);
return false;
}
return true;
}
</script>
</head>
<body>
<div id="container">
<blockquote>
<form method="post" action="<?php echo basename(__FILE__); ?>" onsubmit="return CheckForm(this)">
<span class="nobr">
<script type="text/javascript">
CheckoutCart();
</script>
</span>
<br>
<p><span class="blacktext"><b>Voer onderstaand uw gegevens in om uw order te kunnen verzenden.</b></span></p>
<p><span class="title"><b>Betaal Informatie:</b></span></p>
<table class="blacktext">
<tr><td>Naam: </td><td><input type="text" size="18" name="billing_first"> <input type="text" size="15" name="billing_last"></td></tr>
<tr><td>Adres: </td><td><input type="text" size="37" name="billing_address"></td></tr>
<tr><td>Plaats: </td><td><input type="text" size="21" name="billing_city"></td></tr>
<tr><td>Provincie: </td><td><input type="text" size="1" name="billing_state"></td></tr>
<tr><td>Postcode: </td><td><input type="text" size="5" name="billing_zip"></td></tr>
<tr><td>Telefoon: </td><td><input type="text" size="37" name="billing_phone"></td></tr>
<tr><td>Email: </td><td><input type="text" size="37" name="billing_email"></td></tr>
</table>
<p><input type="submit" value="Bestellen"> <input type="reset" value="Annuleren"></p>
</form>
</blockquote>
</div>
</body>
</html>
- Aar -:
Gelieve in het vervolg bij code de [code][/code]-tags gebruiken.
Hier kan je meer lezen over de mogelijke opmaakcodes.
Alvast bedankt!
Hier kan je meer lezen over de mogelijke opmaakcodes.
Alvast bedankt!
Gewijzigd op 03/09/2015 09:54:31 door - Ariën -
Als je het zo gedownload hebt, zonder zelf het script te hebben gewijzigd, dan zou ik eerder een bug-melding doen bij de makers.
Nederlandse versie door Ron A.J. Hartendorp van Computer Network Services
evt. '3rd Party Payment Processor Support'
- Authorize.net
- WorldPay
- LinkPoint
Dat zie ik niet in dit script gebeuren
Dank voor de reacties maar ik heb het script door een ervaren PhP deskundige laten nakijken en nu werkt alles goed!
Programmaonderhoud van een programma is niet direct handig voor op een forum, je moet toch bij allerlei dingen kunnen om ze na te lopen en te testen met andere componenten.