Flickrocket - Version 1.1.7

Version Notes

Stable release

Download this release

Release Info

Developer Volkmar Breitfeld
Extension Flickrocket
Version 1.1.7
Comparing to
See all releases


Code changes from version 1.1.6 to 1.1.7

Files changed (54) hide show
  1. app/code/community/Acegmbh/Flux/Block/Adminhtml/Admin.php +23 -23
  2. app/code/community/Acegmbh/Flux/Block/Adminhtml/Admin/Grid.php +22 -22
  3. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux.php +0 -0
  4. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit.php +0 -0
  5. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit/Form.php +0 -0
  6. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit/Tab/Form.php +0 -0
  7. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit/Tabs.php +0 -0
  8. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Grid.php +0 -0
  9. app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Grid/Render/Xml.php +0 -0
  10. app/code/community/Acegmbh/Flux/Helper/Data.php +424 -406
  11. app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Licenceids.php +46 -32
  12. app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Licenceids.php~ +46 -0
  13. app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Projectids.php +55 -40
  14. app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Projectids.php~ +55 -0
  15. app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Wsdlurls.php +18 -18
  16. app/code/community/Acegmbh/Flux/Model/Customer.php +14 -14
  17. app/code/community/Acegmbh/Flux/Model/Customer/Entity/Customer.php +0 -0
  18. app/code/community/Acegmbh/Flux/Model/Flux/Config/Demo.php +12 -0
  19. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/ChangeCustomerEMail.php +0 -0
  20. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/ChangeCustomerPassword.php +0 -0
  21. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/CheckUserExists.php +0 -0
  22. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/CreateShopOrder.php +0 -0
  23. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/GetLicenses.php +18 -18
  24. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/GetProjects.php +8 -8
  25. app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/PrepareLogin.php +0 -0
  26. app/code/community/Acegmbh/Flux/Model/Mysql4/Orders.php +0 -0
  27. app/code/community/Acegmbh/Flux/Model/Mysql4/Orders/Collection.php +0 -0
  28. app/code/community/Acegmbh/Flux/Model/Mysql4/Users.php +0 -0
  29. app/code/community/Acegmbh/Flux/Model/Mysql4/Users/Collection.php +0 -0
  30. app/code/community/Acegmbh/Flux/Model/Observer.php +198 -106
  31. app/code/community/Acegmbh/Flux/Model/Orders.php +0 -0
  32. app/code/community/Acegmbh/Flux/Model/Users.php +0 -0
  33. app/code/community/Acegmbh/Flux/controllers/Adminhtml/AdminController.php +0 -0
  34. app/code/community/Acegmbh/Flux/controllers/Adminhtml/FluxController.php +0 -0
  35. app/code/community/Acegmbh/Flux/controllers/Adminhtml/UploadController.php +0 -0
  36. app/code/community/Acegmbh/Flux/controllers/Checkout/OnepageController.php +51 -51
  37. app/code/community/Acegmbh/Flux/controllers/IndexController.php +0 -0
  38. app/code/community/Acegmbh/Flux/etc/adminhtml.xml +3 -3
  39. app/code/community/Acegmbh/Flux/etc/config.xml +21 -3
  40. app/code/community/Acegmbh/Flux/etc/system.xml +5 -1
  41. app/code/community/Acegmbh/Flux/sql/flux_setup/mysql4-install-0.1.0.php +127 -127
  42. app/code/community/Acegmbh/Flux/sql/flux_setup/mysql4-upgrade-0.1.0-0.1.7.php +19 -0
  43. app/design/adminhtml/default/default/layout/acegmbh_flux.xml +0 -0
  44. app/design/adminhtml/default/default/template/flux/admin.phtml +0 -0
  45. app/design/adminhtml/default/default/template/flux/upload.phtml +0 -0
  46. app/design/frontend/base/default/layout/flux.xml +0 -0
  47. app/design/frontend/base/default/template/flux/catalog/product/samples.phtml +0 -0
  48. app/design/frontend/base/default/template/flux/dlmanagerlinks.phtml +15 -4
  49. app/etc/modules/Acegmbh_Flux.xml +0 -0
  50. app/locale/en_US/Acegmbh_Flux.csv +0 -0
  51. package.xml +8 -8
  52. skin/adminhtml/default/default/images/flux/CloudIcon_Apple.png +0 -0
  53. skin/adminhtml/default/default/images/flux/CloudIcon_Html5.png +0 -0
  54. skin/adminhtml/default/default/images/flux/CloudIcon_Win.png +0 -0
app/code/community/Acegmbh/Flux/Block/Adminhtml/Admin.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
-
3
- class Acegmbh_Flux_Block_Adminhtml_Admin
4
- extends Mage_Adminhtml_Block_Widget_Grid_Container
5
- {
6
- /**
7
- * Constructor.
8
- *
9
- * @version 0.1
10
- *
11
- * @param void
12
- *
13
- * @return object
14
- */
15
- public function __construct()
16
- {
17
- $this->_controller = 'adminhtml_flickrocketadmin';
18
- $this->_blockGroup = 'admin';
19
- $this->_headerText = Mage::helper('flux')->__('FlickRocket Admin');
20
- parent::__construct();
21
- $this->removeButton('add');
22
- }
23
- }
1
+ <?php
2
+
3
+ class Acegmbh_Flux_Block_Adminhtml_Admin
4
+ extends Mage_Adminhtml_Block_Widget_Grid_Container
5
+ {
6
+ /**
7
+ * Constructor.
8
+ *
9
+ * @version 0.1
10
+ *
11
+ * @param void
12
+ *
13
+ * @return object
14
+ */
15
+ public function __construct()
16
+ {
17
+ $this->_controller = 'adminhtml_flickrocketadmin';
18
+ $this->_blockGroup = 'admin';
19
+ $this->_headerText = Mage::helper('flux')->__('FlickRocket Admin');
20
+ parent::__construct();
21
+ $this->removeButton('add');
22
+ }
23
+ }
app/code/community/Acegmbh/Flux/Block/Adminhtml/Admin/Grid.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
-
3
- class Acegmbh_Flux_Block_Adminhtml_Admin_Grid
4
- extends Mage_Adminhtml_Block_Widget_Grid
5
- {
6
- /**
7
- * Constructor.
8
- *
9
- * @version 0.1
10
- *
11
- * @param void
12
- *
13
- * @return object
14
- */
15
- public function __construct()
16
- {
17
- parent::__construct();
18
-
19
- }
20
-
21
-
22
- }
1
+ <?php
2
+
3
+ class Acegmbh_Flux_Block_Adminhtml_Admin_Grid
4
+ extends Mage_Adminhtml_Block_Widget_Grid
5
+ {
6
+ /**
7
+ * Constructor.
8
+ *
9
+ * @version 0.1
10
+ *
11
+ * @param void
12
+ *
13
+ * @return object
14
+ */
15
+ public function __construct()
16
+ {
17
+ parent::__construct();
18
+
19
+ }
20
+
21
+
22
+ }
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit/Form.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit/Tab/Form.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Edit/Tabs.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Grid.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Block/Adminhtml/Flux/Grid/Render/Xml.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Helper/Data.php CHANGED
@@ -31,172 +31,169 @@ class Acegmbh_Flux_Helper_Data
31
  '-5' => self::ERROR_UNDEFINED
32
  );
33
 
34
- public static $errorsemail = array(
35
- 0 => self::SUCCESSFUL,
36
- '-1' => self::ERROR_INVALID_USER,
37
- '-2' => self::ERROR_INVALID_XML,
38
- '-3' => self::ERROR_NONEXISTANT_CUSTOMER_NODE,
39
- '-4' => self::ERROR_NONEXISTANT_CUSTOMER,
40
  '-5' => self::ERROR_NONEXISTANT_PASSWORD_NODE,
41
  '-7' => self::ERROR_NONEXISTANT_NEWEMAIL_NODE,
42
- '-8' => self::ERROR_EMAIL_EXISTS,
43
  );
44
-
45
- /** ***************************************************************************** **/
46
- /** ****************************** SOAP-functions ******************************* **/
47
  /** ***************************************************************************** **/
48
 
49
- /**
50
- * Change password.
51
- *
52
- * @version 0.1
53
- *
54
  * @param Mage_Customer_Model_Customer $Customer
55
- * @param string $currentPassword
56
- * @param string $newPassword
57
- *
58
- * @return boolean
59
- */
60
  public static function changePassword( Mage_Customer_Model_Customer $Customer,
61
  $currentPassword,
62
  $newPassword,
63
- $bHashvaluesGiven = false )
64
  {
65
  self::_log('changePassword');
66
 
67
  $customerId = $Customer->getId();
68
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
69
- $SoapClient = new SoapClient( $wsdl ,
70
- array(
71
- 'soap_version' => SOAP_1_2,
72
- 'trace' => true,
73
- 'classmap' => array(
74
- 'CreateCustomerPasswordResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_ChangeCustomerPassword'
75
- ),
76
- 'cache_wsdl' => WSDL_CACHE_NONE
77
- )
78
- );
79
-
80
- $soapRequest = array();
81
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
82
- $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
83
-
84
- $Doc = new DOMDocument('1.0', 'UTF-8');
85
- $Doc->formatOutput = true;
86
- $_Customer = $Doc->createElement('Customer');
87
  $Doc->appendChild($_Customer);
88
-
89
- $_Email = $Doc->createElement('EMail', $Customer->getEmail());
90
  $_Customer->appendChild($_Email);
91
 
92
  if( $bHashvaluesGiven )
93
  {
94
- $Password = $Doc->createElement('PasswordHash', $currentPassword);
95
- $_Customer->appendChild($Password);
96
-
97
- $NewPassword = $Doc->createElement('NewPasswordHash', $newPassword);
98
  $_Customer->appendChild($NewPassword);
99
  }
100
  else
101
  {
102
- $Password = $Doc->createElement('PasswordHash', $Customer->hashPassword($currentPassword) );
103
- $_Customer->appendChild($Password);
104
-
105
- $NewPassword = $Doc->createElement('NewPasswordHash', $Customer->hashPassword($newPassword) );
106
  $_Customer->appendChild($NewPassword);
107
  }
108
-
109
- $soapRequest['XML'] = $Doc->saveXML();
110
- try
111
- {
112
  $Result = $SoapClient->__call('ChangeCustomerPassword', array('parameters' => $soapRequest) );
113
  $Result->ChangeCustomerPasswordResult;
114
 
115
- self::_log('Request:');
116
- self::_log(html_entity_decode($SoapClient->__getLastRequest()));
117
- self::_log('Response:');
118
- self::_log($SoapClient->__getLastResponse());
119
-
120
- if( $Result->ErrorCode<0 )
121
- {
122
- return $Result->ErrorCode;
123
- }
124
- else
125
- {
126
- return true;
127
  }
128
- }
129
- catch (SoapFault $Exception)
130
  {
131
  self::_log($Exception->getMessage());
 
132
  return false;
133
  }
134
  }
135
 
136
- public static function changeEmail(Mage_Customer_Model_Customer $Customer, $strNewEmail)
137
  {
138
  self::_log('changeEmail');
139
-
140
  $customerId = $Customer->getId();
141
-
142
- $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
143
- $SoapClient = new SoapClient( $wsdl ,
144
- array(
145
- 'soap_version' => SOAP_1_2,
146
- 'trace' => true,
147
- 'classmap' => array(
148
- 'ChangeCustomerEMailResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_ChangeCustomerEMail'
149
- ),
150
- 'cache_wsdl' => WSDL_CACHE_NONE
151
- )
152
- );
153
-
154
- $soapRequest = array();
155
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
156
- $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
157
-
158
- $Doc = new DOMDocument('1.0', 'UTF-8');
159
- $Doc->formatOutput = true;
160
- $_Customer = $Doc->createElement('Customer');
161
  $Doc->appendChild($_Customer);
162
-
163
- $_Email = $Doc->createElement('EMail', $Customer->getEmail());
164
  $_Customer->appendChild($_Email);
165
 
166
- $_NewEmail = $Doc->createElement('NewEMail', $strNewEmail);
167
  $_Customer->appendChild($_NewEmail);
168
-
169
- $Password = $Doc->createElement('PasswordHash', $Customer->getData("password_hash"));
170
- $_Customer->appendChild($Password);
171
-
172
- $soapRequest['XML'] = $Doc->saveXML();
173
- try
174
- {
175
- $Result = $SoapClient->__call('ChangeCustomerEMail', array('parameters' => $soapRequest) );
176
  $Result->ChangeCustomerEMailResult;
177
 
178
- self::_log('Request:');
179
- self::_log( $SoapClient->__getLastRequest() );
180
- self::_log('Response:');
181
- self::_log( $SoapClient->__getLastResponse() );
182
-
183
- if( $Result->ErrorCode<0 )
184
- {
185
- return $Result->ErrorCode;
186
- }
187
- else
188
- {
189
- return true;
190
- }
191
- }
192
- catch (SoapFault $Exception)
193
- {
194
  self::_log($Exception->getMessage());
195
- return false;
 
196
  }
197
  }
198
 
199
- public static function createShopOrder($Order)
200
  {
201
  self::_log('createShopOrder');
202
 
@@ -204,12 +201,12 @@ class Acegmbh_Flux_Helper_Data
204
  $Customer = Mage::getModel('customer/customer')->load($iIdCustomer);
205
 
206
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
207
- $SoapClient = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2,
208
- 'trace' => true,
209
- 'classmap' => array('CreateShopOrderResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CreateShopOrder'),
210
- 'cache_wsdl' => WSDL_CACHE_NONE
211
- )
212
- );
213
 
214
  $soapRequest = array();
215
  $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
