Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

payment.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: payment.php 9407 2002-04-10 11:49:02Z br $
5 //
6 // Created on: <02-Feb-2001 16:31:53 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 unset( $PaymentSuccess );
28 // include_once( "ezuser/classes/ezuser.php" );
29
30 // include_once( "classes/INIFile.php" );
31 // include_once( "classes/ezhttptool.php" );
32 // include_once( "ezsession/classes/ezsession.php" );
33 // include_once( "eztrade/classes/ezcart.php" );
34 // include_once( "eztrade/classes/ezcheckout.php" );
35
36 $ini =& eZINI::instance( 'site.ini' );
37 $wwwDir = $ini->WWWDir;
38 $indexFile = $ini->Index;
39
40 $session =& eZSession::globalSession();
41
42 // fetch the cart
43 $cart = new eZCart();
44 $cart = $cart->getBySession( $session );
45 $RequireUserLogin = true;
46
47 $Language =& $ini->variable( "eZTradeMain", "Language" );
48 $locale = new eZLocale( $Language );
49
50 function deleteCache($ProductID, $CategoryID, $CategoryArray, $Hotdeal )
51 {
52 if ( is_a( $ProductID, "eZProduct" ) )
53 {
54 $CategoryID =& $ProductID->categoryDefinition( false );
55 $CategoryArray =& $ProductID->categories( false );
56 $Hotdeal = $ProductID->isHotDeal();
57 $ProductID = $ProductID->id();
58 }
59
60 $files = eZCacheFile::files( "kernel/eztrade/cache/", array( array( "productview", "productprint" ),
61 $ProductID, $CategoryID ),
62 "cache", "," );
63 foreach ( $files as $file )
64 {
65 $file->delete();
66 }
67 $files = eZCacheFile::files( "kernel/eztrade/cache/", array( "productlist",
68 array_merge( array( $CategoryID ), $CategoryArray ) ),
69 "cache", "," );
70
71 foreach ( $files as $file )
72 {
73 $file->delete();
74 }
75 if ( $Hotdeal )
76 {
77 $files = eZCacheFile::files( "kernel/eztrade/cache/", array( "hotdealslist", NULL ),
78 "cache", "," );
79 foreach ( $files as $file )
80 {
81 $file->delete();
82 }
83 }
84 $files =& eZCacheFile::files( "kernel/ezarticle/cache/",
85 array( "articlefrontpage",
86 NULL,
87 NULL),
88 "cache", "," );
89 foreach( $files as $file )
90 {
91 $file->delete();
92 }
93
94 }
95
96 if ( !$cart )
97 {
98 $orderCompletedID = $session->variable( "OrderCompletedID" ) ;
99
100 if( $orderCompletedID > 0 )
101 {
102 $user =& eZUser::currentUser();
103 $order = new eZOrder( $orderCompletedID );
104 $orderUser = $order->user();
105 if ( $user->id() == $orderUser->id() )
106 {
107 eZHTTPTool::header( "Location: http://" . $HTTP_HOST . $indexFile . "/trade/ordersendt/$orderCompletedID/" );
108 exit();
109 }
110 else
111 {
112 eZHTTPTool::header( "Location: /trade/cart/" );
113 exit();
114 }
115 }
116 else
117 {
118 eZHTTPTool::header( "Location: /trade/cart/" );
119 exit();
120 }
121 }
122
123 // get the cart items.
124 $items = $cart->items();
125
126 // this is the value to charge the customer with
127 $ChargeTotal = $session->variable( "TotalCost" ) ;
128
129 // this is the total vat.
130 $ChargeVATTotal = $session->variable( "TotalVAT" ) ;
131
132 // The comment from the user.
133 $Comment = $session->variable( "Comment" ) ;
134
135 $PreOrderID = $session->variable( "PreOrderID" );
136
137 $currency = new eZCurrency();
138 $checkout = new eZCheckout();
139 $instance =& $checkout->instance();
140
141 $paymentMethod = $session->arrayValue( "PaymentMethod" );
142 $paymentMethod = $paymentMethod[0];
143
144 // var_dump( $instance->paymentFile( $paymentMethod ) );
145
146
147 if ( $paymentMethod == true and $paymentMethod != "voucher_done" )
148 {
149 include( $instance->paymentFile( $paymentMethod ) );
150 }
151 else
152 {
153 $PaymentSuccess = true;
154 }
155
156
157
158 if ( $PaymentSuccess == true )
159 {
160 $orderID = $session->variable( "OrderID" );
161
162 // if ( $IOC_authorization_code )
163 // $session->setVariable( "AuthCode", $IOC_authorization_code );
164 // else
165 // $session->setVariable( "AuthCode", "" );
166
167 // create a new order
168 $order = new eZOrder();
169 $user =& eZUser::currentUser();
170 $order->setUser( $user );
171
172 if ( $ini->variable( "eZTradeMain", "ShowBillingAddress" ) != "enabled" )
173 {
174 $billingAddressID = $shippingAddressID;
175 }
176
177 $shippingAddress = new eZAddress( $session->variable( "ShippingAddressID" ) );
178 $billingAddress = new eZAddress( $session->variable( "BillingAddressID" ) );
179
180 $order->setShippingCharge( $session->variable( "ShippingCost" ) );
181 $order->setShippingVAT( $session->variable( "ShippingVAT" ) );
182
183 $order->setShippingAddress( $shippingAddress, $user );
184 $order->setBillingAddress( $billingAddress, $user );
185
186 $order->setPaymentMethod( $session->arrayValue( "PaymentMethod" ) );
187
188 $order->setShippingTypeID( $session->variable( "ShippingTypeID" ) );
189
190 $order->setComment( $Comment );
191
192 $order->setPersonID( $cart->personID() );
193 $order->setCompanyID( $cart->companyID() );
194
195 $order->setIsVATInc( false );
196
197
198 // fetch the cart items
199 $items = $cart->items();
200
201 // exit if no items exist
202 if ( count ( $items ) == 0 )
203 {
204 eZHTTPTool::header( "Location: /trade/cart/" );
205 exit();
206 }
207
208 $order->store();
209
210
211 $order_id = $order->id();
212
213 foreach ( $items as $item )
214 {
215 $totalVAT=0.0;
216 $price=0.0;
217 $totalPrice=0.0;
218 $product = $item->product();
219
220 // product price
221
222
223 if ( ( !$RequireUserLogin or get_class( $user ) == "eZUser" ) and
224 $ShowPrice and $product->showPrice() == true )
225 {
226 $price = $item->correctPrice( false, true, false );
227 }
228
229
230 $totalVAT = $item->correctPrice( false, true, true ) - $price;
231 $currency->setValue( $price );
232
233 // create a new order item
234 $orderItem = new eZOrderItem();
235 $orderItem->setOrder( $order );
236 $orderItem->setProduct( $product );
237 $orderItem->setCount( $item->count() );
238 $orderItem->setPrice( $price );
239 $orderItem->setVAT( $totalVAT );
240
241 $expiryTime = $product->expiryTime();
242 if ( $expiryTime > 0 )
243 $orderItem->setExpiryDate( eZDateTime::timeStamp( true ) + ( $expiryTime * 86400 ) );
244 else
245 $orderItem->setExpiryDate( 0 );
246
247 $orderItem->store();
248
249 $optionValues =& $item->optionValues();
250
251 foreach ( $optionValues as $optionValue )
252 {
253 $option =& $optionValue->option();
254 $value =& $optionValue->optionValue();
255
256 $orderOptionValue = new eZOrderOptionValue();
257 $orderOptionValue->setOrderItem( $orderItem );
258
259 $orderOptionValue->setRemoteID( $optionValue->remoteID() );
260
261 $descriptions =& $value->descriptions();
262
263 $orderOptionValue->setOptionName( $option->name() );
264 $orderOptionValue->setValueName( $descriptions[0] );
265 // fix
266
267 $orderOptionValue->store();
268 }
269 }
270
271 $cart->cartTotals( $tax, $total );
272
273 //
274 // Send mail confirmation
275 //
276 $mailTemplate = new eZTemplate( "kernel/eztrade/user/" . $ini->variable( "eZTradeMain", "TemplateDir" ),
277 "kernel/eztrade/user/intl", $Language, "/mailorder.php" );
278
279 $mailTemplateIni = new eZINI( "kernel/eztrade/user/intl/" . $Language . "/ordersendt.php.ini", false );
280 $mailTemplate->set_file( "order_sendt_tpl", "mailorder.tpl" );
281 $mailTemplate->setAllStrings();
282
283 $mailTemplate->set_block( "order_sendt_tpl", "credit_card_information_tpl", "credit_card_information" );
284
285 $mailTemplate->set_block( "order_sendt_tpl", "customer_account_number_information_tpl", "customer_account_number_information" );
286
287 $mailTemplate->set_block( "order_sendt_tpl", "billing_address_tpl", "billing_address" );
288 $mailTemplate->set_block( "order_sendt_tpl", "shipping_address_tpl", "shipping_address" );
289 $mailTemplate->set_block( "order_sendt_tpl", "order_item_list_tpl", "order_item_list" );
290
291 $mailTemplate->set_block( "order_sendt_tpl", "full_cart_tpl", "full_cart" );
292 $mailTemplate->set_block( "full_cart_tpl", "cart_item_list_tpl", "cart_item_list" );
293
294 $mailTemplate->set_block( "cart_item_list_tpl", "cart_item_tpl", "cart_item" );
295
296 $mailTemplate->set_block( "cart_item_tpl", "cart_item_option_tpl", "cart_item_option" );
297
298 $mailTemplate->set_block( "full_cart_tpl", "tax_specification_tpl", "tax_specification" );
299 $mailTemplate->set_block( "tax_specification_tpl", "tax_item_tpl", "tax_item" );
300
301
302 // get the customer
303 $user = $order->user();
304
305 $currentUser =& eZUser::currentUser();
306
307 // check if the user is logged in
308 if ( !( $currentUser && $user ) )
309 {
310 eZHTTPTool::header( "Location: /trade/cart/" );
311 exit();
312 }
313
314 // check if the user owns the order
315 if ( $currentUser->id() != $user->id() )
316 {
317 eZHTTPTool::header( "Location: /trade/cart/" );
318 exit();
319 }
320
321 if ( $user )
322 {
323 // print out the addresses
324 $billingAddress = $order->billingAddress();
325
326 if ( $order->personID() == 0 && $order->companyID() == 0 )
327 {
328 $mailTemplate->set_var( "customer_first_name", $user->firstName() );
329 $mailTemplate->set_var( "customer_last_name", $user->lastName() );
330 }
331 else
332 {
333 if ( $order->personID() > 0 )
334 {
335 $customer = new eZPerson( $order->personID() );
336 $mailTemplate->set_var( "customer_first_name", $customer->firstName() );
337 $mailTemplate->set_var( "customer_last_name", $customer->lastName() );
338 }
339 else
340 {
341 $customer = new eZCompany( $order->companyID() );
342 $mailTemplate->set_var( "customer_first_name", $customer->name() );
343 $mailTemplate->set_var( "customer_last_name", "" );
344 }
345 }
346
347 $mailTemplate->set_var( "billing_street1", $billingAddress->street1() );
348 $mailTemplate->set_var( "billing_street2", $billingAddress->street2() );
349 $mailTemplate->set_var( "billing_zip", $billingAddress->zip() );
350 $mailTemplate->set_var( "billing_place", $billingAddress->place() );
351
352 $country = $billingAddress->country();
353
354 if ( $country )
355 {
356 if ( $ini->variable( "eZUserMain", "SelectCountry" ) == "enabled" )
357 $mailTemplate->set_var( "billing_country", $country->name() );
358 else
359 $mailTemplate->set_var( "billing_country", "" );
360 }
361 else
362 {
363 $mailTemplate->set_var( "billing_country", "" );
364 }
365
366 $region = $billingAddress->region();
367
368 if ( ( get_class( $region ) == "eZRegion" ) )
369 {
370 if ( $ini->variable( "eZUserMain", "SelectRegion" ) == "enabled" )
371 $mailTemplate->set_var( "billing_region", $region->name() );
372 else
373 $mailTemplate->set_var( "billing_region", "" );
374 }
375
376 if ( $ini->variable( "eZTradeMain", "ShowBillingAddress" ) == "enabled" )
377 $mailTemplate->parse( "billing_address", "billing_address_tpl" );
378 else
379 $mailTemplate->set_var( "billing_address", "" );
380
381 if ( $order->personID() == 0 && $order->companyID() == 0 )
382 {
383 $shippingUser = $order->shippingUser();
384
385 if ( $shippingUser )
386 {
387 $mailTemplate->set_var( "shipping_first_name", $shippingUser->firstName() );
388 $mailTemplate->set_var( "shipping_last_name", $shippingUser->lastName() );
389 }
390 }
391 else
392 {
393 if ( $order->personID() > 0 )
394 {
395 $customer = new eZPerson( $order->personID() );
396 $mailTemplate->set_var( "shipping_first_name", $customer->firstName() );
397 $mailTemplate->set_var( "shipping_last_name", $customer->lastName() );
398 }
399 else
400 {
401 $customer = new eZCompany( $order->companyID() );
402 $mailTemplate->set_var( "shipping_first_name", $customer->name() );
403 $mailTemplate->set_var( "shipping_last_name", "" );
404 }
405 }
406
407 $shippingAddress = $order->shippingAddress();
408
409 $mailTemplate->set_var( "shipping_street1", $shippingAddress->street1() );
410 $mailTemplate->set_var( "shipping_street2", $shippingAddress->street2() );
411 $mailTemplate->set_var( "shipping_zip", $shippingAddress->zip() );
412 $mailTemplate->set_var( "shipping_place", $shippingAddress->place() );
413
414 $country = $shippingAddress->country();
415
416 if ( $country )
417 {
418 if ( $ini->variable( "eZUserMain", "SelectCountry" ) == "enabled" )
419 $mailTemplate->set_var( "shipping_country", $country->name() );
420 else
421 $mailTemplate->set_var( "shipping_country", "" );
422 }
423 else
424 {
425 $mailTemplate->set_var( "shipping_country", "" );
426 }
427
428 $region = $shippingAddress->region();
429
430 if ( ( get_class( $region ) == "eZRegion" ) )
431 {
432 if ( $ini->variable( "eZUserMain", "SelectRegion" ) == "enabled" )
433 $mailTemplate->set_var( "shipping_region", $region->name() );
434 else
435 $mailTemplate->set_var( "shipping_region", "" );
436 }
437
438 $mailTemplate->parse( "shipping_address", "shipping_address_tpl" );
439 }
440
441
442 // fetch the order items
443 $items = $order->items( $OrderType );
444
445
446 $i = 0;
447 $sum = 0.0;
448 $totalVAT = 0.0;
449
450 $numberOfItems = 0;
451 $i = 0;
452
453 $search="/&nbsp;/";
454 $replace=" ";
455
456 // Add headers!
457
458 $productsForEmail[$i]["product_id"] = trim( $mailTemplateIni->variable( "strings", "product_id" ) );
459 $productsForEmail[$i]["product_name"] = trim( $mailTemplateIni->variable( "strings", "product_name" ) );
460 $productsForEmail[$i]["product_number"] = trim( $mailTemplateIni->variable( "strings", "product_number" ) );
461 $productsForEmail[$i]["product_price"] = trim( $mailTemplateIni->variable( "strings", "product_price" ) );
462 $productsForEmail[$i]["product_count"] = trim( $mailTemplateIni->variable( "strings", "product_qty" ) );
463 $productsForEmail[$i]["product_savings"] = trim( $mailTemplateIni->variable( "strings", "product_savings" ) );
464 $productsForEmail[$i]["product_total_ex_tax"] = trim( $mailTemplateIni->variable( "strings", "product_total_ex_tax" ) );
465 $productsForEmail[$i]["product_total_inc_tax"] = trim( $mailTemplateIni->variable( "strings", "product_total_inc_tax" ) );
466
467 foreach ( $items as $item )
468 {
469 $mailTemplate->set_var( "td_class", ( $i % 2 ) == 0 ? "bglight" : "bgdark" );
470 $i++;
471 $mailTemplate->set_var( "cart_item_id", $item->id() );
472 $product =& $item->product();
473 $vatPercentage = $product->vatPercentage();
474 $productHasVAT = $product->priceIncVAT();
475
476 $productID = $product->id();
477
478 $productsForEmail[$i]["product_id"] = $productID;
479 $productsForEmail[$i]["product_name"] = trim( $product->name() );
480 $productsForEmail[$i]["product_number"] = trim( $product->productNumber() );
481 $productsForEmail[$i]["product_price"] = preg_replace( $search, $replace, $item->localePrice( false, true, $PricesIncludeVAT ) );
482 $productsForEmail[$i]["product_count"] = $item->count();
483 $productsForEmail[$i]["product_total_ex_tax"] = preg_replace( $search, $replace, $item->localePrice( true, true, false ) );
484 $productsForEmail[$i]["product_total_inc_tax"] = preg_replace( $search, $replace, $item->localePrice( true, true, true ) );
485 $productsForEmail[$i]["product_savings"] = "";
486
487 $numberOfItems++;
488
489 $numberOfOptions = 0;
490
491 $optionValues =& $item->optionValues();
492
493 foreach ( $optionValues as $optionValue )
494 {
495 $productOptions[$productID][$numberOfOptions]["option_id"] = "";
496 $productOptions[$productID][$numberOfOptions]["option_name"] = trim( $optionValue->valueName() );
497 $productOptions[$productID][$numberOfOptions]["option_value"] = trim( $optionValue->optionName() ) . ": ";
498 $productOptions[$productID][$numberOfOptions]["option_price"] = "";
499
500 $numberOfOptions++;
501 }
502 }
503
504 $separateBy = 2;
505
506 $order->orderTotals( $tax, $total );
507
508 $mailTemplate->set_var( "empty_cart", "" );
509
510 if ( $ShowExTaxColumn == true )
511 {
512 $currency->setValue( $total["subextax"] );
513 $subextax = $locale->format( $currency );
514 $subextax = preg_replace( $search, $replace, $subextax );
515
516 $currency->setValue( $total["extax"] );
517 $extax = $locale->format( $currency );
518 $extax = preg_replace( $search, $replace, $extax );
519
520 $currency->setValue( $total["shipextax"] );
521 $shipextax = $locale->format( $currency );
522 $shipextax = preg_replace( $search, $replace, $shipextax );
523
524 $len_product_total_ex_tax = strlen( $subextax ) > $len_product_total_ex_tax ? strlen( $subextax ) : $len_product_total_ex_tax;
525 $len_product_total_ex_tax = strlen( $extax ) > $len_product_total_ex_tax ? strlen( $extax ) : $len_product_total_ex_tax;
526 $len_product_total_ex_tax = strlen( $shipextax ) > $len_product_total_ex_tax ? strlen( $shipextax ) : $len_product_total_ex_tax;
527 }
528
529 if ( $ShowIncTaxColumn == true )
530 {
531 $currency->setValue( $total["subinctax"] );
532 $subinctax = $locale->format( $currency );
533 $subinctax = preg_replace( $search, $replace, $subinctax );
534
535 $currency->setValue( $total["inctax"] );
536 $inctax = $locale->format( $currency );
537 $inctax = preg_replace( $search, $replace, $inctax );
538
539 $currency->setValue( $total["shipinctax"] );
540 $shipinctax = $locale->format( $currency );
541 $shipinctax = preg_replace( $search, $replace, $shipinctax );
542
543 $len_product_total_inc_tax = strlen( $subinctax ) > $len_product_total_inc_tax ? strlen( $subinctax ) : $len_product_total_inc_tax;
544 $len_product_total_inc_tax = strlen( $inctax ) > $len_product_total_inc_tax ? strlen( $inctax ) : $len_product_total_inc_tax;
545 $len_product_total_inc_tax = strlen( $shipinctax ) > $len_product_total_inc_tax ? strlen( $shipinctax ) : $len_product_total_inc_tax;
546 }
547
548 if ( isset( $productOptions ) && count ( $productOptions ) > 0 )
549 {
550 foreach( $productOptions as $line )
551 {
552 $len_option_name = strlen( $line["option_name"] ) > $len_option_name ? strlen( $line["option_name"] ) : $len_option_name;
553 $len_option_value = strlen( $line["option_value"] ) > $len_option_value ? strlen( $line["option_value"] ) : $len_option_value;
554 $len_option_price = strlen( $line["option_price"] ) > $len_option_price ? strlen( $line["option_price"] ) : $len_option_price;
555 }
556 }
557
558 $len_option_name += $separateBy;
559 $len_option_value += $separateBy;
560 $len_option_price += $separateBy;
561
562 $optionLen = $len_option_name + $len_option_value;
563
564 $len_product_name = $optionLen;
565
566 foreach( $productsForEmail as $line )
567 {
568 $len_product_name = strlen( $line["product_name"] ) > $len_product_name ? strlen( $line["product_name"] ) : $len_product_name;
569 $len_product_number = strlen( $line["product_number"] ) > $len_product_number ? strlen( $line["product_number"] ) : $len_product_number;
570 $len_product_price = strlen( $line["product_price"] ) > $len_product_price ? strlen( $line["product_price"] ) : $len_product_price;
571 $len_product_count = strlen( $line["product_count"] ) > $len_product_count ? strlen( $line["product_count"] ) : $len_product_count;
572 $len_product_total_ex_tax = strlen( $line["product_total_ex_tax"] ) > $len_product_total_ex_tax ? strlen( $line["product_total_ex_tax"] ) : $len_product_total_ex_tax;
573 $len_product_total_inc_tax = strlen( $line["product_total_inc_tax"] ) > $len_product_total_inc_tax ? strlen( $line["product_total_inc_tax"] ) : $len_product_total_inc_tax;
574 $len_product_savings = strlen( $line["product_savings"] ) > $len_product_savings ? strlen( $line["product_savings"] ) : $len_product_savings;
575 }
576
577 $separateBy = 2;
578
579 $items = "";
580
581 $count = count( $productsForEmail );
582
583 $len_product_number += $separateBy;
584 $len_product_name += $separateBy;
585 $len_product_price += $separateBy;
586 $len_product_count += $separateBy;
587 $len_product_total_ex_tax += $separateBy;
588 $len_product_total_inc_tax += $separateBy;
589 $len_product_savings += $separateBy;
590
591 $lineFillLen = $len_product_number + $len_product_name + $len_product_price + $len_product_count;
592 $totalsLen = $len_product_number + $len_product_name + $len_product_price + $len_product_count;
593 $len_option_indent = $len_product_number;
594
595
596 $i = 0;
597
598 $headers = "";
599
600 $headers = $headers . str_pad( $productsForEmail[$i]["product_number"], $len_product_number, " ", STR_PAD_RIGHT );
601 $headers = $headers . str_pad( $productsForEmail[$i]["product_name"], $len_product_name, " ", STR_PAD_RIGHT );
602 $headers = $headers . str_pad( $productsForEmail[$i]["product_price"], $len_product_price, " ", STR_PAD_LEFT );
603 $headers = $headers . str_pad( $productsForEmail[$i]["product_count"], $len_product_count, " ", STR_PAD_LEFT );
604
605 if ( $ShowExTaxColumn == true )
606 {
607 $headers = $headers . str_pad( $productsForEmail[$i]["product_total_ex_tax"], $len_product_total_ex_tax , " ", STR_PAD_LEFT );
608 $lineFillLen += $len_product_total_ex_tax;
609 }
610
611 if ( $ShowIncTaxColumn == true )
612 {
613 $headers = $headers . str_pad( $productsForEmail[$i]["product_total_inc_tax"], $len_product_total_inc_tax, " ", STR_PAD_LEFT );
614 $lineFillLen += $len_product_total_inc_tax;
615 }
616
617 if ( $ShowSavingsColumn == true )
618 {
619 $headers = $headers . str_pad( $productsForEmail[$i]["product_savings"], $len_product_savings, " ", STR_PAD_LEFT );
620 $lineFillLen += $len_product_savings;
621 }
622
623 $mailTemplate->set_var( "headers", $headers );
624 $mailTemplate->set_var( "hyphen_line", str_pad( "", $lineFillLen, "-", STR_PAD_LEFT ) );
625 $mailTemplate->set_var( "equal_line", str_pad( "", $lineFillLen, "=", STR_PAD_LEFT ) );
626 $mailTemplate->set_var( "cart_item", "" );
627
628 for( $i = 1; $i < $count; $i++ )
629 {
630 $mailTemplate->set_var( "product_id", str_pad( $productsForEmail[$i]["product_id"], $len_product_id, " ", STR_PAD_RIGHT ) );
631 $mailTemplate->set_var( "product_number", str_pad( $productsForEmail[$i]["product_number"], $len_product_number, " ", STR_PAD_RIGHT ) );
632 $mailTemplate->set_var( "product_name", str_pad( $productsForEmail[$i]["product_name"], $len_product_name, " ", STR_PAD_RIGHT ) );
633 $mailTemplate->set_var( "product_price", str_pad( $productsForEmail[$i]["product_price"], $len_product_price, " ", STR_PAD_LEFT ) );
634 $mailTemplate->set_var( "product_count", str_pad( $productsForEmail[$i]["product_count"], $len_product_count, " ", STR_PAD_LEFT ) );
635
636 if ( $ShowExTaxColumn == true )
637 $mailTemplate->set_var( "product_total_ex_tax", str_pad( $productsForEmail[$i]["product_total_ex_tax"], $len_product_total_ex_tax, " ", STR_PAD_LEFT ) );
638 else
639 $mailTemplate->set_var( "product_total_ex_tax", "" );
640
641 if ( $ShowIncTaxColumn == true )
642 $mailTemplate->set_var( "product_total_inc_tax", str_pad( $productsForEmail[$i]["product_total_inc_tax"], $len_product_total_inc_tax, " ", STR_PAD_LEFT ) );
643 else
644 $mailTemplate->set_var( "product_total_inc_tax", "" );
645
646 if ( $ShowSavingsColumn == true )
647 $mailTemplate->set_var( "product_savings", str_pad( $productsForEmail[$i]["product_savings"], $len_product_savings, " ", STR_PAD_LEFT ) );
648 else
649 $mailTemplate->set_var( "product_savings", "" );
650
651 $productID = $productsForEmail[$i]["product_id"];
652
653 $mailTemplate->set_var( "cart_item_option", "" );
654
655 if( is_array( $productOptions[$productID] ) )
656 {
657 foreach( $productOptions[$productID] as $option )
658 {
659 $mailTemplate->set_var( "option_indent", str_pad( "", $len_option_indent, " ", STR_PAD_LEFT ) );
660 $mailTemplate->set_var( "option_id", str_pad( $option["option_id"], $len_option_id, " ", STR_PAD_LEFT ) );
661 $mailTemplate->set_var( "option_name", str_pad( $option["option_name"], $len_option_name, " ", STR_PAD_RIGHT ) );
662 $mailTemplate->set_var( "option_value", str_pad( $option["option_value"], $len_option_name, " ", STR_PAD_RIGHT ) );
663 $mailTemplate->set_var( "option_price", str_pad( $option["option_price"], $len_option_price, " ", STR_PAD_LEFT ) );
664
665 $mailTemplate->parse( "cart_item_option", "cart_item_option_tpl", true );
666 }
667 }
668
669 $mailTemplate->parse( "cart_item", "cart_item_tpl", true );
670 }
671
672 if ( $numberOfItems > 0 )
673 {
674 $ShowCart = true;
675 }
676
677 $mailTemplate->setAllStrings();
678
679 if ( $ShowCart == true )
680 {
681 if ( $ShowSavingsColumn == true )
682 {
683 $totalsLen += $len_product_savings;
684 }
685
686 $mailTemplate->set_var( "intl-confirming-order", trim( $mailTemplateIni->variable( "strings", "confirming-order" ) ) );
687 $mailTemplate->set_var( "intl-thanks_for_shopping", trim( $mailTemplateIni->variable( "strings", "thanks_for_shopping" ) ) );;
688 $mailTemplate->set_var( "intl-goods_list", trim( $mailTemplateIni->variable( "strings", "goods_list" ) ) );;
689
690 $mailTemplate->set_var( "subtotal_inc_tax", str_pad( $subinctax, $len_product_total_inc_tax, " ", STR_PAD_LEFT ) );
691 $mailTemplate->set_var( "total_inc_tax", str_pad( $inctax, $len_product_total_inc_tax, " ", STR_PAD_LEFT ) );
692 $mailTemplate->set_var( "shipping_inc_tax", str_pad( $shipinctax, $len_product_total_inc_tax, " ", STR_PAD_LEFT ) );
693
694 $mailTemplate->set_var( "subtotal_ex_tax", str_pad( $subextax, $len_product_total_ex_tax, " ", STR_PAD_LEFT ) );
695 $mailTemplate->set_var( "total_ex_tax", str_pad( $extax, $len_product_total_ex_tax, " ", STR_PAD_LEFT ) );
696 $mailTemplate->set_var( "shipping_ex_tax", str_pad( $shipextax, $len_product_total_ex_tax, " ", STR_PAD_LEFT ) );
697
698 $mailTemplate->set_var( "intl-subtotal", str_pad( trim( $mailTemplateIni->variable( "strings", "subtotal" ) ), $totalsLen , " ", STR_PAD_LEFT ) );
699 $mailTemplate->set_var( "intl-shipping", str_pad( trim( $mailTemplateIni->variable( "strings", "shipping" ) ), $totalsLen , " ", STR_PAD_LEFT ) );
700 $mailTemplate->set_var( "intl-total", str_pad( trim( $mailTemplateIni->variable( "strings", "total" ) ), $totalsLen , " ", STR_PAD_LEFT ) );
701
702 $mailTemplate->parse( "cart_item_list", "cart_item_list_tpl" );
703 $mailTemplate->parse( "full_cart", "full_cart_tpl" );
704
705 $taxBasisLen = strlen( trim( $mailTemplateIni->variable( "strings", "tax_basis" ) ) );
706 $taxPercentageLen = strlen( trim( $mailTemplateIni->variable( "strings", "tax_percentage" ) ) );
707 $taxLen = strlen( trim( $mailTemplateIni->variable( "strings", "tax" ) ) );
708
709 $currency->setValue( $total["tax"] );
710 $taxValue = preg_replace( $search, $replace, $locale->format( $currency ) );
711 $taxLen = strlen( $taxValue ) > $taxLen ? strlen( $taxValue ) : $taxLen;
712
713 foreach( $tax as $taxGroup )
714 {
715 $currency->setValue( $taxGroup["basis"] );
716 $subTaxBasis = trim( preg_replace( $search, $replace, $locale->format( $currency ) ) );
717 $taxBasisLen = strlen( $subTaxBasis ) > $taxBasisLen ? strlen( $subTaxBasis ) : $taxBasisLen;
718
719 $currency->setValue( $taxGroup["tax"] );
720 $subTax = trim( preg_replace( $search, $replace, $locale->format( $currency ) ) );
721 $taxLen = strlen( $subTax ) > $taxLen ? strlen( $subTax ) : $taxLen;
722
723 $taxPercentageLen = strlen( trim( $taxGroup["sub_tax_percentage"] ) ) > $taxPercentageLen ? strlen( trim( $taxGroup["sub_tax_percentage"] ) ) : $taxPercentageLen;
724 }
725
726 $taxPercentageLen += $separateBy;
727 $taxLen += $separateBy;
728 $taxBasisLen;
729
730 foreach( $tax as $taxGroup )
731 {
732 $currency->setValue( $taxGroup["basis"] );
733 $subTaxBasis = trim( preg_replace( $search, $replace, $locale->format( $currency ) ) );
734 $mailTemplate->set_var( "sub_tax_basis", str_pad( $subTaxBasis, $taxBasisLen, " ", STR_PAD_LEFT ) );
735
736 $mailTemplate->set_var( "sub_tax_percentage", str_pad( $taxGroup["percentage"], $taxPercentageLen, " ", STR_PAD_LEFT ) );
737
738 $currency->setValue( $taxGroup["tax"] );
739 $subTax = trim( preg_replace( $search, $replace, $locale->format( $currency ) ) );
740 $mailTemplate->set_var( "sub_tax", str_pad( $subTax, $taxLen, " ", STR_PAD_LEFT ) );
741
742 $mailTemplate->parse( "tax_item", "tax_item_tpl", true );
743 }
744
745
746 $mailTemplate->set_var( "intl-tax_basis", str_pad( trim( $mailTemplateIni->variable( "strings", "tax_basis" ) ), $taxBasisLen, " ", STR_PAD_RIGHT ) );;
747 $mailTemplate->set_var( "intl-tax_percentage", str_pad( trim( $mailTemplateIni->variable( "strings", "tax_percentage" ) ), $taxPercentageLen, " ", STR_PAD_LEFT ) );;
748 $mailTemplate->set_var( "intl-tax", str_pad( trim( $mailTemplateIni->variable( "strings", "tax" ) ), $taxLen, " ", STR_PAD_LEFT ) );;
749
750 $mailTemplate->set_var( "tax", str_pad( $taxValue, $taxBasisLen + $taxLen + $taxPercentageLen, " ", STR_PAD_LEFT ) );
751 $mailTemplate->set_var( "tax_hyphen_line", str_pad( "", $taxBasisLen + $taxLen + $taxPercentageLen, "-", STR_PAD_LEFT ) );
752 $mailTemplate->set_var( "tax_equal_line", str_pad( "", $taxBasisLen + $taxLen + $taxPercentageLen, "=", STR_PAD_LEFT ) );
753
754 $mailTemplate->parse( "tax_specification", "tax_specification_tpl" );
755 }
756
757 $mailTemplate->set_var( "site_url", $SiteURL );
758 $mailBody = $mailTemplate->parse( "dummy", "full_cart_tpl" );
759 $subjectINI = new eZINI( "kernel/eztrade/user/intl/" . $Language . "/mailorder.php.ini", false );
760
761 $mailSubjectUser = $subjectINI->variable( "strings", "mail_subject_user" ) . " " . $ini->variable( "site", "SiteURL" );
762 $mailSubject = $subjectINI->variable( "strings", "mail_subject_admin" ) . " " . $ini->variable( "site", "SiteURL" );
763
764 $checkout = new eZCheckout();
765 $instance =& $checkout->instance();
766
767 $paymentMethod = $instance->paymentName( $order->paymentMethod() );
768
769 $mailTemplate->set_var( "payment_method", $paymentMethod );
770
771 $mailTemplate->set_var( "comment", $order->comment() );
772
773 $shippingType = $order->shippingType();
774
775 if ( $shippingType && is_a( $shippingType, "eZShippingType" ) )
776 {
777 $mailTemplate->set_var( "shipping_type", $shippingType->name() );
778 }
779 else
780 {
781 $mailTemplate->set_var( "shipping_type", $shippingType );
782 }
783 $shippingCost = $order->shippingCharge();
784
785 $shippingVAT = $order->shippingVAT();
786
787 $currency->setValue( $shippingCost );
788
789 $mailTemplate->set_var( "shipping_cost", $locale->format( $currency ) );
790
791 $sum += $shippingCost;
792 $currency->setValue( $sum );
793 $mailTemplate->set_var( "order_sum", $locale->format( $currency ) );
794
795 $currency->setValue( $totalVAT + $shippingVAT );
796 $mailTemplate->set_var( "order_vat_sum", $locale->format( $currency ) );
797
798 $mailTemplate->set_var( "order_id", $order->id() );
799 $mailTemplate->set_var( "credit_card_information", "" );
800
801 // Send E-mail
802 $mail = new eZMail();
803
804 $mailBody = $mailTemplate->parse( "dummy", "order_sendt_tpl" );
805 // $mailBody = ln2wrn($mailBody, $OrderUserSystem);
806 $mailBody .= "\r\n";
807
808 $mail->setFrom( $OrderSenderEmail );
809 $mail->setTo( $user->email() );
810 $mail->setSubject( $mailSubjectUser );
811 // set and send customer email
812 $mail->setBody( $mailBody );
813 $mail->send();
814
815 // admin email
816 // check to see if the email should be encrypted for the administrator
817 $mailEncrypt = $ini->variable( "eZTradeMain", "MailEncrypt" );
818
819 // load user account number
820 $AccountNumber = $user->accountNumber();
821
822 if ( $mailEncrypt == "GPG" )
823 {
824 // initialize GPG class
825 $mailBody = "";
826 // gpg site ini variables
827 $mailKeyname = $ini->variable( "eZTradeMain", "RecipientGPGKey" );
828 $wwwUser = $ini->variable( "eZTradeMain", "ApacheUser" );
829
830 $gpgSystem = $ini->variable( "eZTradeMain", "RecipientGPGSystem" );
831 $gpgUserHomeDir = $ini->variable( "eZTradeMain", "ApacheUserHome" );
832 $dotGnuPGDir = $ini->variable( "eZTradeMain", "ApacheUserGPGDir" );
833
834 // At this point you can add any information to the template as needed
835 // remember to provide a variable in the template for it.
836
837 // add credit card info for the administrator
838 switch( $paymentMethodID )
839 {
840 case "1" :
841 {
842 $mailTemplate->set_var( "payment_method", $paymentMethod );
843 $mailTemplate->set_var( "cc_number", $CCNumber );
844 $mailTemplate->set_var( "cc_expiremonth", $ExpireMonth );
845 $mailTemplate->set_var( "cc_expireyear", $ExpireYear );
846 // parse the template block
847 $mailTemplate->parse( "credit_card_information", "credit_card_information_tpl");
848
849 $mailTemplate->set_var( "customer_account_number_information", "");
850 $mailTemplate->set_var( "customer_account_number", "" );
851 }
852 break;
853 case "2" :
854 {
855 $mailTemplate->set_var( "payment_method", $paymentMethod );
856 $mailTemplate->set_var( "cc_number", $CCNumber );
857 $mailTemplate->set_var( "cc_expiremonth", $ExpireMonth );
858 $mailTemplate->set_var( "cc_expireyear", $ExpireYear );
859 // parse the template block
860 $mailTemplate->parse( "credit_card_information", "credit_card_information_tpl");
861
862 $mailTemplate->set_var( "customer_account_number_information", "");
863 $mailTemplate->set_var( "customer_account_number", "" );
864 }
865 break;
866 case "3" :
867 {
868 $mailTemplate->set_var( "payment_method", $paymentMethod );
869 $mailTemplate->set_var( "credit_card_information", "");
870 $mailTemplate->set_var( "cc_number", "" );
871 $mailTemplate->set_var( "cc_expiremonth", "" );
872 $mailTemplate->set_var( "cc_expireyear", "" );
873
874 $mailTemplate->set_var( "customer_account_number_information", "");
875 $mailTemplate->set_var( "customer_account_number", "" );
876 }
877 break;
878 case "4" :
879 {
880 $mailTemplate->set_var( "payment_method", $paymentMethod );
881 $mailTemplate->set_var( "credit_card_information", "");
882 $mailTemplate->set_var( "cc_number", "" );
883 $mailTemplate->set_var( "cc_expiremonth", "" );
884 $mailTemplate->set_var( "cc_expireyear", "" );
885
886 $mailTemplate->set_var( "customer_account_number", $AccountNumber );
887 $mailTemplate->parse( "customer_account_number_information", "customer_account_number_information_tpl");
888 }
889 break;
890 case "5" :
891 {
892 $mailTemplate->set_var( "payment_method", $paymentMethod );
893 $mailTemplate->set_var( "credit_card_information", "");
894 $mailTemplate->set_var( "cc_number", "" );
895 $mailTemplate->set_var( "cc_expiremonth", "" );
896 $mailTemplate->set_var( "cc_expireyear", "" );
897
898 $mailTemplate->set_var( "customer_account_number_information", "");
899 $mailTemplate->set_var( "customer_account_number", "" );
900 }
901 break;
902 }
903 // parse the template
904 $mailBody = $mailTemplate->parse( "dummy", "order_sendt_tpl" );
905
906 // seems line this is not needed in this version of ez? why?
907 // $mailBody = ln2wrn($mailBody, $gpgSystem);
908
909 // encrypt mailBody
910 $mytext = new ezgpg($mailBody, $mailKeyname, $wwwUser, $gpgSystem, $dotGnuPGDir, $gpgUserHomeDir);
911 // debug: mail clear text
912 // $mailBody = $mailBody;
913 $mailBody = $mytext->body;
914 // pad encrypted text block
915 // $mailBody = "\n". $mailBody;
916 // set email body content
917 $mail->setBody( $mailBody );
918 }
919 else {
920 $mailTemplate->set_var( "credit_card_information", "");
921 $mailTemplate->set_var( "customer_account_number_information", "");
922 }
923
924 $mail->setSubject( $mailSubject );
925 $mail->setTo( $OrderReceiverEmail );
926 $mail->setFrom( $user->email() );
927 // send email
928 $mail->send();
929
930 // Debug Variables #################################
931 // $print_cmd = "<pre>\n &nbsp; \n". $mytext->body ."\n &nbsp; \n</pre>"; // $mytext->pcmd;
932 // $print_cmd .= "\n";
933 // system( $print_cmd );
934 // Debug Variables #################################
935 // $print_cmd = "<pre>\n &nbsp; \n". $mailBody ."\n &nbsp; \n</pre>"; // $mytext->pcmd;
936 // print( $print_cmd );
937 // exit();
938
939 // get the cart or create it
940 $cart = new eZCart();
941 $cart = $cart->getBySession( $session );
942 foreach ( $cart->items() as $item )
943 {
944 // set the wishlist item to bought if the cart item is
945 // fetched from a wishlist
946 $wishListItem = $item->wishListItem();
947 if ( $wishListItem )
948 {
949 $wishListItem->setIsBought( true );
950 $wishListItem->store();
951 }
952 }
953
954 // Decrease product/option quantity
955 $items =& $cart->items();
956 foreach ( $items as $item )
957 {
958 $product =& $item->product();
959 $count = $item->count();
960 $quantity = $product->totalQuantity();
961 $values =& $item->optionValues();
962 $selected_values = array();
963 foreach ( $values as $value )
964 {
965 $option_value =& $value->optionValue();
966 $selected_values[] = $option_value->id();
967 }
968
969 $changed_quantity = false;
970 if ( !(is_bool( $quantity ) and !$quantity) )
971 {
972 $max_value = max( $quantity - $count, 0 );
973 $product->setTotalQuantity( $max_value );
974 if ( $max_value == 0 and $DiscontinueQuantityless )
975 $product->setDiscontinued( true );
976 $product->store();
977 $changed_quantity = true;
978 }
979 $options =& $product->options();
980 $change_discontinuity = false;
981 $max_max_value = 0;
982 $has_value = false;
983 foreach( $options as $option )
984 {
985 $option_values =& $option->values();
986 foreach( $option_values as $option_value )
987 {
988 if ( in_array( $option_value->id(), $selected_values ) )
989 {
990 $value_quantity = $option_value->totalQuantity();
991 if ( !(is_bool( $value_quantity ) and !$value_quantity) )
992 {
993 $max_value = max( $value_quantity - $count, 0 );
994 $max_max_value = max( $max_max_value, $max_value );
995 $option_value->setTotalQuantity( $max_value );
996 $option_value->store();
997 $changed_quantity = true;
998 }
999 }
1000 $value_quantity = $option_value->totalQuantity();
1001 if ( (is_bool( $value_quantity ) and !$value_quantity) or $value_quantity > 0 )
1002 {
1003 $has_value = true;
1004 }
1005 }
1006 }
1007 $productQuantity = $product->totalQuantity();
1008 if ( ( $max_max_value == 0 and !$has_value and $DiscontinueQuantityless ) and !(is_bool( $productQuantity ) and !$productQuantity ) )
1009 {
1010 $product->setDiscontinued( true );
1011 $product->store();
1012 }
1013 if ( $changed_quantity )
1014 {
1015 deleteCache( $product, false, false, false );
1016 }
1017
1018 $user =& eZUser::currentUser();
1019
1020
1021
1022 for( $i=0; $i < $count; $i++ )
1023 {
1024 // Create vouchers
1025 $voucherInfo =& $item->voucherInformation();
1026 if ( $item->voucherInformation() )
1027 {
1028 $voucher = new eZVoucher( );
1029 $voucher->generateKey();
1030 $voucher->setAvailable( true );
1031 $voucher->setUser( $user );
1032 $voucher->setPrice( $voucherInfo->price() );
1033 $voucher->setTotalValue( $voucherInfo->price() );
1034 $voucher->setProduct( $voucherInfo->product() );
1035 $voucher->store();
1036 $voucherInfo->setVoucher( $voucher );
1037 $voucherInfo->store();
1038 $voucherInfo->sendMail();
1039 }
1040 }
1041 }
1042
1043 //
1044 if ( is_file ( "checkout/user/postpayment.php" ) )
1045 {
1046 include( "checkout/user/postpayment.php" );
1047 }
1048
1049 // $cart->clear();
1050
1051 $OrderID = $order->id();
1052
1053 $preOrder = new eZPreOrder( $PreOrderID );
1054 $preOrder->setOrderID( $OrderID );
1055 $preOrder->store();
1056
1057 $payedWith = $session->arrayValue( "PayedWith" );
1058
1059 if ( is_array ( $payedWith ) )
1060 {
1061 foreach( $payedWith as $voucherID => $price )
1062 {
1063 $voucher = new eZVoucher( $voucherID );
1064 $voucher->setPrice( $voucher->price() - $price );
1065 if ( $voucher->price() <= 0 )
1066 $voucher->setAvailable( false );
1067
1068 $voucher->store();
1069
1070 $voucherUsed = new eZVoucherUsed();
1071 $voucherUsed->setVoucher( $voucher );
1072 $voucherUsed->setPrice( $price );
1073 $voucherUsed->setOrder( $order );
1074 $voucherUsed->setUser( $user );
1075 $voucherUsed->store();
1076
1077 }
1078 $session->setVariable( "PayedWith", "" );
1079 $session->setVariable( "PayWithVoucher", "" );
1080 }
1081
1082 // $cart->delete();
1083
1084 // call the payment script after the payment is successful.
1085 // some systems needs this, e.g. to print out the OrderID which was cleared..
1086 $Action = "PostPayment";
1087 include( $instance->paymentFile( $paymentMethod ) );
1088
1089 // Turn of SSL and redirect to http://
1090
1091 $session->setVariable( "SSLMode", "disabled" );
1092
1093 // set the confirmation
1094 // eZHTTPTool::header( "Location: http://$HTTP_HOST/trade/ordersendt/$OrderID/" );
1095 eZHTTPTool::header( "Location: https://" . $HTTP_HOST . $wwwDir . $indexFile . "/trade/confirmation/" );
1096 exit();
1097 }
1098 ?>
$i
$i
Definition: admin/adlist.php:91
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
$shippingCost
foreach( $items as $item) $shippingCost
Definition: admin/orderview.php:267
$AccountNumber
$AccountNumber
Definition: admin/useredit.php:446
$files
$files
Definition: articlepreview.php:91
$SiteURL
if( $listImageHeightOverride) $SiteURL
Definition: articleview.php:183
$ShowIncTaxColumn
$ShowIncTaxColumn
Definition: cart.php:47
$ShowCart
$ShowCart
Definition: cart.php:72
$ShowSavingsColumn
$ShowSavingsColumn
Definition: cart.php:73
$OrderReceiverEmail
$OrderReceiverEmail
Definition: checkout.php:42
$total
else $total["inctax"]
Definition: checkout.php:1359
$OrderSenderEmail
$OrderSenderEmail
Definition: checkout.php:41
$shippingAddress
$shippingAddress
Definition: checkout.php:615
eZAddress
Definition: ezaddress.php:42
eZCart
Definition: ezcart.php:71
eZCheckout
Definition: ezcheckout.php:48
eZCompany
Definition: ezcompany.php:54
eZCurrency
Definition: ezcurrency.php:46
eZDateTime\timeStamp
timeStamp( $returnNow=false)
Definition: ezdatetime.php:328
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZINI
Reads and writes .ini style configuration files.
eZLocale
Definition: ezlocale.php:119
eZMail
Definition: ezmail.php:57
eZOrderItem
Definition: ezorderitem.php:48
eZOrderOptionValue
Definition: ezorderoptionvalue.php:42
eZOrder
Definition: ezorder.php:52
eZPerson
Definition: ezperson.php:43
eZPreOrder
Definition: ezpreorder.php:44
eZSession\globalSession
static & globalSession( $id="", $fetch=true)
Definition: kernel/ezsession/classes/ezsession.php:614
eZTemplate
Definition: eztemplate.php:107
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
eZVoucherUsed
Definition: ezvoucherused.php:49
eZVoucher
Definition: ezvoucher.php:54
$item
$item
Definition: classes/admin/linklist.php:228
$Action
$Action
Definition: companysearch.php:80
$orderID
$orderID
Definition: confirmation.php:34
$customer
$customer
Definition: customerview.php:72
$search
$search
Definition: export_froogle.php:153
$replace
$replace
Definition: export_froogle.php:140
$mail
$mail
Definition: ezbulkmail/admin/maillist.php:61
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$sum
$sum
Definition: fileinfo.php:26
$values
$values
Definition: fixedvalues.php:103
exit
exit
Definition: folder.php:81
$PricesIncludeVAT
$PricesIncludeVAT
Definition: homepage.php:47
$product
$product
Definition: homepage.php:202
$PaymentSuccess
$PaymentSuccess
Definition: invoice.php:29
$count
$count
Definition: onlinetypelist.php:108
$options
$options
Definition: optionlist.php:56
$numberOfItems
$numberOfItems
Definition: orderedit.php:382
$ShowExTaxColumn
$ShowExTaxColumn
Definition: orderedit.php:51
$shippingType
$shippingType
Definition: orderedit.php:672
$totalVAT
$totalVAT
Definition: orderedit.php:344
$shippingVAT
$shippingVAT
Definition: ordersendt.php:755
$indexFile
$indexFile
Definition: payment.php:38
$wwwDir
$wwwDir
Definition: payment.php:37
$PreOrderID
$PreOrderID
Definition: payment.php:135
$currency
$currency
Definition: payment.php:137
$locale
$locale
Definition: payment.php:48
$checkout
$checkout
Definition: payment.php:138
$cart
$cart
Definition: payment.php:43
$items
if(! $cart) $items
Definition: payment.php:124
$Language
$Language
Definition: payment.php:47
$ini
$ini
Definition: payment.php:36
$ChargeTotal
$ChargeTotal
Definition: payment.php:127
$Comment
$Comment
Definition: payment.php:133
deleteCache
deleteCache($ProductID, $CategoryID, $CategoryArray, $Hotdeal)
Definition: payment.php:50
$paymentMethod
$paymentMethod
Definition: payment.php:141
$session
$session
Definition: payment.php:40
$instance
$instance
Definition: payment.php:139
$ChargeVATTotal
$ChargeVATTotal
Definition: payment.php:130
$RequireUserLogin
$RequireUserLogin
Definition: payment.php:45
$country
$country
Definition: paypal.php:46
$billingAddress
$billingAddress
Definition: paypal.php:44
$region
$region
Definition: paypal.php:45
$price
$price
Definition: pricegroupedit.php:39
$ShowPrice
$ShowPrice
Definition: productpreview.php:48
$order
$order
Definition: productreport.php:182
$headers
$headers
Definition: requestpagelist.php:61
$currentUser
$currentUser
Definition: surveyedit.php:54
$user
$user
Definition: user/adlist.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.