Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezsimpleshopaccounthandler.php
Go to the documentation of this file.
1 <?php
11 class eZSimpleShopAccountHandler
12 {
17 function verifyAccountInformation()
18 {
19 return false;
20 }
21
25 function fetchAccountInformation( &$module )
26 {
27 $module->redirectTo( '/shop/register/' );
28 }
29
33 function email( $order )
34 {
35 $email = false;
36 $xmlString = $order->attribute( 'data_text_1' );
37 if ( $xmlString != null )
38 {
39 $dom = new DOMDocument( '1.0', 'utf-8' );
40 $success = $dom->loadXML( $xmlString );
41 $emailNode = $dom->getElementsByTagName( 'email' )->item( 0 );
42 if ( $emailNode )
43 {
44 $email = $emailNode->textContent;
45 }
46 }
47
48 return $email;
49 }
50
54 function accountName( $order )
55 {
56 $accountName = '';
57 $xmlString = $order->attribute( 'data_text_1' );
58 if ( $xmlString != null )
59 {
60 $dom = new DOMDocument( '1.0', 'utf-8' );
61 $success = $dom->loadXML( $xmlString );
62 $firstNameNode = $dom->getElementsByTagName( 'first-name' )->item( 0 );
63 $lastNameNode = $dom->getElementsByTagName( 'last-name' )->item( 0 );
64 $accountName = $firstNameNode->textContent . ' ' . $lastNameNode->textContent;
65 }
66
67 return $accountName;
68 }
69
73 function accountInformation( $order )
74 {
75 $firstName = '';
76 $lastName = '';
77 $email = '';
78 $address = '';
79
80 $dom = new DOMDocument( '1.0', 'utf-8' );
81 $xmlString = $order->attribute( 'data_text_1' );
82 if ( $xmlString != null )
83 {
84 $dom = new DOMDocument( '1.0', 'utf-8' );
85 $success = $dom->loadXML( $xmlString );
86
87 $firstNameNode = $dom->getElementsByTagName( 'first-name' )->item( 0 );
88 if ( $firstNameNode )
89 {
90 $firstName = $firstNameNode->textContent;
91 }
92
93 $lastNameNode = $dom->getElementsByTagName( 'last-name' )->item( 0 );
94 if ( $lastNameNode )
95 {
96 $lastName = $lastNameNode->textContent;
97 }
98
99 $emailNode = $dom->getElementsByTagName( 'email' )->item( 0 );
100 if ( $emailNode )
101 {
102 $email = $emailNode->textContent;
103 }
104
105 $addressNode = $dom->getElementsByTagName( 'address' )->item( 0 );
106 if ( $addressNode )
107 {
108 $address = $addressNode->textContent;
109 }
110 }
111
112 return array( 'first_name' => $firstName,
113 'last_name' => $lastName,
114 'email' => $email,
115 'address' => $address
116 );
117 }
118 }
119
120 ?>
eZSimpleShopAccountHandler
Definition: ezsimpleshopaccounthandler.php:12
eZSimpleShopAccountHandler\verifyAccountInformation
verifyAccountInformation()
Definition: ezsimpleshopaccounthandler.php:17
eZSimpleShopAccountHandler\accountName
accountName( $order)
Definition: ezsimpleshopaccounthandler.php:54
eZSimpleShopAccountHandler\email
email( $order)
Definition: ezsimpleshopaccounthandler.php:33
eZSimpleShopAccountHandler\fetchAccountInformation
fetchAccountInformation(&$module)
Definition: ezsimpleshopaccounthandler.php:25
eZSimpleShopAccountHandler\accountInformation
accountInformation( $order)
Definition: ezsimpleshopaccounthandler.php:73
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.