@@ -241,9 +238,12 @@ class Acegmbh_Flux_Helper_Data
241
  {
242
  $productId = $_Item->getData('product_id');
243
  $Product = Mage::getModel('catalog/product')->load($productId);
244
-
245
- $attributeSetModel = Mage::getModel("eav/entity_attribute_set");
246
- $attributeSetModel->load( $Product->getAttributeSetId() );
 
 
 
247
  $attributeSetName = $attributeSetModel->getAttributeSetName();
248
 
249
  self::_log( 'ProductId: ' . $productId . ', ' .
@@ -271,15 +271,16 @@ class Acegmbh_Flux_Helper_Data
271
  $Item->appendChild($Count);
272
 
273
  $iSentItems++;
 
274
  }
275
 
276
- if( 0==$iSentItems )
277
  {
278
  /**
279
  * don't sent data, if the order has no digital items
280
  */
281
- self::_log( 'do not sent data, if the order has no digital items ');
282
- return;
283
  }
284
 
285
  $soapRequest['XML'] = $Doc->saveXML();
@@ -287,9 +288,9 @@ class Acegmbh_Flux_Helper_Data
287
  {
288
  $Result = $SoapClient->__call('CreateShopOrder', array( 'parameters' => $soapRequest ) );
289
 
290
- self::_log('Request:');
291
- self::_log( $SoapClient->__getLastRequest() );
292
- self::_log('Response:');
293
  self::_log( $SoapClient->__getLastResponse() );
294
 
295
  self::_logflux( $Order->getId(),
@@ -302,86 +303,88 @@ class Acegmbh_Flux_Helper_Data
302
  catch (SoapFault $Exception)
303
  {
304
  self::_log($Exception->getMessage());
 
305
  }
306
  }
307
-
308
- /** ***************************************************************************** **/
309
- /** ************************ SOAP-functions (as in the API) ********************* **/
310
  /** ***************************************************************************** **/
311
 
312
  /**
313
- * @param int $iTransactionId
314
- * @param string $strEmail
315
- * @param string $strPassword
316
- * @param bool $bPwHash - true means, the password is given as a hash
317
- * @return 'OK' = email and password are correct or user email does not exist
318
- * 'PASSWORD_WRONG' = email is correct but password is wrong
319
- * 'SOAP_EXCEPTION'
320
  */
321
- public static function createShopUser( $iTransactionId, $strEmail, $strPassword, $bPwHash = true )
322
  {
323
  self::_log('createShopUser');
324
-
325
- $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
326
- $SoapClient = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2,
327
- 'trace' => true,
328
- 'classmap' => array('CreateShopOrderResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CreateShopOrder'),
329
- 'cache_wsdl' => WSDL_CACHE_NONE
330
- )
331
- );
332
-
333
- $soapRequest = array();
334
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
335
- $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
336
-
337
- $Doc = new DOMDocument('1.0', 'UTF-8');
338
- $Doc->formatOutput = true;
339
- $_Order = $Doc->createElement('Order');
340
- $Doc->appendChild($_Order);
341
-
342
- $TransactionID = $Doc->createElement('TransactionID', '999999' . $iTransactionId);
343
- $_Order->appendChild($TransactionID);
344
-
345
- $ThemeID = $Doc->createElement('ThemeID', Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id'));
346
- $_Order->appendChild($ThemeID);
347
-
348
- $EMail = $Doc->createElement('EMail', $strEmail);
349
  $_Order->appendChild($EMail);
350
-
351
  if( $bPwHash )
352
- {
353
- $Password = $Doc->createElement('PasswordHash', $strPassword);
354
  $_Order->appendChild($Password);
355
  }
356
  else
357
  {
358
- $Password = $Doc->createElement('Password', $strPassword);
359
  $_Order->appendChild($Password);
360
- }
361
-
362
- $soapRequest['XML'] = $Doc->saveXML();
363
- try
364
- {
365
  $Result = $SoapClient->__call('CreateShopOrder', array( 'parameters' => $soapRequest ) );
366
 
367
  self::_log('Request:');
368
  self::_log( $SoapClient->__getLastRequest() );
369
  self::_log('Response:');
370
- self::_log( $SoapClient->__getLastResponse() );
371
 
372
- if( $Result->CreateShopOrderResult==1 && $Result->ErrorCode==0 )
373
- {
374
- return 'OK';
375
- }
376
- if( $Result->ErrorCode==-4 )
377
- {
378
- return 'PASSWORD_WRONG';
379
- }
380
- }
381
- catch (SoapFault $Exception)
382
- {
383
- self::_log($Exception->getMessage());
384
- return 'SOAP_EXCEPTION';
 
385
  }
386
  }
387
 
@@ -393,50 +396,50 @@ class Acegmbh_Flux_Helper_Data
393
  * 'PASSWORD_WRONG' = email is correct but password is wrong
394
  * 'SOAP_EXCEPTION'
395
  */
396
- public static function checkUserExists($strEmail, $strPassword, $bPwHash = true )
397
- {
398
- self::_log('checkUserExists');
399
-
400
- $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
401
- $SoapClient = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2,
402
- 'trace' => true,
403
- 'classmap' => array('CheckUserExistsResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CheckUserExists'),
404
- 'cache_wsdl' => WSDL_CACHE_NONE
405
- )
406
- );
407
-
408
- $soapRequest = array();
409
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
410
- $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
411
-
412
- $Doc = new DOMDocument('1.0', 'UTF-8');
413
- $Doc->formatOutput = true;
414
- $_Customer = $Doc->createElement('Customer');
415
- $Doc->appendChild($_Customer);
416
-
417
- $EMail = $Doc->createElement('EMail', $strEmail);
418
- $_Customer->appendChild($EMail);
419
 
420
- if( $bPwHash )
421
- {
422
- $Password = $Doc->createElement('PasswordHash', $strPassword);
423
- $_Customer->appendChild($Password);
424
- }
425
- else
426
- {
427
- $Password = $Doc->createElement('Password', $strPassword);
428
- $_Customer->appendChild($Password);
429
  }
430
-
431
- $soapRequest['XML'] = $Doc->saveXML();
432
- try
433
- {
434
- $Result = $SoapClient->__call('CheckUserExists', array( 'parameters' => $soapRequest ) );
435
-
 
 
 
 
 
436
  self::_log('Request:');
437
  self::_log( $SoapClient->__getLastRequest() );
438
  self::_log('Response:');
439
- self::_log( $SoapClient->__getLastResponse() );
440
 
441
  if( $Result->CheckUserExistsResult==1 && $Result->ErrorCode==0 )
442
  {
@@ -446,13 +449,14 @@ class Acegmbh_Flux_Helper_Data
446
  {
447
  return 'PASSWORD_WRONG';
448
  }
449
- return $Result->ErrorCode;
450
- }
451
- catch (SoapFault $Exception)
452
- {
453
  self::_log($Exception->getMessage());
454
- return 'SOAP_EXCEPTION';
455
- }
 
456
  }
457
 
458
  /**
@@ -465,56 +469,56 @@ class Acegmbh_Flux_Helper_Data
465
  * @return 'OK' = email and password are correct or user email does not exist
466
  * 'PASSWORD_WRONG' = email is correct but password is wrong
467
  * 'SOAP_EXCEPTION'
468
- */
469
- public static function changeCustomerPassword( $strEmail,
470
  $strPwOld,
471
  $bPwOldHash,
472
  $strPwNew,
473
- $bPwNewHash )
474
  {
475
 
476
- self::_log('changeCustomerPassword');
477
-
478
- $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
479
- $SoapClient = new SoapClient( $wsdl, array( 'soap_version' => SOAP_1_2,
480
- 'trace' => true,
481
- 'classmap' => array( 'ChangeCustomerPasswordResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_ChangeCustomerPassword' ),
482
- 'cache_wsdl' => WSDL_CACHE_NONE
483
- )
484
- );
485
-
486
- $soapRequest = array();
487
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
488
- $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
489
-
490
- $Doc = new DOMDocument('1.0', 'UTF-8');
491
- $Doc->formatOutput = true;
492
- $_Customer = $Doc->createElement('Customer');
493
- $Doc->appendChild($_Customer);
494
-
495
- $_Email = $Doc->createElement('EMail', $strEmail);
496
- $_Customer->appendChild($_Email);
497
-
498
- if( $bPwOldHash==true )
499
  {
500
- $Password = $Doc->createElement('PasswordHash', $strPwOld);
501
  }
502
  else
503
- {
504
- $Password = $Doc->createElement('Password', $strPwOld);
505
  }
506
  $_Customer->appendChild($Password);
507
 
508
- if( $bPwNewHash==true )
509
  {
510
  $NewPassword = $Doc->createElement('NewPasswordHash', $strPwNew );
511
- }
512
- else
513
- {
514
- $NewPassword = $Doc->createElement('NewPassword', $strPwNew );
515
  }
516
- $_Customer->appendChild($NewPassword);
517
-
 
 
 
 
518
  $soapRequest['XML'] = $Doc->saveXML();
519
  try
520
  {
@@ -525,59 +529,61 @@ class Acegmbh_Flux_Helper_Data
525
  self::_log('Response:');
526
  self::_log( $SoapClient->__getLastResponse() );
527
 
528
- if( $Result->ChangeCustomerPasswordResult==1 && $Result->ErrorCode==0 )
529
- {
530
- return 'OK';
531
- }
532
- if( $Result->ErrorCode==-4 )
533
- {
534
- return 'EMAIL_NOT_FOUND';
535
  }
536
  }
537
  catch (SoapFault $Exception)
538
  {
539
  self::_log($Exception->getMessage());
 
 
540
  return 'SOAP_EXCEPTION';
541
  }
542
 
543
  }
544
 
545
- /**
546
- */
547
- public static function getProjects()
548
- {
549
- self::_log('getProjects');
550
-
551
- $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
552
- $SoapClient = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2,
553
- 'trace' => true,
554
- 'classmap' => array('CheckUserExistsResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_GetProjects'),
555
- 'cache_wsdl' => WSDL_CACHE_NONE
556
- )
557
- );
558
-
559
- $soapRequest = array();
560
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
561
  $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
562
- $soapRequest['ThemeID'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id');
563
-
564
- $Doc = new DOMDocument('1.0', 'UTF-8');
565
- $Doc->formatOutput = true;
566
- $soapRequest['XML'] = $Doc->saveXML();
567
- try
568
- {
569
- $Result = $SoapClient->__call('GetProjects', array( 'parameters' => $soapRequest ) );
570
-
571
- self::_log('Request:');
572
- self::_log( $SoapClient->__getLastRequest() );
573
- self::_log('Response:');
574
- self::_log( $SoapClient->__getLastResponse() );
575
 
576
- if( $Result->GetProjectsResult==true && $Result->ErrorCode==0 )
577
- {
578
- // echo '>>>'.count($Result->Licenses).'<<<';
579
- // echo '<pre>';
580
- // var_dump($Result->Licenses->stLicense);
581
  // echo '</pre>';
582
  if( is_array($Result->Projects->stProject) )
583
  {
@@ -588,55 +594,57 @@ class Acegmbh_Flux_Helper_Data
588
  $arrReturn = array();
589
  $arrReturn[] = $Result->Projects->stProject;
590
  return $arrReturn;
591
- }
592
-
593
-
594
- foreach( $Result->Licenses->stLicense as $license )
595
- {
596
- echo "\n<br />" . '***';
597
- // print_r($license);
598
- echo "\n<br />" . $license->ID;
599
- echo "\n<br />" . $license->Name;
600
- echo "\n<br />" . $license->LicType;
601
- }
602
  }
603
-
604
- }
605
- catch (SoapFault $Exception)
606
  {
607
- self::_log($Exception->getMessage());
608
- return 'SOAP_EXCEPTION';
609
- }
 
 
610
  }
611
 
612
- /**
613
- */
614
- public static function getLicenses()
615
- {
616
- self::_log('getLicenses');
617
-
618
- $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
619
- $SoapClient = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2,
620
- 'trace' => true,
621
- 'classmap' => array('CheckUserExistsResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_GetLicenses'),
622
- 'cache_wsdl' => WSDL_CACHE_NONE
623
- )
624
- );
625
- $soapRequest = array();
626
- $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
627
- $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
628
- $soapRequest['ThemeID'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id');
629
-
630
- $Doc = new DOMDocument('1.0', 'UTF-8');
631
- $Doc->formatOutput = true;
632
- $soapRequest['XML'] = $Doc->saveXML();
633
- try
634
- {
635
- $Result = $SoapClient->__call('GetLicenses', array( 'parameters' => $soapRequest ) );
636
 
637
- self::_log('Request:');
638
- self::_log( $SoapClient->__getLastRequest() );
639
- self::_log('Response:');
640
  self::_log( $SoapClient->__getLastResponse() );
641
 
642
  if( $Result->GetLicensesResult==true && $Result->ErrorCode==0 )
@@ -656,25 +664,27 @@ class Acegmbh_Flux_Helper_Data
656
  echo "\n<br />" . $license->LicType;
657
  }
658
  }
659
-
660
- // public $Licenses;
661
- /*
662
- if( $Result->CheckUserExistsResult==1 && $Result->ErrorCode==0 )
663
- {
664
- return 'OK';
665
- }
666
- if( $Result->ErrorCode==-5 )
667
- {
668
- return 'PASSWORD_WRONG';
669
- }
670
- return $Result->ErrorCode;
671
- */
672
- }
673
- catch (SoapFault $Exception)
674
- {
675
- self::_log($Exception->getMessage());
676
- return 'SOAP_EXCEPTION';
677
- }
 
 
678
  }
679
  /**
680
  */
@@ -684,12 +694,12 @@ class Acegmbh_Flux_Helper_Data
684
  self::_log('checkPreviewExists');
685
 
686
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
687
- $SoapClient = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2,
688
- 'trace' => true,
689
- 'classmap' => array('CheckPreviewExists' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CheckPreviewExists'),
690
- 'cache_wsdl' => WSDL_CACHE_NONE
691
- )
692
- );
693
  $soapRequest = array();
694
  $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
695
  $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
@@ -714,14 +724,16 @@ class Acegmbh_Flux_Helper_Data
714
  catch (SoapFault $Exception)
715
  {
716
  self::_log($Exception->getMessage());
 
 
717
  return 'SOAP_EXCEPTION';
718
  }
719
  }
720
- /** ***************************************************************************** **/
721
- /** **************************** logging-functions ****************************** **/
722
  /** ***************************************************************************** **/
723
-
724
- private static function _log($strLogText)
 
 
725
  {
726
  // echo '<pre>';
727
  // echo htmlentities($strLogText);
@@ -729,27 +741,27 @@ class Acegmbh_Flux_Helper_Data
729
  Mage::log($strLogText, null, self::LOGFILE);
730
  }
731
 
732
- private static function _logflux( $iIdOrder, $iIdStore, $iIdCustomer, $strRequest, $strResponse, $iErrorCode )
733
- {
734
- $FluxOrders = Mage::getModel('flux/orders');
735
- $FluxOrders->setOrderId( $iIdOrder );
736
- $FluxOrders->setStoreId( $iIdStore );
737
- $FluxOrders->setCustomerId( $iIdCustomer );
738
- $FluxOrders->setRequest( $strRequest );
739
- $FluxOrders->setResponse( $strResponse );
740
- $FluxOrders->setError(self::$errors[$iErrorCode]);
741
- $FluxOrders->save();
742
  }
743
 
744
- public static function prepareLoginEx( $strCustomerMail, $strCustomerPasswordHash)
745
  {
746
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
747
- $SoapClient = new SoapClient( $wsdl, array( 'soap_version' => SOAP_1_2,
748
- 'trace' => true,
749
- 'classmap' => array( 'PrepareLogin' => 'Acegmbh_Flux_Model_Flux_Soap_Response_PrepareLogin' ),
750
- 'cache_wsdl' => WSDL_CACHE_NONE
751
- )
752
- );
753
 
754
  $soapRequest = array();
755
  $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
@@ -765,13 +777,15 @@ class Acegmbh_Flux_Helper_Data
765
  $_Customer->appendChild($_EMail);
766
 
767
  $_Password = $Doc->createElement('PasswordHash', $strCustomerPasswordHash);
 
768
  $_Customer->appendChild($_Password);
769
 
770
  $soapRequest['XML'] = $Doc->saveXML();
771
 
772
  try
773
- {
774
  $Result = $SoapClient->__call('PrepareLoginEx', array( 'parameters' => $soapRequest ) );
 
775
  if( $Result->PrepareLoginExResult==true && $Result->ErrorCode==0 ){
776
 
777
  return $Result->sURL;
@@ -788,5 +802,9 @@ class Acegmbh_Flux_Helper_Data
788
 
789
  }
790
  }
791
-
 
 
 
 
792
  }
31
  '-5' => self::ERROR_UNDEFINED
32
  );
33
 
34
+ public static $errorsemail = array(
35
+ 0 => self::SUCCESSFUL,
36
+ '-1' => self::ERROR_INVALID_USER,
37
+ '-2' => self::ERROR_INVALID_XML,
38
+ '-3' => self::ERROR_NONEXISTANT_CUSTOMER_NODE,
39
+ '-4' => self::ERROR_NONEXISTANT_CUSTOMER,
40
  '-5' => self::ERROR_NONEXISTANT_PASSWORD_NODE,
41
  '-7' => self::ERROR_NONEXISTANT_NEWEMAIL_NODE,
42
+ '-8' => self::ERROR_EMAIL_EXISTS,
43
  );
44
+ /** ***************************************************************************** **/
45
+ /** ****************************** SOAP-functions ******************************* **/
 
46
  /** ***************************************************************************** **/
47
 
