@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | |
291 | 291 | // Klarna Prefill checkBox |
292 | 292 | if ($this->isUserLoggedIn()) { |
293 | - $this->View()->assign('KlarnaPreFillSelect', !$this->session['klarnaPreFill']); |
|
293 | + $this->View()->assign('KlarnaPreFillSelect', !$this->session['klarnaPreFill']); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | // Iframe Backend Config |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | if ($this->Request()->getParam('sArticle') && $this->Request()->getParam('sQuantity')) { |
437 | 437 | $this->View()->sBasketInfo = $basketObj->sUpdateArticle($this->Request()->getParam('sArticle'), $this->Request()->getParam('sQuantity')); |
438 | 438 | } |
439 | - $this->redirect(['action' => $this->Request()->getParam('sTargetAction', 'showIframe')]); |
|
439 | + $this->redirect(['action' => $this->Request()->getParam('sTargetAction', 'showIframe')]); |
|
440 | 440 | } |
441 | 441 | |
442 | 442 | /** |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | return array("id" => $this->session['sState']); |
611 | 611 | } |
612 | 612 | |
613 | - /** |
|
613 | + /** |
|
614 | 614 | * @param Klarna_Checkout_Order $order |
615 | 615 | */ |
616 | 616 | public function createAccount($order = null, $checkLoginState=true) |
@@ -739,8 +739,8 @@ discard block |
||
739 | 739 | } |
740 | 740 | $module->sSYSTEM->_POST = $data['billing']; |
741 | 741 | if (Shopware::VERSION === '___VERSION___' || version_compare(Shopware::VERSION, '5.2.0', '>=')) { |
742 | - $userId = $session->offsetGet('sUserId'); |
|
743 | - $this->updateBilling($userId, $data['billing']); |
|
742 | + $userId = $session->offsetGet('sUserId'); |
|
743 | + $this->updateBilling($userId, $data['billing']); |
|
744 | 744 | } else{ |
745 | 745 | $module->sUpdateBilling(); |
746 | 746 | } |
@@ -851,13 +851,13 @@ discard block |
||
851 | 851 | |
852 | 852 | // get updated password; it is md5 randomized after register |
853 | 853 | $getUser = Shopware()->Models()->getRepository('Shopware\Models\Customer\Customer')->findOneBy( |
854 | - array('email' => $data['auth']['email']) |
|
855 | - ); |
|
854 | + array('email' => $data['auth']['email']) |
|
855 | + ); |
|
856 | 856 | |
857 | - $data['auth']['password']= $getUser->getPassword(); |
|
858 | - $data['auth']['passwordMD5']= $getUser->getPassword(); |
|
859 | - $data['auth']['encoderName'] = 'md5'; |
|
860 | - return $data; |
|
857 | + $data['auth']['password']= $getUser->getPassword(); |
|
858 | + $data['auth']['passwordMD5']= $getUser->getPassword(); |
|
859 | + $data['auth']['encoderName'] = 'md5'; |
|
860 | + return $data; |
|
861 | 861 | } |
862 | 862 | |
863 | 863 | |
@@ -875,19 +875,19 @@ discard block |
||
875 | 875 | unset ($data['billing']); |
876 | 876 | |
877 | 877 | $customer = Shopware()->Models()->getRepository('Shopware\Models\Customer\Customer')->findOneBy( |
878 | - array('id' => $userId) |
|
879 | - ); |
|
878 | + array('id' => $userId) |
|
879 | + ); |
|
880 | 880 | $customer->fromArray($data); |
881 | 881 | Shopware()->Container()->get('shopware_account.customer_service')->update($customer); |
882 | 882 | } |
883 | 883 | |
884 | 884 | |
885 | - /** |
|
886 | - * Updates the shipping address |
|
887 | - * |
|
888 | - * @param int $userId |
|
889 | - * @param array $shippingData |
|
890 | - */ |
|
885 | + /** |
|
886 | + * Updates the shipping address |
|
887 | + * |
|
888 | + * @param int $userId |
|
889 | + * @param array $shippingData |
|
890 | + */ |
|
891 | 891 | private function updateShipping($userId, $shippingData) |
892 | 892 | { |
893 | 893 | /** @var \Shopware\Components\Model\ModelManager $em */ |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | $addressold = $customer->getDefaultShippingAddress(); |
901 | 901 | $address = new \Shopware\Models\Customer\Address(); |
902 | 902 | |
903 | - /** @var \Shopware\Models\Country\Country $country */ |
|
903 | + /** @var \Shopware\Models\Country\Country $country */ |
|
904 | 904 | $country = $addressold->getCountry(); |
905 | 905 | $shippingData['country'] = $country; |
906 | 906 | if ($shippingData['phone'] === null) { |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | /** @var \Shopware\Models\Customer\Address $address */ |
935 | 935 | $address = $customer->getDefaultBillingAddress(); |
936 | 936 | |
937 | - /** @var \Shopware\Models\Country\Country $country */ |
|
937 | + /** @var \Shopware\Models\Country\Country $country */ |
|
938 | 938 | $country = $address->getCountry(); |
939 | 939 | $billingData['country'] = $country; |
940 | 940 | $address->fromArray($billingData); |
@@ -948,7 +948,7 @@ discard block |
||
948 | 948 | */ |
949 | 949 | public function loginAction() |
950 | 950 | { |
951 | - // Shopware()->Session()->offsetSet('KlarnaOrder', null); |
|
951 | + // Shopware()->Session()->offsetSet('KlarnaOrder', null); |
|
952 | 952 | $this->redirect(array('controller' => 'payment_klarna', 'action' => 'showIframe')); |
953 | 953 | } |
954 | 954 | |
@@ -997,14 +997,14 @@ discard block |
||
997 | 997 | |
998 | 998 | if ($order['status'] == 'checkout_complete') { |
999 | 999 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: checkout_complete. Save oder if session values match.",3); |
1000 | - if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null){ |
|
1000 | + if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null){ |
|
1001 | 1001 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: Session matches. Order will be saved",3); |
1002 | 1002 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId ); |
1003 | 1003 | $orderNumber = $this->saveOrder( |
1004 | 1004 | $order['reservation'], |
1005 | 1005 | $order['reference'] |
1006 | 1006 | ); |
1007 | - Shopware()->Session()->offsetSet('KlarnaTransactionId', null ); |
|
1007 | + Shopware()->Session()->offsetSet('KlarnaTransactionId', null ); |
|
1008 | 1008 | } |
1009 | 1009 | } |
1010 | 1010 | |
@@ -1437,7 +1437,7 @@ discard block |
||
1437 | 1437 | |
1438 | 1438 | protected function isUserLoggedIn() |
1439 | 1439 | { |
1440 | - return (isset($this->session->sUserId) && !empty($this->session->sUserId)); |
|
1440 | + return (isset($this->session->sUserId) && !empty($this->session->sUserId)); |
|
1441 | 1441 | } |
1442 | 1442 | |
1443 | 1443 | /** |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | $args->setReturn($builder); |
492 | 492 | } |
493 | 493 | |
494 | - public function onGetStreetSplitService() |
|
494 | + public function onGetStreetSplitService() |
|
495 | 495 | { |
496 | 496 | $this->Application()->Loader()->registerNamespace( |
497 | 497 | 'Shopware\Components', |
@@ -1364,12 +1364,12 @@ discard block |
||
1364 | 1364 | /** @var Enlight_Components_Session_Namespace $session */ |
1365 | 1365 | $session = $this->Application()->Session(); |
1366 | 1366 | |
1367 | - // Switch User to external PaymentId after registration |
|
1368 | - if (isset($session['KlarnaExternalPaymentId'])) { |
|
1367 | + // Switch User to external PaymentId after registration |
|
1368 | + if (isset($session['KlarnaExternalPaymentId'])) { |
|
1369 | 1369 | $this->savePayment($session['KlarnaExternalPaymentId']); |
1370 | 1370 | } |
1371 | 1371 | |
1372 | - $view->assign('klarnaRedirect', $request->has('klarnaRedirect') && $request->getParam('klarnaRedirect') == 1); |
|
1372 | + $view->assign('klarnaRedirect', $request->has('klarnaRedirect') && $request->getParam('klarnaRedirect') == 1); |
|
1373 | 1373 | } |
1374 | 1374 | |
1375 | 1375 | |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | $userData['billingaddress']['country'] =$country; |
1461 | 1461 | $userData['shippingaddress']['countryID'] = $session['sChangedCountry']; |
1462 | 1462 | $userData['billingaddress']['countryID'] = $session['sChangedCountry']; |
1463 | - } |
|
1463 | + } |
|
1464 | 1464 | |
1465 | 1465 | $orderVariables['sUserData'] = $userData; |
1466 | 1466 | $testbreakpoint = 0; |
@@ -2385,14 +2385,14 @@ discard block |
||
2385 | 2385 | } else { |
2386 | 2386 | $url = $front->Router()->assemble(array('controller' => 'index', 'module' => 'frontend')); |
2387 | 2387 | } |
2388 | - if (version_compare(Shopware::VERSION, '5.2.0', '>=')) { |
|
2388 | + if (version_compare(Shopware::VERSION, '5.2.0', '>=')) { |
|
2389 | 2389 | # make sure me get only the image name, path is set in case of upgarde from SW.5.1 to 5.2 |
2390 | 2390 | $parts = explode('/', $media); |
2391 | 2391 | $end = end($parts); |
2392 | - $media = $url . 'media/image/' . $end; |
|
2393 | - } else { |
|
2394 | - $media = $url . $media; |
|
2395 | - } |
|
2392 | + $media = $url . 'media/image/' . $end; |
|
2393 | + } else { |
|
2394 | + $media = $url . $media; |
|
2395 | + } |
|
2396 | 2396 | } |
2397 | 2397 | |
2398 | 2398 | return $media; |