Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezusershopaccounthandler.php
Go to the documentation of this file.
1 <?php
11 class eZUserShopAccountHandler
12 {
17 function verifyAccountInformation()
18 {
19 return false;
20 }
21
25 function fetchAccountInformation( &$module )
26 {
27 $module->redirectTo( '/shop/userregister/' );
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
70 function accountInformation( $order )
71 {
72 $firstName = '';
73 $lastName = '';
74 $email = '';
75 $street1 = '';
76 $street2 = '';
77 $zip = '';
78 $place = '';
79 $country = '';
80 $comment = '';
81 $state = '';
82
83 $dom = new DOMDocument( '1.0', 'utf-8' );
84 $xmlString = $order->attribute( 'data_text_1' );
85 if ( $xmlString != null )
86 {
87 $dom = new DOMDocument( '1.0', 'utf-8' );
88 $success = $dom->loadXML( $xmlString );
89
90 $firstNameNode = $dom->getElementsByTagName( 'first-name' )->item( 0 );
91 if ( $firstNameNode )
92 {
93 $firstName = $firstNameNode->textContent;
94 }
95
96 $lastNameNode = $dom->getElementsByTagName( 'last-name' )->item( 0 );
97 if ( $lastNameNode )
98 {
99 $lastName = $lastNameNode->textContent;
100 }
101
102 $emailNode = $dom->getElementsByTagName( 'email' )->item( 0 );
103 if ( $emailNode )
104 {
105 $email = $emailNode->textContent;
106 }
107
108 $street1Node = $dom->getElementsByTagName( 'street1' )->item( 0 );
109 if ( $street1Node )
110 {
111 $street1 = $street1Node->textContent;
112 }
113
114 $street2Node = $dom->getElementsByTagName( 'street2' )->item( 0 );
115 if ( $street2Node )
116 {
117 $street2 = $street2Node->textContent;
118 }
119
120 $zipNode = $dom->getElementsByTagName( 'zip' )->item( 0 );
121 if ( $zipNode )
122 {
123 $zip = $zipNode->textContent;
124 }
125
126 $placeNode = $dom->getElementsByTagName( 'place' )->item( 0 );
127 if ( $placeNode )
128 {
129 $place = $placeNode->textContent;
130 }
131
132 $stateNode = $dom->getElementsByTagName( 'state' )->item( 0 );
133 if ( $stateNode )
134 {
135 $state = $stateNode->textContent;
136 }
137
138 $countryNode = $dom->getElementsByTagName( 'country' )->item( 0 );
139 if ( $countryNode )
140 {
141 $country = $countryNode->textContent;
142 }
143
144 $commentNode = $dom->getElementsByTagName( 'comment' )->item( 0 );
145 if ( $commentNode )
146 {
147 $comment = $commentNode->textContent;
148 }
149 }
150
151 return array( 'first_name' => $firstName,
152 'last_name' => $lastName,
153 'email' => $email,
154 'street1' => $street1,
155 'street2' => $street2,
156 'zip' => $zip,
157 'place' => $place,
158 'state' => $state,
159 'country' => $country,
160 'comment' => $comment,
161 );
162 }
163 }
164
165 ?>
eZUserShopAccountHandler
Definition: ezusershopaccounthandler.php:12
eZUserShopAccountHandler\accountName
accountName( $order)
Definition: ezusershopaccounthandler.php:54
eZUserShopAccountHandler\fetchAccountInformation
fetchAccountInformation(&$module)
Definition: ezusershopaccounthandler.php:25
eZUserShopAccountHandler\email
email( $order)
Definition: ezusershopaccounthandler.php:33
eZUserShopAccountHandler\verifyAccountInformation
verifyAccountInformation()
Definition: ezusershopaccounthandler.php:17
eZUserShopAccountHandler\accountInformation
accountInformation( $order)
Definition: ezusershopaccounthandler.php:70
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.