48
+ /**
49
+ * Change password.
50
+ *
51
+ * @version 0.1
52
+ *
53
  * @param Mage_Customer_Model_Customer $Customer
54
+ * @param string $currentPassword
55
+ * @param string $newPassword
56
+ *
57
+ * @return boolean
58
+ */
59
  public static function changePassword( Mage_Customer_Model_Customer $Customer,
60
  $currentPassword,
61
  $newPassword,
62
+ $bHashvaluesGiven = false )
63
  {
64
  self::_log('changePassword');
65
 
66
  $customerId = $Customer->getId();
67
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
68
+ $SoapClient = new SoapClient($wsdl ,array('soap_version' => SOAP_1_2,
69
+ 'trace' => true,
70
+ 'classmap' => array(
71
+ 'CreateCustomerPasswordResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_ChangeCustomerPassword'
72
+ ),
73
+ 'cache_wsdl' => WSDL_CACHE_NONE
74
+ )
75
+ );
76
+
77
+ $soapRequest = array();
78
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
79
+ $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
80
+
81
+ $Doc = new DOMDocument('1.0', 'UTF-8');
82
+ $Doc->formatOutput = true;
83
+ $_Customer = $Doc->createElement('Customer');
 
 
84
  $Doc->appendChild($_Customer);
85
+
86
+ $_Email = $Doc->createElement('EMail', $Customer->getEmail());
87
  $_Customer->appendChild($_Email);
88
 
89
  if( $bHashvaluesGiven )
90
  {
91
+ $Password = $Doc->createElement('PasswordHash', $currentPassword);
92
+ $_Customer->appendChild($Password);
93
+
94
+ $NewPassword = $Doc->createElement('NewPasswordHash', $newPassword);
95
  $_Customer->appendChild($NewPassword);
96
  }
97
  else
98
  {
99
+ $Password = $Doc->createElement('PasswordHash', $Customer->hashPassword($currentPassword) );
100
+ $_Customer->appendChild($Password);
101
+
102
+ $NewPassword = $Doc->createElement('NewPasswordHash', $Customer->hashPassword($newPassword) );
103
  $_Customer->appendChild($NewPassword);
104
  }
105
+
106
+ $soapRequest['XML'] = $Doc->saveXML();
107
+ try
108
+ {
109
  $Result = $SoapClient->__call('ChangeCustomerPassword', array('parameters' => $soapRequest) );
110
  $Result->ChangeCustomerPasswordResult;
111
 
112
+ self::_log('Request:');
113
+ self::_log(html_entity_decode($SoapClient->__getLastRequest()));
114
+ self::_log('Response:');
115
+ self::_log($SoapClient->__getLastResponse());
116
+
117
+ if( $Result->ErrorCode<0 )
118
+ { throw new Exception($Exception->getMessage());
119
+ return $Result->ErrorCode;
120
+ }
121
+ else
122
+ {
123
+ return true;
124
  }
125
+ }
126
+ catch (SoapFault $Exception)
127
  {
128
  self::_log($Exception->getMessage());
129
+ throw new Exception($Exception->getMessage());
130
  return false;
131
  }
132
  }
133
 
134
+ public static function changeEmail(Mage_Customer_Model_Customer $Customer, $strNewEmail)
135
  {
136
  self::_log('changeEmail');
137
+
138
  $customerId = $Customer->getId();
139
+
140
+ $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
141
+ $SoapClient = new SoapClient($wsdl ,array('soap_version' => SOAP_1_2,
142
+ 'trace' => true,
143
+ 'classmap' => array(
144
+ 'ChangeCustomerEMailResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_ChangeCustomerEMail'
145
+ ),
146
+ 'cache_wsdl' => WSDL_CACHE_NONE
147
+ )
148
+ );
149
+
150
+ $soapRequest = array();
151
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
152
+ $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
153
+
154
+ $Doc = new DOMDocument('1.0', 'UTF-8');
155
+ $Doc->formatOutput = true;
156
+ $_Customer = $Doc->createElement('Customer');
 
 
157
  $Doc->appendChild($_Customer);
158
+
159
+ $_Email = $Doc->createElement('EMail', $Customer->getEmail());
160
  $_Customer->appendChild($_Email);
161
 
162
+ $_NewEmail = $Doc->createElement('NewEMail', $strNewEmail);
163
  $_Customer->appendChild($_NewEmail);
164
+
165
+ $Password = $Doc->createElement('PasswordHash', $Customer->getData("password_hash"));
166
+ $_Customer->appendChild($Password);
167
+
168
+ $soapRequest['XML'] = $Doc->saveXML();
169
+ try
170
+ {
171
+ $Result = $SoapClient->__call('ChangeCustomerEMail', array('parameters' => $soapRequest) );
172
  $Result->ChangeCustomerEMailResult;
173
 
174
+ self::_log('Request:');
175
+ self::_log( $SoapClient->__getLastRequest() );
176
+ self::_log('Response:');
177
+ self::_log( $SoapClient->__getLastResponse() );
178
+
179
+ if( $Result->ErrorCode<0 )
180
+ {
181
+ return $Result->ErrorCode;
182
+ }
183
+ else
184
+ {
185
+ return true;
186
+ }
187
+ }
188
+ catch (SoapFault $Exception)
189
+ {
190
  self::_log($Exception->getMessage());
191
+ throw new Exception($Exception->getMessage());
192
+ return false;
193
  }
194
  }
195
 
196
+ public static function createShopOrder($Order)
197
  {
198
  self::_log('createShopOrder');
199
 
201
  $Customer = Mage::getModel('customer/customer')->load($iIdCustomer);
202
 
203
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
204
+ $SoapClient = new SoapClient($wsdl, array('soap_version'=> SOAP_1_2,
205
+ 'trace' => true,
206
+ 'classmap' => array('CreateShopOrderResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CreateShopOrder'),
207
+ 'cache_wsdl' => WSDL_CACHE_NONE
208
+ )
209
+ );
210
 
211
  $soapRequest = array();
212
  $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
238
  {
239
  $productId = $_Item->getData('product_id');
240
  $Product = Mage::getModel('catalog/product')->load($productId);
241
+ $projectId=$Product->getProjectId();
242
+ $licenseId=$Product->getLicenseId();
243
+ if(!empty($projectId) && !empty($licenseId))
244
+ {
245
+ $attributeSetModel = Mage::getModel("eav/entity_attribute_set");
246
+ $attributeSetModel->load( $Product->getAttributeSetId() );
247
  $attributeSetName = $attributeSetModel->getAttributeSetName();
248
 
249
  self::_log( 'ProductId: ' . $productId . ', ' .
271
  $Item->appendChild($Count);
272
 
273
  $iSentItems++;
274
+ }
275
  }
276
 
277
+ if( 0==$iSentItems )
278
  {
279
  /**
280
  * don't sent data, if the order has no digital items
281
  */
282
+ self::_log('do not sent data, if the order has no digital items ');
283
+ return;
284
  }
285
 
286
  $soapRequest['XML'] = $Doc->saveXML();
288
  {
289
  $Result = $SoapClient->__call('CreateShopOrder', array( 'parameters' => $soapRequest ) );
290
 
291
+ self::_log('Request:');
292
+ self::_log( $SoapClient->__getLastRequest() );
293
+ self::_log('Response:');
294
  self::_log( $SoapClient->__getLastResponse() );
295
 
296
  self::_logflux( $Order->getId(),
303
  catch (SoapFault $Exception)
304
  {
305
  self::_log($Exception->getMessage());
306
+ throw new Exception($Exception->getMessage());
307
  }
308
  }
309
+
310
+ /** ***************************************************************************** **/
311
+ /** ************************ SOAP-functions (as in the API) ********************* **/
312
  /** ***************************************************************************** **/
313
 
314
  /**
315
+ * @param int $iTransactionId
316
+ * @param string $strEmail
317
+ * @param string $strPassword
318
+ * @param bool $bPwHash - true means, the password is given as a hash
319
+ * @return 'OK' = email and password are correct or user email does not exist
320
+ * 'PASSWORD_WRONG' = email is correct but password is wrong
321
+ * 'SOAP_EXCEPTION'
322
  */
323
+ public static function createShopUser( $iTransactionId, $strEmail, $strPassword, $bPwHash = true )
324
  {
325
  self::_log('createShopUser');
326
+
327
+ $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
328
+ $SoapClient = new SoapClient($wsdl, array('soap_version'=> SOAP_1_2,
329
+ 'trace' => true,
330
+ 'classmap' => array('CreateShopOrderResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CreateShopOrder'),
331
+ 'cache_wsdl' => WSDL_CACHE_NONE
332
+ )
333
+ );
334
+
335
+ $soapRequest = array();
336
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
337
+ $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
338
+
339
+ $Doc = new DOMDocument('1.0', 'UTF-8');
340
+ $Doc->formatOutput = true;
341
+ $_Order = $Doc->createElement('Order');
342
+ $Doc->appendChild($_Order);
343
+
344
+ $TransactionID = $Doc->createElement('TransactionID', '999999' . $iTransactionId);
345
+ $_Order->appendChild($TransactionID);
346
+
347
+ $ThemeID = $Doc->createElement('ThemeID', Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id'));
348
+ $_Order->appendChild($ThemeID);
349
+
350
+ $EMail = $Doc->createElement('EMail', $strEmail);
351
  $_Order->appendChild($EMail);
352
+
353
  if( $bPwHash )
354
+ {
355
+ $Password = $Doc->createElement('PasswordHash', $strPassword);
356
  $_Order->appendChild($Password);
357
  }
358
  else
359
  {
360
+ $Password = $Doc->createElement('Password', $strPassword);
361
  $_Order->appendChild($Password);
362
+ }
363
+
364
+ $soapRequest['XML'] = $Doc->saveXML();
365
+ try
366
+ {
367
  $Result = $SoapClient->__call('CreateShopOrder', array( 'parameters' => $soapRequest ) );
368
 
369
  self::_log('Request:');
370
  self::_log( $SoapClient->__getLastRequest() );
371
  self::_log('Response:');
372
+ self::_log( $SoapClient->__getLastResponse() );
373
 
374
+ if( $Result->CreateShopOrderResult==1 && $Result->ErrorCode==0 )
375
+ {
376
+ return 'OK';
377
+ }
378
+ if( $Result->ErrorCode==-4 )
379
+ {
380
+ return 'PASSWORD_WRONG';
381
+ }
382
+ }
383
+ catch (SoapFault $Exception)
384
+ {
385
+ self::_log($Exception->getMessage());
386
+ throw new Exception($Exception->getMessage());
387
+ return 'SOAP_EXCEPTION';
388
  }
389
  }
390
 
396
  * 'PASSWORD_WRONG' = email is correct but password is wrong
397
  * 'SOAP_EXCEPTION'
398
  */
399
+ public static function checkUserExists($strEmail, $strPassword, $bPwHash = true )
400
+ {
401
+ self::_log('checkUserExists');
402
+
403
+ $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
404
+ $SoapClient = new SoapClient($wsdl, array('soap_version' => SOAP_1_2,
405
+ 'trace' => true,
406
+ 'classmap' => array('CheckUserExistsResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CheckUserExists'),
407
+ 'cache_wsdl' => WSDL_CACHE_NONE
408
+ )
409
+ );
410
+
411
+ $soapRequest = array();
412
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
413
+ $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
414
+
415
+ $Doc = new DOMDocument('1.0', 'UTF-8');
416
+ $Doc->formatOutput = true;
417
+ $_Customer = $Doc->createElement('Customer');
418
+ $Doc->appendChild($_Customer);
419
+
420
+ $EMail = $Doc->createElement('EMail', $strEmail);
421
+ $_Customer->appendChild($EMail);
422
 
423
+ if( $bPwHash )
424
+ {
425
+ $Password = $Doc->createElement('PasswordHash', $strPassword);
426
+ $_Customer->appendChild($Password);
 
 
 
 
 
427
  }
428
+ else
429
+ {
430
+ $Password = $Doc->createElement('Password', $strPassword);
431
+ $_Customer->appendChild($Password);
432
+ }
433
+
434
+ $soapRequest['XML'] = $Doc->saveXML();
435
+ try
436
+ {
437
+ $Result = $SoapClient->__call('CheckUserExists', array( 'parameters' => $soapRequest ) );
438
+
439
  self::_log('Request:');
440
  self::_log( $SoapClient->__getLastRequest() );
441
  self::_log('Response:');
442
+ self::_log( $SoapClient->__getLastResponse() );
443
 
444
  if( $Result->CheckUserExistsResult==1 && $Result->ErrorCode==0 )
445
  {
449
  {
450
  return 'PASSWORD_WRONG';
451
  }
452
+ return $Result->ErrorCode;
453
+ }
454
+ catch (SoapFault $Exception)
455
+ {
456
  self::_log($Exception->getMessage());
457
+ throw new Exception($Exception->getMessage());
458
+ return 'SOAP_EXCEPTION';
459
+ }
460
  }
461
 
462
  /**
469
  * @return 'OK' = email and password are correct or user email does not exist
470
  * 'PASSWORD_WRONG' = email is correct but password is wrong
471
  * 'SOAP_EXCEPTION'
472
+ */
473
+ public static function changeCustomerPassword($strEmail,
474
  $strPwOld,
475
  $bPwOldHash,
476
  $strPwNew,
477
+ $bPwNewHash )
478
  {
479
 
480
+ self::_log('changeCustomerPassword');
481
+
482
+ $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
483
+ $SoapClient = new SoapClient( $wsdl, array('soap_version'=> SOAP_1_2,
484
+ 'trace'=> true,
485
+ 'classmap'=> array( 'ChangeCustomerPasswordResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_ChangeCustomerPassword' ),
486
+ 'cache_wsdl'=> WSDL_CACHE_NONE
487
+ )
488
+ );
489
+
490
+ $soapRequest = array();
491
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
492
+ $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
493
+
494
+ $Doc = new DOMDocument('1.0', 'UTF-8');
495
+ $Doc->formatOutput = true;
496
+ $_Customer = $Doc->createElement('Customer');
497
+ $Doc->appendChild($_Customer);
498
+
499
+ $_Email = $Doc->createElement('EMail', $strEmail);
500
+ $_Customer->appendChild($_Email);
501
+
502
+ if( $bPwOldHash==true )
503
  {
504
+ $Password = $Doc->createElement('PasswordHash', $strPwOld);
505
  }
506
  else
507
+ {
508
+ $Password = $Doc->createElement('Password', $strPwOld);
509
  }
510
  $_Customer->appendChild($Password);
511
 
512
+ if( $bPwNewHash==true )
513
  {
514
  $NewPassword = $Doc->createElement('NewPasswordHash', $strPwNew );
 
 
 
 
515
  }
516
+ else
517
+ {
518
+ $NewPassword = $Doc->createElement('NewPassword', $strPwNew );
519
+ }
520
+ $_Customer->appendChild($NewPassword);
521
+
522
  $soapRequest['XML'] = $Doc->saveXML();
523
  try
524
  {
529
  self::_log('Response:');
530
  self::_log( $SoapClient->__getLastResponse() );
531
 
532
+ if( $Result->ChangeCustomerPasswordResult==1 && $Result->ErrorCode==0 )
533
+ {
534
+ return 'OK';
535
+ }
536
+ if( $Result->ErrorCode==-4 )
537
+ {
538
+ return 'EMAIL_NOT_FOUND';
539
  }
540
  }
541
  catch (SoapFault $Exception)
542
  {
543
  self::_log($Exception->getMessage());
544
+ //Mage::getSingleton('customer/session')->addError($Exception->getMessage());
545
+ throw new Exception($Exception->getMessage());
546
  return 'SOAP_EXCEPTION';
547
  }
548
 
549
  }
550
 
551
+ /**
552
+ */
553
+ public static function getProjects()
554
+ {
555
+ self::_log('getProjects');
556
+
557
+ $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
558
+ $SoapClient = new SoapClient($wsdl, array('soap_version'=> SOAP_1_2,
559
+ 'trace' => true,
560
+ 'classmap' => array('CheckUserExistsResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_GetProjects'),
561
+ 'cache_wsdl' => WSDL_CACHE_NONE
562
+ )
563
+ );
564
+
565
+ $soapRequest = array();
566
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
567
  $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
568
+ $soapRequest['ThemeID'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id');
569
+
570
+ $Doc = new DOMDocument('1.0', 'UTF-8');
571
+ $Doc->formatOutput = true;
572
+ $soapRequest['XML'] = $Doc->saveXML();
573
+ try
574
+ {
575
+ $Result = $SoapClient->__call('GetProjects', array( 'parameters' => $soapRequest ) );
576
+
577
+ self::_log('Request:');
578
+ self::_log( $SoapClient->__getLastRequest() );
579
+ self::_log('Response:');
580
+ self::_log( $SoapClient->__getLastResponse() );
581
 
582
+ if( $Result->GetProjectsResult==true && $Result->ErrorCode==0 )
583
+ {
584
+ // echo '>>>'.count($Result->Licenses).'<<<';
585
+ // echo '<pre>';
586
+ // var_dump($Result->Licenses->stLicense);
587
  // echo '</pre>';
588
  if( is_array($Result->Projects->stProject) )
589
  {
594
  $arrReturn = array();
595
  $arrReturn[] = $Result->Projects->stProject;
596
  return $arrReturn;
597
+ }
598
+
599
+
600
+ foreach( $Result->Licenses->stLicense as $license )
601
+ {
602
+ echo "\n<br />" . '***';
603
+ // print_r($license);
604
+ echo "\n<br />" . $license->ID;
605
+ echo "\n<br />" . $license->Name;
606
+ echo "\n<br />" . $license->LicType;
607
+ }
608
  }
609
+
610
+ }
611
+ catch (SoapFault $Exception)
612
  {
613
+ self::_log($Exception->getMessage());
614
+ //Mage::getModel('core/session')->addError($Exception->getMessage());
615
+ throw new Exception($Exception->getMessage());
616
+ return 'SOAP_EXCEPTION';
617
+ }
618
  }
619
 
620
+ /**
621
+ */
622
+ public static function getLicenses()
623
+ {
624
+ self::_log('getLicenses');
625
+
626
+ $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
627
+ $SoapClient = new SoapClient($wsdl, array('soap_version' => SOAP_1_2,
628
+ 'trace' => true,
629
+ 'classmap' => array('CheckUserExistsResponse' => 'Acegmbh_Flux_Model_Flux_Soap_Response_GetLicenses'),
630
+ 'cache_wsdl' => WSDL_CACHE_NONE
631
+ )
632
+ );
633
+ $soapRequest = array();
634
+ $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
635
+ $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
636
+ $soapRequest['ThemeID'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id');
637
+
638
+ $Doc = new DOMDocument('1.0', 'UTF-8');
639
+ $Doc->formatOutput = true;
640
+ $soapRequest['XML'] = $Doc->saveXML();
641
+ try
642
+ {
643
+ $Result = $SoapClient->__call('GetLicenses', array( 'parameters' => $soapRequest ) );
644
 
645
+ self::_log('Request:');
646
+ self::_log( $SoapClient->__getLastRequest() );
647
+ self::_log('Response:');
648
  self::_log( $SoapClient->__getLastResponse() );
649
 
650
  if( $Result->GetLicensesResult==true && $Result->ErrorCode==0 )
664
  echo "\n<br />" . $license->LicType;
665
  }
666
  }
667
+
668
+ // public $Licenses;
669
+ /*
670
+ if( $Result->CheckUserExistsResult==1 && $Result->ErrorCode==0 )
671
+ {
672
+ return 'OK';
673
+ }
674
+ if( $Result->ErrorCode==-5 )
675
+ {
676
+ return 'PASSWORD_WRONG';
677
+ }
678
+ return $Result->ErrorCode;
679
+ */
680
+ }
681
+ catch (SoapFault $Exception)
682
+ {
683
+ self::_log($Exception->getMessage());
684
+ //Mage::getModel('core/session')->addError($Exception->getMessage());
685
+ throw new Exception($Exception->getMessage());
686
+ return 'SOAP_EXCEPTION';
687
+ }
688
  }
689
  /**
690
  */
694
  self::_log('checkPreviewExists');
695
 
696
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
697
+ $SoapClient = new SoapClient($wsdl, array('soap_version'=> SOAP_1_2,
698
+ 'trace'=> true,
699
+ 'classmap'=> array('CheckPreviewExists' => 'Acegmbh_Flux_Model_Flux_Soap_Response_CheckPreviewExists'),
700
+ 'cache_wsdl' => WSDL_CACHE_NONE
701
+ )
702
+ );
703
  $soapRequest = array();
704
  $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
705
  $soapRequest['Password'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_password');
724
  catch (SoapFault $Exception)
725
  {
726
  self::_log($Exception->getMessage());
727
+ //Mage::getModel('core/session')->addError($Exception->getMessage());
728
+ throw new Exception($Exception->getMessage());
729
  return 'SOAP_EXCEPTION';
730
  }
731
  }
 
 
732
  /** ***************************************************************************** **/
733
+ /** **************************** logging-functions ****************************** **/
734
+ /** ***************************************************************************** **/
735
+
736
+ private static function _log($strLogText)
737
  {
738
  // echo '<pre>';
739
  // echo htmlentities($strLogText);
741
  Mage::log($strLogText, null, self::LOGFILE);
742
  }
743
 
744
+ private static function _logflux( $iIdOrder, $iIdStore, $iIdCustomer, $strRequest, $strResponse, $iErrorCode )
745
+ {
746
+ /*$FluxOrders = Mage::getModel('flux/orders');
747
+ $FluxOrders->setOrderId( $iIdOrder );
748
+ $FluxOrders->setStoreId( $iIdStore );
749
+ $FluxOrders->setCustomerId( $iIdCustomer );
750
+ $FluxOrders->setRequest( $strRequest );
751
+ $FluxOrders->setResponse( $strResponse );
752
+ $FluxOrders->setError(self::$errors[$iErrorCode]);
753
+ $FluxOrders->save();*/
754
  }
755
 
756
+ public static function prepareLoginEx( $strCustomerMail, $strCustomerPasswordHash)
757
  {
758
  $wsdl = Mage::getStoreConfig('acegmbh_flux/flux/flux_wsdl');
759
+ $SoapClient = new SoapClient( $wsdl, array('soap_version'=> SOAP_1_2,
760
+ 'trace' => true,
761
+ 'classmap' => array( 'PrepareLogin' => 'Acegmbh_Flux_Model_Flux_Soap_Response_PrepareLogin' ),
762
+ 'cache_wsdl' => WSDL_CACHE_NONE
763
+ )
764
+ );
765
 
766
  $soapRequest = array();
767
  $soapRequest['EMail'] = Mage::getStoreConfig('acegmbh_flux/flux/flux_email');
777
  $_Customer->appendChild($_EMail);
778
 
779
  $_Password = $Doc->createElement('PasswordHash', $strCustomerPasswordHash);
780
+
781
  $_Customer->appendChild($_Password);
782
 
783
  $soapRequest['XML'] = $Doc->saveXML();
784
 
785
  try
786
+ { self::_log($soapRequest);
787
  $Result = $SoapClient->__call('PrepareLoginEx', array( 'parameters' => $soapRequest ) );
788
+ self::_log($Result);
789
  if( $Result->PrepareLoginExResult==true && $Result->ErrorCode==0 ){
790
 
791
  return $Result->sURL;
802
 
803
  }
804
  }
805
+
806
+ public static function getErrorMessage($code)
807
+ { $errors=self::$errors;
808
+ return isset($errors[$code])?$errors[$code]:null;
809
+ }
810
  }
app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Licenceids.php CHANGED
@@ -1,32 +1,46 @@
1
- <?php
2
- class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Licenceids
3
- extends Mage_Core_Model_Abstract
4
- {
5
- /**
6
- * Options getter
7
- *
8
- * @return array
9
- */
10
- static public function getAllOptions()
11
- //public function toOptionArray()
12
- {
13
- /*
14
- return array(
15
- '19' => Mage::helper('flux')->__('19 - permanent download/up to three devices'),
16
- '241' => Mage::helper('catalog')->__('241 - another Licence ID')
17
- );
18
- */
19
- $arr = Mage::helper('flux')->getLicenses();
20
-
21
- $arrReturn = array();
22
- foreach( $arr as $license )
23
- {
24
- $arrReturn[] = array( 'value' => $license->ID,
25
- 'label' => $license->Name);
26
- }
27
-
28
- // $arrReturn[] = array( 'value' => 241,
29
- // 'label' => '241 - another Licence ID');
30
- return $arrReturn;
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Licenceids
3
+ extends Mage_Core_Model_Abstract
4
+ {
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ static public function getAllOptions()
11
+ //public function toOptionArray()
12
+ {
13
+ /*
14
+ return array(
15
+ '19' => Mage::helper('flux')->__('19 - permanent download/up to three devices'),
16
+ '241' => Mage::helper('catalog')->__('241 - another Licence ID')
17
+ );
18
+ */
19
+ $arr = Mage::helper('flux')->getLicenses();
20
+
21
+ $arrReturn = array();
22
+ foreach( $arr as $license )
23
+ {
24
+ $arrReturn[] = array( 'value' => $license->ID,
25
+ 'label' => $license->Name);
26
+ }
27
+
28
+ // $arrReturn[] = array( 'value' => 241,
29
+ // 'label' => '241 - another Licence ID');
30
+ return $arrReturn;
31
+ }
32
+
33
+
34
+ public function getOptionText($value)
35
+ {
36
+ $arr = Mage::helper('flux')->getLicenses();
37
+ foreach( $arr as $license )
38
+ {
39
+ if($license->ID==$value)
40
+ {
41
+ return $license->Name;
42
+ }
43
+ }
44
+ }
45
+
46
+ }
app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Licenceids.php~ ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Licenceids
3
+ extends Mage_Core_Model_Abstract
4
+ {
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ static public function getAllOptions()
11
+ //public function toOptionArray()
12
+ {
13
+ /*
14
+ return array(
15
+ '19' => Mage::helper('flux')->__('19 - permanent download/up to three devices'),
16
+ '241' => Mage::helper('catalog')->__('241 - another Licence ID')
17
+ );
18
+ */
19
+ $arr = Mage::helper('flux')->getLicenses();
20
+
21
+ $arrReturn = array();
22
+ foreach( $arr as $license )
23
+ {
24
+ $arrReturn[] = array( 'value' => $license->ID,
25
+ 'label' => $license->Name);
26
+ }
27
+
28
+ // $arrReturn[] = array( 'value' => 241,
29
+ // 'label' => '241 - another Licence ID');
30
+ return $arrReturn;
31
+ }
32
+
33
+
34
+ public function getOptionText($value);
35
+ {
36
+ $arr = Mage::helper('flux')->getLicenses();
37
+ foreach( $arr as $license )
38
+ {
39
+ if($license->ID==$value)
40
+ {
41
+ return $license->Name;
42
+ }
43
+ }
44
+ }
45
+
46
+ }
app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Projectids.php CHANGED
@@ -1,40 +1,55 @@
1
- <?php
2
- class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Projectids
3
- extends Mage_Core_Model_Abstract
4
- {
5
- /**
6
- * Options getter
7
- *
8
- * @return array
9
- */
10
- static public function getAllOptions()
11
- //public function toOptionArray()
12
- {
13
- /*
14
- return array(
15
- '19' => Mage::helper('flux')->__('19 - permanent download/up to three devices'),
16
- '241' => Mage::helper('catalog')->__('241 - another Licence ID')
17
- );
18
- */
19
- $arr = Mage::helper('flux')->getProjects();
20
-
21
- $arrReturn = array();
22
- foreach( $arr as $project )
23
- {
24
- $arrReturn[] = array( 'value' => $project->LongProjectID,
25
- 'label' => $project->Name);
26
-
27
- /*
28
- <LongProjectID>0000-5517-51C6-E730</LongProjectID>
29
- <Name>Big Buck Bunny</Name>
30
- <CreationDate>2013-10-05T12:27:50</CreationDate>
31
- <ContentType>fluxDVD</ContentType>
32
- <Complete>true</Complete>
33
- */
34
- }
35
-
36
- // $arrReturn[] = array( 'value' => 241,
37
- // 'label' => '241 - another Licence ID');
38
- return $arrReturn;
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Projectids
3
+ extends Mage_Core_Model_Abstract
4
+ {
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ static public function getAllOptions()
11
+ //public function toOptionArray()
12
+ {
13
+ /*
14
+ return array(
15
+ '19' => Mage::helper('flux')->__('19 - permanent download/up to three devices'),
16
+ '241' => Mage::helper('catalog')->__('241 - another Licence ID')
17
+ );
18
+ */
19
+ $arr = Mage::helper('flux')->getProjects();
20
+
21
+ $arrReturn = array();
22
+ foreach( $arr as $project )
23
+ {
24
+ $arrReturn[] = array( 'value' => $project->LongProjectID,
25
+ 'label' => $project->Name);
26
+
27
+ /*
28
+ <LongProjectID>0000-5517-51C6-E730</LongProjectID>
29
+ <Name>Big Buck Bunny</Name>
30
+ <CreationDate>2013-10-05T12:27:50</CreationDate>
31
+ <ContentType>fluxDVD</ContentType>
32
+ <Complete>true</Complete>
33
+ */
34
+ }
35
+
36
+ // $arrReturn[] = array( 'value' => 241,
37
+ // 'label' => '241 - another Licence ID');
38
+ return $arrReturn;
39
+ }
40
+
41
+
42
+ public function getOptionText($value)
43
+ {
44
+ $arr = Mage::helper('flux')->getProjects();
45
+ foreach( $arr as $project )
46
+ {
47
+ if($project->LongProjectID==$value)
48
+ {
49
+ return $project->Name;
50
+ }
51
+ }
52
+ }
53
+
54
+
55
+ }
app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Projectids.php~ ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Projectids
3
+ extends Mage_Core_Model_Abstract
4
+ {
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ static public function getAllOptions()
11
+ //public function toOptionArray()
12
+ {
13
+ /*
14
+ return array(
15
+ '19' => Mage::helper('flux')->__('19 - permanent download/up to three devices'),
16
+ '241' => Mage::helper('catalog')->__('241 - another Licence ID')
17
+ );
18
+ */
19
+ $arr = Mage::helper('flux')->getProjects();
20
+
21
+ $arrReturn = array();
22
+ foreach( $arr as $project )
23
+ {
24
+ $arrReturn[] = array( 'value' => $project->LongProjectID,
25
+ 'label' => $project->Name);
26
+
27
+ /*
28
+ <LongProjectID>0000-5517-51C6-E730</LongProjectID>
29
+ <Name>Big Buck Bunny</Name>
30
+ <CreationDate>2013-10-05T12:27:50</CreationDate>
31
+ <ContentType>fluxDVD</ContentType>
32
+ <Complete>true</Complete>
33
+ */
34
+ }
35
+
36
+ // $arrReturn[] = array( 'value' => 241,
37
+ // 'label' => '241 - another Licence ID');
38
+ return $arrReturn;
39
+ }
40
+
41
+
42
+ public function getOptionText($value)
43
+ { echo $value;
44
+ $arr = Mage::helper('flux')->getProjects();
45
+ foreach( $arr as $project )
46
+ {
47
+ if($project->LongProjectID==$value)
48
+ {
49
+ return $project->Name;
50
+ }
51
+ }
52
+ }
53
+
54
+
55
+ }
app/code/community/Acegmbh/Flux/Model/Adminhtml/System/Config/Source/Wsdlurls.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Wsdlurls
3
- {
4
- /**
5
- * Options getter
6
- *
7
- * @return array
8
- */
9
- public function toOptionArray()
10
- {
11
- $arrReturn = array();
12
- $arrReturn[] = array( 'value' => 'http://sandbox.flickrocket.com/services/OnDemandOrder/Service.asmx?WSDL',
13
- 'label' => 'Sandbox');
14
- $arrReturn[] = array( 'value' => 'http://www.flickrocket.com/services/OnDemandOrder/Service.asmx?WSDL',
15
- 'label' => 'Live');
16
-
17
- return $arrReturn;
18
- }
19
  }
1
+ <?php
2
+ class Acegmbh_Flux_Model_Adminhtml_System_Config_Source_Wsdlurls
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ $arrReturn = array();
12
+ $arrReturn[] = array( 'value' => 'http://sandbox.flickrocket.com/services/OnDemandOrder/Service.asmx?WSDL',
13
+ 'label' => 'Sandbox');
14
+ $arrReturn[] = array( 'value' => 'http://www.flickrocket.com/services/OnDemandOrder/Service.asmx?WSDL',
15
+ 'label' => 'Live');
16
+
17
+ return $arrReturn;
18
+ }
19
  }
app/code/community/Acegmbh/Flux/Model/Customer.php CHANGED
@@ -4,24 +4,24 @@ class Acegmbh_Flux_Model_Customer
4
  extends Mage_Customer_Model_Customer
5
  {
6
 
7
- /*
8
- public function setPassword($password)
9
- {
10
  $this->setData('password', $password);
11
  $strHash = $this->hashPassword($password, 'MD');
12
  $this->setPasswordHash($strHash);
13
- return $this;
14
  }
15
  */
16
- /**
17
- * Hash customer password
18
- *
19
- * @param string $password
20
- * @param int $salt
21
- * @return string
22
- */
23
- public function hashPassword($password, $salt = null)
24
- {
25
- return Mage::helper('core')->getHash($password, 'MD');
26
  }
27
  }
4
  extends Mage_Customer_Model_Customer
5
  {
6
 
7
+ /*
8
+ public function setPassword($password)
9
+ {
10
  $this->setData('password', $password);
11
  $strHash = $this->hashPassword($password, 'MD');
12
  $this->setPasswordHash($strHash);
13
+ return $this;
14
  }
15
  */
16
+ /**
17
+ * Hash customer password
18
+ *
19
+ * @param string $password
20
+ * @param int $salt
21
+ * @return string
22
+ */
23
+ public function hashPassword($password, $salt = null)
24
+ {
25
+ return Mage::helper('core')->getHash($password, 'MD');
26
  }
27
  }
app/code/community/Acegmbh/Flux/Model/Customer/Entity/Customer.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Flux/Config/Demo.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Acegmbh_Flux_Model_Flux_Config_Demo extends Mage_Core_Model_Config_Data
3
+ {
4
+ public function save()
5
+ { $username = Mage::getSingleton('admin/session')->getUser()->getUsername();
6
+ if($username=="demo"){
7
+ Mage::throwException('This is a demo version. You cannot change the values.');
8
+ return;
9
+ }
10
+ return parent::save();
11
+ }
12
+ }
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/ChangeCustomerEMail.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/ChangeCustomerPassword.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/CheckUserExists.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/CreateShopOrder.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/GetLicenses.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
-
3
- class Acegmbh_Flux_Model_Flux_Soap_Response_GetLicenses
4
- {
5
- public $GetLicensesResult;
6
- public $Licenses;
7
- /*
8
- * <stLicense>
9
- * <ID>15</ID>
10
- * <Name>Rental (24 hours)</Name>
11
- * <LicType>ltFlickRocket</LicType>
12
- * </stLicense>
13
- * */
14
-
15
- /**
16
- * @var int $ErrorCode
17
- */
18
- public $ErrorCode;
19
  }
1
+ <?php
2
+
3
+ class Acegmbh_Flux_Model_Flux_Soap_Response_GetLicenses
4
+ {
5
+ public $GetLicensesResult;
6
+ public $Licenses;
7
+ /*
8
+ * <stLicense>
9
+ * <ID>15</ID>
10
+ * <Name>Rental (24 hours)</Name>
11
+ * <LicType>ltFlickRocket</LicType>
12
+ * </stLicense>
13
+ * */
14
+
15
+ /**
16
+ * @var int $ErrorCode
17
+ */
18
+ public $ErrorCode;
19
  }
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/GetProjects.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
-
3
- class Acegmbh_Flux_Model_Flux_Soap_Response_GetProjects
4
- {
5
- /**
6
- * @var int $ErrorCode
7
- */
8
- public $ErrorCode;
9
  }
1
+ <?php
2
+
3
+ class Acegmbh_Flux_Model_Flux_Soap_Response_GetProjects
4
+ {
5
+ /**
6
+ * @var int $ErrorCode
7
+ */
8
+ public $ErrorCode;
9
  }
app/code/community/Acegmbh/Flux/Model/Flux/Soap/Response/PrepareLogin.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Mysql4/Orders.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Mysql4/Orders/Collection.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Mysql4/Users.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Mysql4/Users/Collection.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Observer.php CHANGED
@@ -16,73 +16,73 @@ class Acegmbh_Flux_Model_Observer
16
  $Event = $Observer->getEvent();
17
  // echo '<pre>';
18
  // print_r($Event);
19
- // $object = new ReflectionObject($Event);
20
  // var_dump($object->getMethods());
21
  // echo '</pre>';
22
- // die();
23
  $Order = $Event->getOrder();
24
- if( $Order==null )
25
- {
26
- $arrOrderIds = $Observer->getOrderIds();
27
- $iIdOrder = $arrOrderIds[0];
28
- $Order = Mage::getModel('sales/order')->load($iIdOrder);
29
  }
30
- self::_log('idorder: ' . $iIdOrder);
31
- if( $Order==null )
32
- {
33
- throw new Exception("Zahlung konnte nicht abgeschlossen werden! Bitte wenden Sie sich an den Support.");
34
  }
35
  $Customer = Mage::getModel('customer/customer')->load($Order->getCustomerId());
36
-
37
- $strEmail = $Customer->getEmail();
38
- $strPassword = $_SESSION['flux_customer_password'];
39
- $strHashedPw = Mage::getModel('customer/customer')->hashPassword($strPassword);
40
  $iTransactionId = '99999' . $Customer->getId();
41
 
42
  self::_log('email: ' . $strEmail);
43
  self::_log('transactionid: ' . $iTransactionId);
44
 
45
  if( !empty($strPassword) )
46
- {
47
- $strResultCreate = Mage::helper('flux')->createShopUser($iTransactionId,
48
- $strEmail,
49
- $strHashedPw,
50
- true );
51
- if( $strResultCreate=='OK' )
52
- {
53
- // User erfolgreich neu angelegt, oder User mit gleichem Passwort bereits in Flux verfügbar
54
- }
55
- elseif( $strResultCreate=='PASSWORD_WRONG' )
56
- {
57
- $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
58
- $strPassword,
59
- false);
60
- if( $strResultCheck=='OK' )
61
- {
62
- // echo 'User in Flux verfügbar, Password korrekt, Passworthash falsch. PasswordHash anpassen.';
63
- $strResultChange = Mage::helper('flux')->changeCustomerPassword($strEmail,
64
- $strPassword,
65
- false,
66
- $strHashedPw,
67
- true );
68
- }
69
- elseif( $strResultCheck=='PASSWORD_WRONG' )
70
- {
71
- /**
72
- * this should never happen(!) because the same check is in the billing-step of onepage checkout
73
- **/
74
  self::_log('ERROR: User (' . $strEmail .') exists in Flux, but with an other password', null, 'Acegmbh_Flux_Data.log', true);
75
-
76
- // ('Der Benutzer ist in Flux bereits verfügbar, allerdings unter mit einem anderen Passwort.');
77
- }
78
- }
79
- else
80
- {
81
- self::_log('SOAP_ERROR in Observer->createFluxUser', null, 'Acegmbh_Flux_Data.log', true);
82
  }
83
  }
84
 
85
- $FluxHelper = Mage::helper('flux');
86
  $FluxHelper->createShopOrder($Order);
87
  }
88
 
@@ -95,50 +95,50 @@ class Acegmbh_Flux_Model_Observer
95
 
96
  $strEmail = $Customer->getEmail();
97
  $strPassword = $Customer->getPassword();
98
- $strHashedPw = Mage::getModel('customer/customer')->hashPassword($strPassword);
99
- $iTransactionId = '99999' . $Customer->getId();
100
 
101
- self::_log('email: ' . $strEmail);
102
  self::_log('transactionid: ' . $iTransactionId);
103
-
104
- $strResultCreate = Mage::helper('flux')->createShopUser($iTransactionId,
105
- $strEmail,
106
- $strHashedPw,
107
- true );
108
- if( $strResultCreate=='OK' )
109
  {
110
  // User erfolgreich neu angelegt, oder User mit gleichem Passwort bereits in Flux verfügbar
111
- }
112
- elseif( $strResultCreate=='PASSWORD_WRONG' )
113
- {
114
- $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
115
- $strPassword,
116
- false);
117
- if( $strResultCheck=='OK' )
118
  {
119
- // echo 'User in Flux verfügbar, Password korrekt, Passworthash falsch. PasswordHash anpassen.';
120
- $strResultChange = Mage::helper('flux')->changeCustomerPassword($strEmail,
121
- $strPassword,
122
- false,
123
- $strHashedPw,
124
- true );
125
- }
126
- elseif( $strResultCheck=='PASSWORD_WRONG' )
127
  {
128
  /**
129
  * this should never happen(!) because the same check is in $this->checkFluxUser()
130
  **/
131
  self::_log('ERROR: User (' . $strEmail .') exists in Flux, but with an other password', null, 'Acegmbh_Flux_Data.log', true);
132
- // ('Der Benutzer ist in Flux bereits verfügbar, allerdings unter mit einem anderen Passwort.');
133
- }
134
- }
135
- else
136
  {
137
  self::_log('SOAP_ERROR in Observer->createFluxUser', null, 'Acegmbh_Flux_Data.log', true);
138
- }
139
  }
140
 
141
- public function checkFluxUser(Varien_Event_Observer $Observer)
142
  {
143
  self::_log('checkFluxUser');
144
 
@@ -153,47 +153,139 @@ class Acegmbh_Flux_Model_Observer
153
  /** for regular "create customer" form **/
154
  $strEmail = $email;
155
  $strPassword = $password;
156
- $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
157
- $strPassword,
158
- false);
159
- if( $strResultCheck=='PASSWORD_WRONG' )
160
  {
161
- Mage::getSingleton('customer/session')->addError('Ihre E-Mail-Adresse ist bereits in Flux angelegt. Bitte verwenden Sie das Passwort aus Ihrem Flux Account.');
162
- $url = Mage::getModel('core/url') ->getUrl('*/*/create');
163
- Mage::app()->getResponse()->setRedirect($url);
164
- Mage::app()->getResponse()->sendResponse();
165
  exit;
166
  }
167
 
168
  }
169
 
170
- public function changeFluxPw(Varien_Event_Observer $Observer)
171
- {
172
  self::_log('changeFluxPw');
173
 
174
-
175
  // Check if it happens somewhere in the customer module
176
  $request = Mage::app()->getFrontController()->getRequest();
177
  $module = $request->getModuleName();
178
  //$controller = $request->getControllerName();
179
  //$action = $request->getActionName();
180
  if ( 'customer' != $module ) return;
181
-
182
- $event = $Observer->getEvent();
183
- $customer = $event->getCustomer();
184
- $postData = Mage::app()->getRequest()->getPost();
185
  if($customer instanceof Mage_Customer_Model_Customer && !$customer->isObjectNew())
186
- {
187
  if( $postData['change_password'] == 1 && $postData['current_password'] != $postData['password'] )
188
- {
189
- Mage::helper('flux')->changeCustomerPassword( $customer->getEmail(),
190
- $postData['current_password'],
191
- false,
192
- $postData['password'],
193
- false );
194
- }
195
- }
196
  return $this;
197
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
 
199
- }
16
  $Event = $Observer->getEvent();
17
  // echo '<pre>';
18
  // print_r($Event);
19
+ // $object = new ReflectionObject($Event);
20
  // var_dump($object->getMethods());
21
  // echo '</pre>';
22
+ // die();
23
  $Order = $Event->getOrder();
24
+ if( $Order==null )
25
+ {
26
+ $arrOrderIds = $Observer->getOrderIds();
27
+ $iIdOrder = $arrOrderIds[0];
28
+ $Order = Mage::getModel('sales/order')->load($iIdOrder);
29
  }
30
+ self::_log('idorder: ' . $iIdOrder);
31
+ if( $Order==null )
32
+ {
33
+ throw new Exception("Zahlung konnte nicht abgeschlossen werden! Bitte wenden Sie sich an den Support.");
34
  }
35
  $Customer = Mage::getModel('customer/customer')->load($Order->getCustomerId());
36
+
37
+ $strEmail = $Customer->getEmail();
38
+ //$strPassword = $_SESSION['flux_customer_password'];
39
+ $strHashedPw =$Customer->getPasswordHash();//$strPassword;// Mage::getModel('customer/customer')->hashPassword($strPassword);
40
  $iTransactionId = '99999' . $Customer->getId();
41
 
42
  self::_log('email: ' . $strEmail);
43
  self::_log('transactionid: ' . $iTransactionId);
44
 
45
  if( !empty($strPassword) )
46
+ {
47
+ $strResultCreate = Mage::helper('flux')->createShopUser($iTransactionId,
48
+ $strEmail,
49
+ $strHashedPw,
50
+ false );
51
+ if( $strResultCreate=='OK' )
52
+ {
53
+ // User erfolgreich neu angelegt, oder User mit gleichem Passwort bereits in Flux verfügbar
54
+ }
55
+ elseif( $strResultCreate=='PASSWORD_WRONG' )
56
+ {
57
+ $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
58
+ $strPassword,
59
+ false);
60
+ if( $strResultCheck=='OK' )
61
+ {
62
+ // echo 'User in Flux verfügbar, Password korrekt, Passworthash falsch. PasswordHash anpassen.';
63
+ $strResultChange = Mage::helper('flux')->changeCustomerPassword($strEmail,
64
+ $strPassword,
65
+ false,
66
+ $strHashedPw,
67
+ false );
68
+ }
69
+ elseif( $strResultCheck=='PASSWORD_WRONG' )
70
+ {
71
+ /**
72
+ * this should never happen(!) because the same check is in the billing-step of onepage checkout
73
+ **/
74
  self::_log('ERROR: User (' . $strEmail .') exists in Flux, but with an other password', null, 'Acegmbh_Flux_Data.log', true);
75
+
76
+ // ('Der Benutzer ist in Flux bereits verfügbar, allerdings unter mit einem anderen Passwort.');
77
+ }
78
+ }
79
+ else
80
+ {
81
+ self::_log('SOAP_ERROR in Observer->createFluxUser', null, 'Acegmbh_Flux_Data.log', true);
82
  }
83
  }
84
 
85
+ $FluxHelper = Mage::helper('flux');
86
  $FluxHelper->createShopOrder($Order);
87
  }
88
 
95
 
96
  $strEmail = $Customer->getEmail();
97
  $strPassword = $Customer->getPassword();
98
+ $strHashedPw =$strPassword;// Mage::getModel('customer/customer')->hashPassword($strPassword);
99
+ $iTransactionId = '99999' . $Customer->getId();
100
 
101
+ self::_log('email: ' . $strEmail);
102
  self::_log('transactionid: ' . $iTransactionId);
103
+
104
+ $strResultCreate = Mage::helper('flux')->createShopUser($iTransactionId,
105
+ $strEmail,
106
+ $strHashedPw,
107
+ false );
108
+ if( $strResultCreate=='OK' )
109
  {
110
  // User erfolgreich neu angelegt, oder User mit gleichem Passwort bereits in Flux verfügbar
111
+ }
112
+ elseif( $strResultCreate=='PASSWORD_WRONG' )
113
+ {
114
+ $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
115
+ $strPassword,
116
+ false);
117
+ if( $strResultCheck=='OK' )
118
  {
119
+ // echo 'User in Flux verfügbar, Password korrekt, Passworthash falsch. PasswordHash anpassen.';
120
+ $strResultChange = Mage::helper('flux')->changeCustomerPassword($strEmail,
121
+ $strPassword,
122
+ false,
123
+ $strHashedPw,
124
+ false );
125
+ }
126
+ elseif( $strResultCheck=='PASSWORD_WRONG' )
127
  {
128
  /**
129
  * this should never happen(!) because the same check is in $this->checkFluxUser()
130
  **/
131
  self::_log('ERROR: User (' . $strEmail .') exists in Flux, but with an other password', null, 'Acegmbh_Flux_Data.log', true);
132
+ // ('Der Benutzer ist in Flux bereits verfügbar, allerdings unter mit einem anderen Passwort.');
133
+ }
134
+ }
135
+ else
136
  {
137
  self::_log('SOAP_ERROR in Observer->createFluxUser', null, 'Acegmbh_Flux_Data.log', true);
138
+ }
139
  }
140
 
141
+ public function checkFluxUser(Varien_Event_Observer $Observer)
142
  {
143
  self::_log('checkFluxUser');
144
 
153
  /** for regular "create customer" form **/
154
  $strEmail = $email;
155
  $strPassword = $password;
156
+ $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
157
+ $strPassword,
158
+ false);
159
+ if( $strResultCheck=='PASSWORD_WRONG' )
160
  {
161
+ Mage::getSingleton('customer/session')->addError('Ihre E-Mail-Adresse ist bereits in Flux angelegt. Bitte verwenden Sie das Passwort aus Ihrem Flux Account.');
162
+ $url = Mage::getModel('core/url') ->getUrl('*/*/create');
163
+ Mage::app()->getResponse()->setRedirect($url);
164
+ Mage::app()->getResponse()->sendResponse();
165
  exit;
166
  }
167
 
168
  }
169
 
170
+ public function changeFluxPw(Varien_Event_Observer $Observer)
171
+ {
172
  self::_log('changeFluxPw');
173
 
 
174
  // Check if it happens somewhere in the customer module
175
  $request = Mage::app()->getFrontController()->getRequest();
176
  $module = $request->getModuleName();
177
  //$controller = $request->getControllerName();
178
  //$action = $request->getActionName();
179
  if ( 'customer' != $module ) return;
180
+
181
+ $event = $Observer->getEvent();
182
+ $customer = $event->getCustomer();
183
+ $postData = Mage::app()->getRequest()->getPost();
184
  if($customer instanceof Mage_Customer_Model_Customer && !$customer->isObjectNew())
185
+ {
186
  if( $postData['change_password'] == 1 && $postData['current_password'] != $postData['password'] )
187
+ {
188
+ Mage::helper('flux')->changeCustomerPassword( $customer->getEmail(),
189
+ $postData['current_password'],
190
+ false,
191
+ $postData['password'],
192
+ false );
193
+ }
194
+ }
195
  return $this;
196
  }
197
+
198
+ public function checkoutCartProductAddAfter(Varien_Event_Observer $observer)
199
+ {
200
+ $item = $observer->getQuoteItem();
201
+ $productId=$item->getProduct()->getId();
202
+
203
+ $product = Mage::getModel('catalog/product')->load($productId);
204
+
205
+ $attributeSetModel = Mage::getModel("eav/entity_attribute_set");
206
+ $attributeSetModel->load( $product->getAttributeSetId() );
207
+ $attributeSetName = $attributeSetModel->getAttributeSetName();
208
+
209
+ if($attributeSetName=='FlickRocketProduct')
210
+ {
211
+ $license=null;
212
+ $project=null;
213
+ $projectId=$product->getProjectId();
214
+ $licenseId=$product->getLicenseId();
215
+
216
+ $licenses = Mage::helper('flux')->getLicenses();
217
+ $projects = Mage::helper('flux')->getProjects();
218
+
219
+ $options=array();
220
+ foreach($licenses as $license)
221
+ {
222
+ if($license->ID==$licenseId)
223
+ {
224
+ $options[] = array(
225
+ 'label' => 'Licence',
226
+ 'value' => $license->Name,
227
+ 'print_value' => $license->Name,
228
+ 'option_id' => '133',
229
+ );
230
+
231
+
232
+ }
233
+ }
234
+
235
+ $infoArr = array();
236
+
237
+ if ($info = $item->getProduct()->getCustomOption('info_buyRequest'))
238
+ {
239
+ $infoArr = unserialize($info->getValue());
240
+
241
+ /////////////////////////////////////////
242
+
243
+
244
+
245
+ $additionalOptions = $options;
246
+
247
+
248
+
249
+ $item->addOption(array(
250
+ 'code' => 'additional_options',
251
+ 'value' => serialize($additionalOptions),
252
+ ));
253
+
254
+ $infoArr['additional_options'] = $additionalOptions;
255
+
256
+ $info->setValue(serialize($infoArr));
257
+ $item->addOption($info);
258
+ }
259
+ // Update info_buyRequest to reflect changes
260
+ /*if ($infoArr &&
261
+ isset($infoArr['options']) &&
262
+ isset($infoArr['options'][$option['option_id']]))
263
+ {
264
+ // Remove real custom option
265
+ unset($infoArr['options'][$option['option_id']]);
266
+
267
+ // Add replacement additional option for reorder (see above)
268
+ $infoArr['additional_options'] = $additionalOptions;
269
+
270
+ $info->setValue(serialize($infoArr));
271
+ $item->addOption($info);
272
+ }*/
273
+
274
+ }//attributeName
275
+
276
+ }//function
277
+
278
+
279
+
280
+ public function salesConvertQuoteItemToOrderItem(Varien_Event_Observer $observer)
281
+ {
282
+ $quoteItem = $observer->getItem();
283
+ if ($additionalOptions = $quoteItem->getOptionByCode('additional_options')) {
284
+ $orderItem = $observer->getOrderItem();
285
+ $options = $orderItem->getProductOptions();
286
+ $options['additional_options'] = unserialize($additionalOptions->getValue());
287
+ $orderItem->setProductOptions($options);
288
+ }
289
+ }
290
 
291
+ }
app/code/community/Acegmbh/Flux/Model/Orders.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/Model/Users.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/controllers/Adminhtml/AdminController.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/controllers/Adminhtml/FluxController.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/controllers/Adminhtml/UploadController.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/controllers/Checkout/OnepageController.php CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
- # Controllers are not autoloaded so we will have to do it manually:
3
- $strPath = Mage::getBaseDir('code') . DIRECTORY_SEPARATOR .
4
- 'core' . DIRECTORY_SEPARATOR .
5
- 'Mage' . DIRECTORY_SEPARATOR .
6
- 'Checkout' . DIRECTORY_SEPARATOR .
7
- 'controllers' . DIRECTORY_SEPARATOR .
8
- 'OnepageController.php';
9
- require_once($strPath);
10
- class Acegmbh_Flux_Checkout_OnepageController extends Mage_Checkout_OnepageController
11
- {
12
- /*
13
- # Overloaded indexAction
14
- public function indexAction() {
15
- // die('Yes, I did it!');
16
-
17
- parent::indexAction();
18
- }
19
- */
20
- public function saveBillingAction()
21
- {
22
- $data = $this->getRequest()->getPost('billing', array());
23
- //let the normal validation handle this
24
- if (empty($data['email']) || empty($data['customer_password'])){
25
-
26
- parent::saveBillingAction();
27
- return;
28
-
29
- }
30
-
31
- $strEmail = $data['email'];
32
- $strPassword = $data['customer_password'];
33
- $_SESSION['flux_customer_password'] = $strPassword;
34
- $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
35
- $strPassword,
36
- false);
37
- if( $strResultCheck=='PASSWORD_WRONG' )
38
- {
39
- $result = array('error' => 1,
40
- 'message' => Mage::helper('flux')->__('Ihre E-Mail-Adresse ist bereits in Flux angelegt. Bitte verwenden Sie das Passwort aus Ihrem Flux Account.')
41
- );
42
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
43
- }
44
- else
45
- {
46
- parent::saveBillingAction();
47
- }
48
-
49
- //die();
50
- //die('saveBillingAction');
51
- }
52
  }
1
+ <?php
2
+ # Controllers are not autoloaded so we will have to do it manually:
3
+ $strPath = Mage::getBaseDir('code') . DIRECTORY_SEPARATOR .
4
+ 'core' . DIRECTORY_SEPARATOR .
5
+ 'Mage' . DIRECTORY_SEPARATOR .
6
+ 'Checkout' . DIRECTORY_SEPARATOR .
7
+ 'controllers' . DIRECTORY_SEPARATOR .
8
+ 'OnepageController.php';
9
+ require_once($strPath);
10
+ class Acegmbh_Flux_Checkout_OnepageController extends Mage_Checkout_OnepageController
11
+ {
12
+ /*
13
+ # Overloaded indexAction
14
+ public function indexAction() {
15
+ // die('Yes, I did it!');
16
+
17
+ parent::indexAction();
18
+ }
19
+ */
20
+ public function saveBillingAction()
21
+ {
22
+ $data = $this->getRequest()->getPost('billing', array());
23
+ //let the normal validation handle this
24
+ if (empty($data['email']) || empty($data['customer_password'])){
25
+
26
+ parent::saveBillingAction();
27
+ return;
28
+
29
+ }
30
+
31
+ $strEmail = $data['email'];
32
+ $strPassword = $data['customer_password'];
33
+ $_SESSION['flux_customer_password'] = $strPassword;
34
+ $strResultCheck = Mage::helper('flux')->checkUserExists($strEmail,
35
+ $strPassword,
36
+ false);
37
+ if( $strResultCheck=='PASSWORD_WRONG' )
38
+ {
39
+ $result = array('error' => 1,
40
+ 'message' => Mage::helper('flux')->__('Ihre E-Mail-Adresse ist bereits in Flux angelegt. Bitte verwenden Sie das Passwort aus Ihrem Flux Account.')
41
+ );
42
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
43
+ }
44
+ else
45
+ {
46
+ parent::saveBillingAction();
47
+ }
48
+
49
+ //die();
50
+ //die('saveBillingAction');
51
+ }
52
  }
app/code/community/Acegmbh/Flux/controllers/IndexController.php CHANGED
File without changes
app/code/community/Acegmbh/Flux/etc/adminhtml.xml CHANGED
@@ -1,6 +1,6 @@
1
  <config>
2
  <menu>
3
- <sales>
4
  <children>
5
  <flux module="flux">
6
  <title>FlickRocket SOAP Log</title>
@@ -8,7 +8,7 @@
8
  <action>flux/adminhtml_flux</action>
9
  </flux>
10
  </children>
11
- </sales>
12
  <flickrocket module="flux">
13
  <title>Flickrocket</title>
14
  <sort_order>900</sort_order>
@@ -74,4 +74,4 @@
74
  </admin>
75
  </resources>
76
  </acl>
77
- </config>
1
  <config>
2
  <menu>
3
+ <!--<sales>
4
  <children>
5
  <flux module="flux">
6
  <title>FlickRocket SOAP Log</title>
8
  <action>flux/adminhtml_flux</action>
9
  </flux>
10
  </children>
11
+ </sales> -->
12
  <flickrocket module="flux">
13
  <title>Flickrocket</title>
14
  <sort_order>900</sort_order>
74
  </admin>
75
  </resources>
76
  </acl>
77
+ </config>
app/code/community/Acegmbh/Flux/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Acegmbh_Flux>
5
- <version>0.1.0</version>
6
  </Acegmbh_Flux>
7
  </modules>
8
  <admin>
@@ -147,8 +147,26 @@
147
  <method>changeFluxPw</method>
148
  </Acegmbh_Flux>
149
  </observers>
150
- </customer_save_after>
 
 
151
  </events>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </global>
153
  <default>
154
  <acegmbh_flux>
@@ -160,4 +178,4 @@
160
  </flux>
161
  </acegmbh_flux>
162
  </default>
163
- </config>
2
  <config>
3
  <modules>
4
  <Acegmbh_Flux>
5
+ <version>0.1.7</version>
6
  </Acegmbh_Flux>
7
  </modules>
8
  <admin>
147
  <method>changeFluxPw</method>
148
  </Acegmbh_Flux>
149
  </observers>
150
+ </customer_save_after>
151
+
152
+
153
  </events>
154
+
155
+ <catalog>
156
+ <product>
157
+ <type>
158
+ <bundle translate="label" module="bundle">
159
+ <allowed_selection_types>
160
+ <downloadable/>
161
+ </allowed_selection_types>
162
+ </bundle>
163
+ </type>
164
+ </product>
165
+ </catalog>
166
+
167
+
168
+
169
+
170
  </global>
171
  <default>
172
  <acegmbh_flux>
178
  </flux>
179
  </acegmbh_flux>
180
  </default>
181
+ </config>
app/code/community/Acegmbh/Flux/etc/system.xml CHANGED
@@ -26,6 +26,7 @@
26
  <flux_theme_id translate="label,comment">
27
  <label>Theme ID</label>
28
  <frontend_type>text</frontend_type>
 
29
  <sort_order>1</sort_order>
30
  <show_in_default>1</show_in_default>
31
  <show_in_website>1</show_in_website>
@@ -35,6 +36,7 @@
35
  <flux_email translate="label,comment">
36
  <label>Email Address</label>
37
  <frontend_type>text</frontend_type>
 
38
  <sort_order>2</sort_order>
39
  <show_in_default>1</show_in_default>
40
  <show_in_website>1</show_in_website>
@@ -44,6 +46,7 @@
44
  <flux_password translate="label,comment">
45
  <label>Password</label>
46
  <frontend_type>password</frontend_type>
 
47
  <sort_order>3</sort_order>
48
  <show_in_default>1</show_in_default>
49
  <show_in_website>1</show_in_website>
@@ -53,6 +56,7 @@
53
  <flux_wsdl translate="label,comment">
54
  <label>Environment</label>
55
  <frontend_type>select</frontend_type>
 
56
  <source_model>
57
  acegmbh_flux/adminhtml_system_config_source_wsdlurls
58
  </source_model>
@@ -67,4 +71,4 @@
67
  </groups>
68
  </acegmbh_flux>
69
  </sections>
70
- </config>
26
  <flux_theme_id translate="label,comment">
27
  <label>Theme ID</label>
28
  <frontend_type>text</frontend_type>
29
+ <backend_model>acegmbh_flux/flux_config_demo</backend_model>
30
  <sort_order>1</sort_order>
31
  <show_in_default>1</show_in_default>
32
  <show_in_website>1</show_in_website>
36
  <flux_email translate="label,comment">
37
  <label>Email Address</label>
38
  <frontend_type>text</frontend_type>
39
+ <backend_model>acegmbh_flux/flux_config_demo</backend_model>
40
  <sort_order>2</sort_order>
41
  <show_in_default>1</show_in_default>
42
  <show_in_website>1</show_in_website>
46
  <flux_password translate="label,comment">
47
  <label>Password</label>
48
  <frontend_type>password</frontend_type>
49
+ <backend_model>acegmbh_flux/flux_config_demo</backend_model>
50
  <sort_order>3</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
56
  <flux_wsdl translate="label,comment">
57
  <label>Environment</label>
58
  <frontend_type>select</frontend_type>
59
+ <backend_model>acegmbh_flux/flux_config_demo</backend_model>
60
  <source_model>
61
  acegmbh_flux/adminhtml_system_config_source_wsdlurls
62
  </source_model>
71
  </groups>
72
  </acegmbh_flux>
73
  </sections>
74
+ </config>
app/code/community/Acegmbh/Flux/sql/flux_setup/mysql4-install-0.1.0.php CHANGED
@@ -11,89 +11,89 @@ $iIdAttributeSet = $Setup->getAttributeSetId(Mage_Catalog_Model_Product::ENTITY,
11
 
12
 
13
 
14
- /**
15
- * get id of 'Default' attribute set
16
- */
17
- $attributeSetIdDefault = $Setup->getAttributeSetId(Mage_Catalog_Model_Product::ENTITY, 'Default');
18
- // echo '--->'.$attributeSetId.'<---';
19
-
20
- /**
21
- * get groups of 'Default' attribute set
22
- */
23
- $attributes = array();
24
- $groups = Mage::getModel('eav/entity_attribute_group')
25
- ->getResourceCollection()
26
- ->setAttributeSetFilter($attributeSetIdDefault)
27
- ->setSortOrder()
28
- ->load();
29
- foreach ($groups as $node)
30
- {
31
- /*
32
- [attribute_group_id] => 7
33
- [attribute_set_id] => 4
34
- [attribute_group_name] => General
35
- [sort_order] => 1
36
- [default_id] => 1
37
- */
38
- // echo '***'.$node->getAttributeGroupId().'***';
39
- // echo '***'.$node->getAttributeSetId().'***';
40
- // echo '***'.$node->getAttributeGroupName().'***';
41
- // echo '***'.$node->getSortOrder().'***';
42
- // echo '***'.$node->getDefaultId().'***';
43
-
44
- /**
45
- * add attribute group with same name
46
- */
47
- $Setup->addAttributeGroup( 'catalog_product',
48
- 'FlickRocketProduct',
49
- $node->getAttributeGroupName(),
50
- $node->getSortOrder());
51
- $attributeGroupId = $Setup->getAttributeGroup( 'catalog_product',
52
- 'FlickRocketProduct',
53
- $node->getAttributeGroupName());
54
- $attributeGroupId = $attributeGroupId['attribute_group_id'];
55
-
56
- $iAttributeGroupId = $node->getId();
57
- $nodeChildren = Mage::getResourceModel('catalog/product_attribute_collection')
58
- ->setAttributeGroupFilter($iAttributeGroupId)
59
- //->addFieldToFilter('is_user_defined', true) # I was trying to get user defined attributes.
60
- ->addVisibleFilter()
61
- ->load();
62
- if ($nodeChildren->getSize() > 0)
63
- {
64
- foreach ($nodeChildren->getItems() as $child)
65
- {
66
- // $child->getAttributeCode() );
67
- $Setup->addAttributeToGroup(Mage_Catalog_Model_Product::ENTITY,
68
- $iIdAttributeSet,
69
- $attributeGroupId,
70
- $child->getAttributeId(),
71
- $child->getSortOrder());
72
-
73
- }
74
- }
75
  }
76
 
77
 
78
- // /**
79
- // * get attribute group id of 'Default' attribute set of 'FlickRocketProduct' attribute set
80
- // */
81
- // $attributes = array();
82
- // $groups = Mage::getModel('eav/entity_attribute_group')
83
- // ->getResourceCollection()
84
- // ->setAttributeSetFilter($iIdAttributeSet)
85
- // ->setSortOrder()
86
- // ->load();
87
- // foreach ($groups as $node)
88
- // {
89
- // // preserve the attribute group id for later
90
- // if( $node->getAttributeGroupName()=='General' )
91
- // {
92
- // $iIdAttributeGroup = $node->getAttributeGroupId();
93
  // }
94
- // if( $node->getAttributeGroupName()=='FlickRocket Attributes' )
95
- // {
96
- // $iIdAttributeGroupFlickRocket = $node->getAttributeGroupId();
97
  // }
98
  // }
99
 
@@ -102,34 +102,34 @@ foreach ($groups as $node)
102
  // */
103
  // $attributeSetId = $Setup->getAttributeSetId(Mage_Catalog_Model_Product::ENTITY, 'Default');
104
  // $attributes = array();
105
- // $groups = Mage::getModel('eav/entity_attribute_group')
106
- // ->getResourceCollection()
107
- // ->setAttributeSetFilter($attributeSetId)
108
- // ->setSortOrder()
109
- // ->load();
110
  // foreach ($groups as $node)
111
- // {
112
- // $nodeChildren = Mage::getResourceModel('catalog/product_attribute_collection')
113
- // ->setAttributeGroupFilter($node->getId())
114
- // //->addFieldToFilter('is_user_defined', true) # I was trying to get user defined attributes.
115
- // ->addVisibleFilter()
116
  // ->load();
117
  // if ($nodeChildren->getSize() > 0)
118
- // {
119
  // foreach ($nodeChildren->getItems() as $child)
120
- // {
121
- // $attr = array(
122
- // 'id' => $child->getAttributeId(),
123
- // 'text' => $child->getAttributeCode()
124
- // );
125
  // $attributes[] = $attr;
126
 
127
- // $Setup->addAttributeToGroup(Mage_Catalog_Model_Product::ENTITY,
128
- // $iIdAttributeSet,
129
- // $node->getId(),
130
- // $child->getAttributeId());
131
- // }
132
- // }
133
  // }
134
 
135
  /**
@@ -144,35 +144,35 @@ foreach ($groups as $node)
144
  // $iIdAttribute);
145
  // }
146
 
147
- /**
148
- * add attribute set group (to sort your attributes into)
149
- */
150
  $Setup->addAttributeGroup('catalog_product', 'FlickRocketProduct', 'FlickRocket Attributes', 1000);
151
 
152
  /**
153
  * add project_id attribute to attribute-set "FlickRocketProduct"
154
  */
155
- $Setup->addAttribute('catalog_product', 'project_id',
156
- array(
157
- 'group' => 'FlickRocket Attributes',
158
- 'input' => 'select',
159
- 'type' => 'text',
160
- 'label' => 'Project ID',
161
- 'backend' => '',
162
- 'visible' => 1,
163
- 'required' => 1,
164
- 'user_defined' => 1,
165
- 'searchable' => 0,
166
- 'filterable' => 0,
167
- 'comparable' => 0,
168
- 'visible_on_front' => 0,
169
- 'visible_in_advanced_search' => 0,
170
  'is_html_allowed_on_front' => 0,
171
  'source' => 'acegmbh_flux/adminhtml_system_config_source_projectids',
172
- 'note' => 'Identifies the project in the FlickRocket',
173
  'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
174
- 'apply_to' => 'downloadable',
175
- )
176
  );
177
  $Setup->updateAttribute('catalog_product', 'project_id', 'apply_to', 'downloadable');
178
  $attributeId = $Setup->getAttribute('catalog_product','project_id');
@@ -185,8 +185,8 @@ $Setup->addAttributeToSet( 'catalog_product',
185
  $iIdAttributeSet,
186
  'FlickRocket Attributes',
187
  $attributeId['attribute_id']);
188
- /**
189
- * add license_id attribute to attribute-set "FlickRocketProduct"
190
  */
191
  $Setup->addAttribute('catalog_product', 'license_id',
192
  array(
@@ -212,9 +212,9 @@ $Setup->addAttribute('catalog_product', 'license_id',
212
  );
213
  $Setup->updateAttribute('catalog_product', 'license_id', 'apply_to', 'downloadable');
214
  $attributeId = $Setup->getAttribute('catalog_product','license_id');
215
- $Setup->addAttributeToSet( 'catalog_product',
216
- $iIdAttributeSet,
217
- 'FlickRocket Attributes',
218
  $attributeId['attribute_id']);
219
 
220
  $Setup->run("
11
 
12
 
13
 
14
+ /**
15
+ * get id of 'Default' attribute set
16
+ */
17
+ $attributeSetIdDefault = $Setup->getAttributeSetId(Mage_Catalog_Model_Product::ENTITY, 'Default');
18
+ // echo '--->'.$attributeSetId.'<---';
19
+
20
+ /**
21
+ * get groups of 'Default' attribute set
22
+ */
23
+ $attributes = array();
24
+ $groups = Mage::getModel('eav/entity_attribute_group')
25
+ ->getResourceCollection()
26
+ ->setAttributeSetFilter($attributeSetIdDefault)
27
+ ->setSortOrder()
28
+ ->load();
29
+ foreach ($groups as $node)
30
+ {
31
+ /*
32
+ [attribute_group_id] => 7
33
+ [attribute_set_id] => 4
34
+ [attribute_group_name] => General
35
+ [sort_order] => 1
36
+ [default_id] => 1
37
+ */
38
+ // echo '***'.$node->getAttributeGroupId().'***';
39
+ // echo '***'.$node->getAttributeSetId().'***';
40
+ // echo '***'.$node->getAttributeGroupName().'***';
41
+ // echo '***'.$node->getSortOrder().'***';
42
+ // echo '***'.$node->getDefaultId().'***';
43
+
44
+ /**
45
+ * add attribute group with same name
46
+ */
47
+ $Setup->addAttributeGroup( 'catalog_product',
48
+ 'FlickRocketProduct',
49
+ $node->getAttributeGroupName(),
50
+ $node->getSortOrder());
51
+ $attributeGroupId = $Setup->getAttributeGroup( 'catalog_product',
52
+ 'FlickRocketProduct',
53
+ $node->getAttributeGroupName());
54
+ $attributeGroupId = $attributeGroupId['attribute_group_id'];
55
+
56
+ $iAttributeGroupId = $node->getId();
57
+ $nodeChildren = Mage::getResourceModel('catalog/product_attribute_collection')
58
+ ->setAttributeGroupFilter($iAttributeGroupId)
59
+ //->addFieldToFilter('is_user_defined', true) # I was trying to get user defined attributes.
60
+ ->addVisibleFilter()
61
+ ->load();
62
+ if ($nodeChildren->getSize() > 0)
63
+ {
64
+ foreach ($nodeChildren->getItems() as $child)
65
+ {
66
+ // $child->getAttributeCode() );
67
+ $Setup->addAttributeToGroup(Mage_Catalog_Model_Product::ENTITY,
68
+ $iIdAttributeSet,
69
+ $attributeGroupId,
70
+ $child->getAttributeId(),
71
+ $child->getSortOrder());
72
+
73
+ }
74
+ }
75
  }
76
 
77
 
78
+ // /**
79
+ // * get attribute group id of 'Default' attribute set of 'FlickRocketProduct' attribute set
80
+ // */
81
+ // $attributes = array();
82
+ // $groups = Mage::getModel('eav/entity_attribute_group')
83
+ // ->getResourceCollection()
84
+ // ->setAttributeSetFilter($iIdAttributeSet)
85
+ // ->setSortOrder()
86
+ // ->load();
87
+ // foreach ($groups as $node)
88
+ // {
89
+ // // preserve the attribute group id for later
90
+ // if( $node->getAttributeGroupName()=='General' )
91
+ // {
92
+ // $iIdAttributeGroup = $node->getAttributeGroupId();
93
  // }
94
+ // if( $node->getAttributeGroupName()=='FlickRocket Attributes' )
95
+ // {
96
+ // $iIdAttributeGroupFlickRocket = $node->getAttributeGroupId();
97
  // }
98
  // }
99
 
102
  // */
103
  // $attributeSetId = $Setup->getAttributeSetId(Mage_Catalog_Model_Product::ENTITY, 'Default');
104
  // $attributes = array();
105
+ // $groups = Mage::getModel('eav/entity_attribute_group')
106
+ // ->getResourceCollection()
107
+ // ->setAttributeSetFilter($attributeSetId)
108
+ // ->setSortOrder()
109
+ // ->load();
110
  // foreach ($groups as $node)
111
+ // {
112
+ // $nodeChildren = Mage::getResourceModel('catalog/product_attribute_collection')
113
+ // ->setAttributeGroupFilter($node->getId())
114
+ // //->addFieldToFilter('is_user_defined', true) # I was trying to get user defined attributes.
115
+ // ->addVisibleFilter()
116
  // ->load();
117
  // if ($nodeChildren->getSize() > 0)
118
+ // {
119
  // foreach ($nodeChildren->getItems() as $child)
120
+ // {
121
+ // $attr = array(
122
+ // 'id' => $child->getAttributeId(),
123
+ // 'text' => $child->getAttributeCode()
124
+ // );
125
  // $attributes[] = $attr;
126
 
127
+ // $Setup->addAttributeToGroup(Mage_Catalog_Model_Product::ENTITY,
128
+ // $iIdAttributeSet,
129
+ // $node->getId(),
130
+ // $child->getAttributeId());
131
+ // }
132
+ // }
133
  // }
134
 
135
  /**
144
  // $iIdAttribute);
145
  // }
146
 
147
+ /**
148
+ * add attribute set group (to sort your attributes into)
149
+ */
150
  $Setup->addAttributeGroup('catalog_product', 'FlickRocketProduct', 'FlickRocket Attributes', 1000);
151
 
152
  /**
153
  * add project_id attribute to attribute-set "FlickRocketProduct"
154
  */
155
+ $Setup->addAttribute('catalog_product', 'project_id',
156
+ array(
157
+ 'group' => 'FlickRocket Attributes',
158
+ 'input' => 'select',
159
+ 'type' => 'text',
160
+ 'label' => 'Project ID',
161
+ 'backend' => '',
162
+ 'visible' => 1,
163
+ 'required' => 1,
164
+ 'user_defined' => 1,
165
+ 'searchable' => 0,
166
+ 'filterable' => 0,
167
+ 'comparable' => 0,
168
+ 'visible_on_front' => 0,
169
+ 'visible_in_advanced_search' => 0,
170
  'is_html_allowed_on_front' => 0,
171
  'source' => 'acegmbh_flux/adminhtml_system_config_source_projectids',
172
+ 'note' => 'Identifies the project in the FlickRocket',
173
  'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
174
+ 'apply_to' => 'downloadable',
175
+ )
176
  );
177
  $Setup->updateAttribute('catalog_product', 'project_id', 'apply_to', 'downloadable');
178
  $attributeId = $Setup->getAttribute('catalog_product','project_id');
185
  $iIdAttributeSet,
186
  'FlickRocket Attributes',
187
  $attributeId['attribute_id']);
188
+ /**
189
+ * add license_id attribute to attribute-set "FlickRocketProduct"
190
  */
191
  $Setup->addAttribute('catalog_product', 'license_id',
192
  array(
212
  );
213
  $Setup->updateAttribute('catalog_product', 'license_id', 'apply_to', 'downloadable');
214
  $attributeId = $Setup->getAttribute('catalog_product','license_id');
215
+ $Setup->addAttributeToSet( 'catalog_product',
216
+ $iIdAttributeSet,
217
+ 'FlickRocket Attributes',
218
  $attributeId['attribute_id']);
219
 
220
  $Setup->run("
app/code/community/Acegmbh/Flux/sql/flux_setup/mysql4-upgrade-0.1.0-0.1.7.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
3
+ $setup->startSetup();
4
+ $setup->updateAttribute('catalog_product', 'license_id', 'apply_to', 'downloadable');
5
+ $setup->updateAttribute('catalog_product', 'project_id', 'apply_to', 'downloadable');
6
+ $setup->updateAttribute('catalog_product', 'license_id', 'is_global', '1');
7
+ $setup->updateAttribute('catalog_product', 'project_id', 'is_global', '1');
8
+ $setup->updateAttribute('catalog_product', 'license_id', 'is_configurable', '1');
9
+ $setup->updateAttribute('catalog_product', 'project_id', 'is_configurable', '1');
10
+
11
+ $entityTypeId=$setup-> getEntityTypeId('catalog_product');
12
+ $attributeSetId=$setup->getAttributeSetId($entityTypeId, 'FlickRocketProduct');
13
+
14
+ $groupId=$setup->getAttributeGroupId($entityTypeId, $attributeSetId, 'FlickRocket Attributes');
15
+ $attributeId = $setup->getAttributeId('catalog_product','links_purchased_separately');
16
+ $setup->addAttributeToGroup($entityTypeId, $attributeSetId, $groupId, $attributeId, null);
17
+
18
+ $setup->endSetup();
19
+
app/design/adminhtml/default/default/layout/acegmbh_flux.xml CHANGED
File without changes
app/design/adminhtml/default/default/template/flux/admin.phtml CHANGED
File without changes
app/design/adminhtml/default/default/template/flux/upload.phtml CHANGED
File without changes
app/design/frontend/base/default/layout/flux.xml CHANGED
File without changes
app/design/frontend/base/default/template/flux/catalog/product/samples.phtml CHANGED
File without changes
app/design/frontend/base/default/template/flux/dlmanagerlinks.phtml CHANGED
@@ -40,8 +40,8 @@
40
  }
41
 
42
  $Customer = Mage::getModel('customer/customer')->load(Mage::getSingleton('customer/session')->getId());
43
-
44
- $targetURL = Mage::helper('flux')->prepareLoginEx( $Customer->getEmail(), $Customer->getPasswordHash()) . "&externaltype=1&theme=" . Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id');
45
  $targetScheme = parse_url($targetURL, PHP_URL_SCHEME);
46
  if (is_null($targetScheme))
47
  {
@@ -52,7 +52,18 @@
52
 
53
  $targetURL = $scheme . "://" . $targetURL;
54
  }
55
-
56
- echo "<iframe src=\"" . $targetURL . "\" frameBorder=\"0\" width=\"100%\" height=\"1600px\"></iframe>";
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  ?>
40
  }
41
 
42
  $Customer = Mage::getModel('customer/customer')->load(Mage::getSingleton('customer/session')->getId());
43
+ $url=Mage::helper('flux')->prepareLoginEx( $Customer->getEmail(),$Customer->getPasswordHash());
44
+ $targetURL = $url. "&externaltype=1&theme=" . Mage::getStoreConfig('acegmbh_flux/flux/flux_theme_id');
45
  $targetScheme = parse_url($targetURL, PHP_URL_SCHEME);
46
  if (is_null($targetScheme))
47
  {
52
 
53
  $targetURL = $scheme . "://" . $targetURL;
54
  }
55
+ // echo $url;
56
+ if($url!='SOAP_EXCEPTION' && $url!=-1 && $url!=-2 && $url!=-3 && $url!=-4 && $url!=-5 )
57
+ {
58
+ echo "<iframe src=\"" . $targetURL . "\" frameBorder=\"0\" width=\"100%\" height=\"1600px\"></iframe>";
59
+ }
60
+ else
61
+ { $error=Mage::helper('flux')->getErrorMessage( $url);
62
+ //$error=isset($errors[$url])?$errors[$url]:$this->__('Some error occurerd.');
63
+
64
+ ?>
65
+ <ul class="messages"><li class="error-msg"><ul><li><span><?php echo $error?></span></li></ul></li></ul>
66
+ <?php
67
+ }
68
 
69
  ?>
app/etc/modules/Acegmbh_Flux.xml CHANGED
File without changes
app/locale/en_US/Acegmbh_Flux.csv CHANGED
File without changes
package.xml CHANGED
@@ -1,21 +1,21 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Flickrocket</name>
4
- <version>1.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/OSL-3.0">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>This extension enables you to sell and rent (optionally DRM protected) digital content such as DVDs (incl. all menus, bonus material, etc.), video (HD+SD), audio books, ebooks (epub and PDF) and packaged content such as HTML, Flash, images, etc. </summary>
10
- <description>This extension enables you to sell and rent (optionally DRM protected) digital content such as DVDs (incl. all menus, bonus material, etc.), video (HD+SD), audio books, ebooks (epub and PDF) and packaged content such as HTML, Flash, images, etc. &#xD;
11
- &#xD;
12
- You can encode, package, encrypt and upload your content right within Magento or use desktop software (free download for Windows and Mac) to get your content ready for sale.&#xD;
13
  The content distribution is done via our content delivery network (CDN) to ensure a high bandwidth distribution to a world wide audience.</description>
14
  <notes>Stable release</notes>
15
  <authors><author><name>Volkmar Breitfeld</name><user>VBreitfeld</user><email>volkmar@flickrocket.com</email></author></authors>
16
- <date>2013-11-01</date>
17
- <time>12:45:23</time>
18
- <contents><target name="magecommunity"><dir name="Acegmbh"><dir name="Flux"><dir name="Block"><dir name="Adminhtml"><dir name="Admin"><file name="Grid.php" hash="d7d38e83b1eb1f546921e8db6ac1a30d"/></dir><file name="Admin.php" hash="6557d98fbd393dc5c17df243512b31a6"/><dir name="Flux"><dir name="Edit"><file name="Form.php" hash="b091f3214e32862fb29bd3337bd64955"/><dir name="Tab"><file name="Form.php" hash="2f8f6bc80235d2a5cfb69c7e531fddb6"/></dir><file name="Tabs.php" hash="ffcc392ac99693de3764a062bc679ecc"/></dir><file name="Edit.php" hash="ff168405f809920d01e06ddf35f0ce9f"/><dir name="Grid"><dir name="Render"><file name="Xml.php" hash="72d1776285ccf240deb79b2d539eeeb8"/></dir></dir><file name="Grid.php" hash="9522d5da8b9040747ae28448c54dc02d"/></dir><file name="Flux.php" hash="8b8f0dd7d83f81c00d7783ce1e8fd771"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b4ce1530f7b086a65f875992ef056e2d"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Licenceids.php" hash="c8e4751bd263f2b5a449e9338e8d05e4"/><file name="Projectids.php" hash="259d3c4f6f4c0a5832e491eab7167309"/><file name="Wsdlurls.php" hash="e61bd809b83323ba6c12377d61dd4d47"/></dir></dir></dir></dir><dir name="Customer"><dir name="Entity"><file name="Customer.php" hash="6db83b89383b2353cd28582a8300395d"/></dir></dir><file name="Customer.php" hash="3623349bda4bb7542658bf83a5b18edc"/><dir name="Flux"><dir name="Soap"><dir name="Response"><file name="ChangeCustomerEMail.php" hash="c2efbbd5fff7a25b4e72f020893a7edc"/><file name="ChangeCustomerPassword.php" hash="7fc7f7052b3228d9bbe3ff042bdd2ec0"/><file name="CheckUserExists.php" hash="036d0ce3a53b062c21cbcf7837687142"/><file name="CreateShopOrder.php" hash="fba8280decfb79433b1781960fd159fb"/><file name="GetLicenses.php" hash="afe375c52cb6a6a63a8aa363386f9ebe"/><file name="GetProjects.php" hash="f2f249ca46ad8d10e561625589d80b66"/><file name="PrepareLogin.php" hash="6662461954f11338c921ef34fa34e6c6"/></dir></dir></dir><dir name="Mysql4"><dir name="Orders"><file name="Collection.php" hash="5974d09282cbd5f964ff7831654e43f5"/></dir><file name="Orders.php" hash="6159a072f030d0a127ec9ee09e6293e4"/><dir name="Users"><file name="Collection.php" hash="9355a78478686097b559a13640dd7976"/></dir><file name="Users.php" hash="ca9d2feb9c5df2ff1676c663f70f5f60"/></dir><file name="Observer.php" hash="3826d845713ead04105cee494942b9c2"/><file name="Orders.php" hash="e019a130619cbae9be12f2a9a54c705f"/><file name="Users.php" hash="e657f74825ea2e5d74990a9076c1ef2f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AdminController.php" hash="f76a58ba7a9bfc69dc440e4eef0903ce"/><file name="FluxController.php" hash="bec5e5a533376cd63d8d013fb7156df4"/><file name="UploadController.php" hash="91f2200f874269bc9123da194fbe23fe"/></dir><dir name="Checkout"><file name="OnepageController.php" hash="e7db64d60a05813b1e8d342ac4f92e4d"/></dir><file name="IndexController.php" hash="34f265af09a75061b27c1cd4f2a3deb0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0e602a969348d3907c4b7ff03a8b72da"/><file name="config.xml" hash="04da799b58e5357461797d9356afbe6c"/><file name="system.xml" hash="7f89fc7217fc93180bbd2c5d47686fbd"/></dir><dir name="sql"><dir name="flux_setup"><file name="mysql4-install-0.1.0.php" hash="365da24e311a18096f8c7defb5be65fa"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="acegmbh_flux.xml" hash="7e04b10d2f952c0ef393c366b0f3e2cd"/></dir><dir name="template"><dir name="flux"><file name="admin.phtml" hash="68e180ef66e3f6753a89c13cad2264ef"/><file name="upload.phtml" hash="7d5f8fdc791bef65d969825c02518473"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="flux.xml" hash="8e8c260a13ad9a5f6bd5407dd45f244d"/></dir><dir name="template"><dir name="flux"><dir name="catalog"><dir name="product"><file name="samples.phtml" hash="8f4f1d49e22a27a6aabdcc2911113dbf"/></dir></dir><file name="dlmanagerlinks.phtml" hash="e12ee3700bf2460dbe795333d7c647a1"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Acegmbh_Flux.csv" hash="030f7f14d541d94311c066496e0fe833"/></dir></target><target name="mageetc"><dir name="modules"><file name="Acegmbh_Flux.xml" hash="f4cd29414c1144dfb0ecdd68eb092c00"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="flux"><file name="CloudIcon_Apple.png" hash="21e2932e7c092fcccc4d483237619078"/><file name="CloudIcon_Html5.png" hash="87e71303bf577682cd41379cb1ea4dab"/><file name="CloudIcon_Win.png" hash="c1e3d22ae7a272cb073d76a83bcb6abf"/></dir></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Flickrocket</name>
4
+ <version>1.1.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/OSL-3.0">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>This extension enables you to sell and rent (optionally DRM protected) digital content such as DVDs (incl. all menus, bonus material, etc.), video (HD+SD), audio books, ebooks (epub and PDF) and packaged content such as HTML, Flash, images, etc.</summary>
10
+ <description>This extension enables you to sell and rent (optionally DRM protected) digital content such as DVDs (incl. all menus, bonus material, etc.), video (HD+SD), audio books, ebooks (epub and PDF) and packaged content such as HTML, Flash, images, etc. &amp;#xD;&#xD;
11
+ &amp;#xD;&#xD;
12
+ You can encode, package, encrypt and upload your content right within Magento or use desktop software (free download for Windows and Mac) to get your content ready for sale.&amp;#xD;&#xD;
13
  The content distribution is done via our content delivery network (CDN) to ensure a high bandwidth distribution to a world wide audience.</description>
14
  <notes>Stable release</notes>
15
  <authors><author><name>Volkmar Breitfeld</name><user>VBreitfeld</user><email>volkmar@flickrocket.com</email></author></authors>
16
+ <date>2014-06-24</date>
17
+ <time>07:58:23</time>
18
+ <contents><target name="magecommunity"><dir name="Acegmbh"><dir name="Flux"><dir name="Block"><dir name="Adminhtml"><dir name="Admin"><file name="Grid.php" hash="9ab941394c34f5f51bebd62868c4327e"/></dir><file name="Admin.php" hash="fa02211e07b52ed8b1a1e06ee581ccdc"/><dir name="Flux"><dir name="Edit"><file name="Form.php" hash="b091f3214e32862fb29bd3337bd64955"/><dir name="Tab"><file name="Form.php" hash="2f8f6bc80235d2a5cfb69c7e531fddb6"/></dir><file name="Tabs.php" hash="ffcc392ac99693de3764a062bc679ecc"/></dir><file name="Edit.php" hash="ff168405f809920d01e06ddf35f0ce9f"/><dir name="Grid"><dir name="Render"><file name="Xml.php" hash="72d1776285ccf240deb79b2d539eeeb8"/></dir></dir><file name="Grid.php" hash="9522d5da8b9040747ae28448c54dc02d"/></dir><file name="Flux.php" hash="8b8f0dd7d83f81c00d7783ce1e8fd771"/></dir></dir><dir name="Helper"><file name="Data.php" hash="66115a2432d46abf75ea820d7267d825"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Licenceids.php" hash="7e87247a1c3adff3d4d492fff30b154f"/><file name="Licenceids.php~" hash="8178c24480fd1b7b2272f4ad14942711"/><file name="Projectids.php" hash="165e3849645dcb69b0f964ee9fae1e34"/><file name="Projectids.php~" hash="50c198a9c12297db005329d27100fbe3"/><file name="Wsdlurls.php" hash="7d8480d874be8643816f59ecdbe68ce5"/></dir></dir></dir></dir><dir name="Customer"><dir name="Entity"><file name="Customer.php" hash="6db83b89383b2353cd28582a8300395d"/></dir></dir><file name="Customer.php" hash="a359c62f1be83444d783df4ac0c953d0"/><dir name="Flux"><dir name="Config"><file name="Demo.php" hash="d9d48fba9c60e94057504e9e39068dc3"/></dir><dir name="Soap"><dir name="Response"><file name="ChangeCustomerEMail.php" hash="c2efbbd5fff7a25b4e72f020893a7edc"/><file name="ChangeCustomerPassword.php" hash="7fc7f7052b3228d9bbe3ff042bdd2ec0"/><file name="CheckUserExists.php" hash="036d0ce3a53b062c21cbcf7837687142"/><file name="CreateShopOrder.php" hash="fba8280decfb79433b1781960fd159fb"/><file name="GetLicenses.php" hash="0a1142ca7d7c8818096cd341f821f21f"/><file name="GetProjects.php" hash="2a23285b07dc421287bca0dae8f8976c"/><file name="PrepareLogin.php" hash="6662461954f11338c921ef34fa34e6c6"/></dir></dir></dir><dir name="Mysql4"><dir name="Orders"><file name="Collection.php" hash="5974d09282cbd5f964ff7831654e43f5"/></dir><file name="Orders.php" hash="6159a072f030d0a127ec9ee09e6293e4"/><dir name="Users"><file name="Collection.php" hash="9355a78478686097b559a13640dd7976"/></dir><file name="Users.php" hash="ca9d2feb9c5df2ff1676c663f70f5f60"/></dir><file name="Observer.php" hash="d861d4741089da473281605b4d13cd01"/><file name="Orders.php" hash="e019a130619cbae9be12f2a9a54c705f"/><file name="Users.php" hash="e657f74825ea2e5d74990a9076c1ef2f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AdminController.php" hash="f76a58ba7a9bfc69dc440e4eef0903ce"/><file name="FluxController.php" hash="bec5e5a533376cd63d8d013fb7156df4"/><file name="UploadController.php" hash="91f2200f874269bc9123da194fbe23fe"/></dir><dir name="Checkout"><file name="OnepageController.php" hash="092ddc8d86b76847b99c1b51d2896c65"/></dir><file name="IndexController.php" hash="34f265af09a75061b27c1cd4f2a3deb0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b0d9a3a422b747fda49afb290423d068"/><file name="config.xml" hash="71eda6fc9ac7f45e5c286a23154584b3"/><file name="system.xml" hash="dfb7d3d80491cf7ca36a7e004cd73fff"/></dir><dir name="sql"><dir name="flux_setup"><file name="mysql4-install-0.1.0.php" hash="09721adc25163b0c3dad1c89993ed15e"/><file name="mysql4-upgrade-0.1.0-0.1.7.php" hash="1795afce0bd4295d5cdedbf00edf8350"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="flux.xml" hash="8e8c260a13ad9a5f6bd5407dd45f244d"/></dir><dir name="template"><dir name="flux"><dir name="catalog"><dir name="product"><file name="samples.phtml" hash="8f4f1d49e22a27a6aabdcc2911113dbf"/></dir></dir><file name="dlmanagerlinks.phtml" hash="687cdebf341c8a7221e1348b1c846421"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="acegmbh_flux.xml" hash="7e04b10d2f952c0ef393c366b0f3e2cd"/></dir><dir name="template"><dir name="flux"><file name="admin.phtml" hash="ac816c5038e5f3f6b6e2ae159e2c971a"/><file name="upload.phtml" hash="3c554379fdc591c4371e03b100d4c69c"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Acegmbh_Flux.csv" hash="030f7f14d541d94311c066496e0fe833"/></dir></target><target name="mageetc"><dir name="modules"><file name="Acegmbh_Flux.xml" hash="f4cd29414c1144dfb0ecdd68eb092c00"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="flux"><file name="CloudIcon_Apple.png" hash="21e2932e7c092fcccc4d483237619078"/><file name="CloudIcon_Html5.png" hash="87e71303bf577682cd41379cb1ea4dab"/><file name="CloudIcon_Win.png" hash="c1e3d22ae7a272cb073d76a83bcb6abf"/></dir></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
21
  </package>
skin/adminhtml/default/default/images/flux/CloudIcon_Apple.png CHANGED
File without changes
skin/adminhtml/default/default/images/flux/CloudIcon_Html5.png CHANGED
File without changes
skin/adminhtml/default/default/images/flux/CloudIcon_Win.png CHANGED
File without changes