@@ -221,9 +221,12 @@ |
||
| 221 | 221 | $context = $this->context(); |
| 222 | 222 | $cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' ); |
| 223 | 223 | |
| 224 | - try { |
|
| 224 | + try |
|
| 225 | + { |
|
| 225 | 226 | $id = $cntl->find( $addr->getEmail() )->getId(); |
| 226 | - } catch( \Exception $e ) { |
|
| 227 | + } |
|
| 228 | + catch( \Exception $e ) |
|
| 229 | + { |
|
| 227 | 230 | $id = $new ? $cntl->add( $addr->toArray() )->store()->get()->getId() : null; |
| 228 | 231 | } |
| 229 | 232 | |
@@ -389,8 +389,7 @@ discard block |
||
| 389 | 389 | $controller = $view->config( 'client/html/catalog/detail/url/controller', 'catalog' ); |
| 390 | 390 | $action = $view->config( 'client/html/catalog/detail/url/action', 'detail' ); |
| 391 | 391 | $config = $view->config( 'client/html/catalog/detail/url/config', [] ); |
| 392 | - } |
|
| 393 | - else |
|
| 392 | + } else |
|
| 394 | 393 | { |
| 395 | 394 | $params = $context->session()->get( 'aimeos/catalog/lists/params/last/' . $site, [] ); |
| 396 | 395 | |
@@ -476,8 +475,7 @@ discard block |
||
| 476 | 475 | (string) $view->param( 'b_supplier', '' ), |
| 477 | 476 | $view->param( 'b_siteid' ) |
| 478 | 477 | ); |
| 479 | - } |
|
| 480 | - else |
|
| 478 | + } else |
|
| 481 | 479 | { |
| 482 | 480 | $list = []; |
| 483 | 481 | $entries = (array) $view->param( 'b_prod', [] ); |
@@ -268,28 +268,27 @@ |
||
| 268 | 268 | $orderItem = $orderCntl->add( $basket->getId(), ['order.type' => 'web'] )->store(); |
| 269 | 269 | |
| 270 | 270 | $context->session()->set( 'aimeos/orderid', $orderItem->getId() ); |
| 271 | - } |
|
| 272 | - elseif( ( $orderid = $context->session()->get( 'aimeos/orderid' ) ) !== null ) |
|
| 271 | + } elseif( ( $orderid = $context->session()->get( 'aimeos/orderid' ) ) !== null ) |
|
| 273 | 272 | { |
| 274 | 273 | $parts = ['order/base/address', 'order/base/coupon', 'order/base/product', 'order/base/service']; |
| 275 | 274 | $orderItem = $orderCntl->get( $orderid, false ); |
| 276 | 275 | $basket = $basketCntl->load( $orderItem->getBaseId(), $parts, false ); |
| 277 | - } |
|
| 278 | - else |
|
| 276 | + } else |
|
| 279 | 277 | { |
| 280 | 278 | return; |
| 281 | 279 | } |
| 282 | 280 | |
| 283 | - if( ( $form = $this->processPayment( $basket, $orderItem ) ) === null ) // no payment service available |
|
| 281 | + if( ( $form = $this->processPayment( $basket, $orderItem ) ) === null ) { |
|
| 282 | + // no payment service available |
|
| 284 | 283 | { |
| 285 | 284 | $services = $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT ); |
| 285 | + } |
|
| 286 | 286 | $args = ( $service = reset( $services ) ) ? ['code' => $service->getCode()] : []; |
| 287 | 287 | |
| 288 | 288 | $orderCntl->save( $orderItem->setStatusPayment( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) ); |
| 289 | 289 | $view->standardUrlNext = $this->getUrlConfirm( $view, $args, ['absoluteUri' => true] ); |
| 290 | 290 | $view->standardMethod = 'POST'; |
| 291 | - } |
|
| 292 | - else |
|
| 291 | + } else |
|
| 293 | 292 | { |
| 294 | 293 | $view = $this->addFormData( $view, $form ); |
| 295 | 294 | } |
@@ -214,8 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | $html = $view->render( $view->config( $tplconf, $default ) ); |
| 217 | - } |
|
| 218 | - else |
|
| 217 | + } else |
|
| 219 | 218 | { |
| 220 | 219 | $html = $this->modify( $html, $uid ); |
| 221 | 220 | } |
@@ -293,8 +292,7 @@ discard block |
||
| 293 | 292 | { |
| 294 | 293 | $this->logException( $e ); |
| 295 | 294 | } |
| 296 | - } |
|
| 297 | - else |
|
| 295 | + } else |
|
| 298 | 296 | { |
| 299 | 297 | $html = $this->modify( $html, $uid ); |
| 300 | 298 | } |
@@ -167,8 +167,7 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | $html = $view->render( $config->get( $tplconf, $default ) ); |
| 170 | - } |
|
| 171 | - else |
|
| 170 | + } else |
|
| 172 | 171 | { |
| 173 | 172 | $html = $this->modify( $html, $uid ); |
| 174 | 173 | } |
@@ -238,8 +237,7 @@ discard block |
||
| 238 | 237 | { |
| 239 | 238 | $this->logException( $e ); |
| 240 | 239 | } |
| 241 | - } |
|
| 242 | - else |
|
| 240 | + } else |
|
| 243 | 241 | { |
| 244 | 242 | $html = $this->modify( $html, $uid ); |
| 245 | 243 | } |
@@ -212,8 +212,7 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $html = $view->render( $this->getTemplatePath( $tplconf, $default ) ); |
| 215 | - } |
|
| 216 | - else |
|
| 215 | + } else |
|
| 217 | 216 | { |
| 218 | 217 | $html = $this->modify( $html, $uid ); |
| 219 | 218 | } |
@@ -304,8 +303,7 @@ discard block |
||
| 304 | 303 | { |
| 305 | 304 | $this->logException( $e ); |
| 306 | 305 | } |
| 307 | - } |
|
| 308 | - else |
|
| 306 | + } else |
|
| 309 | 307 | { |
| 310 | 308 | $html = $this->modify( $html, $uid ); |
| 311 | 309 | } |
@@ -145,8 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $html = $view->render( $view->config( $tplconf, $default ) ); |
| 147 | 147 | $this->setBasketCached( $key, $html ); |
| 148 | - } |
|
| 149 | - else |
|
| 148 | + } else |
|
| 150 | 149 | { |
| 151 | 150 | $html = $this->modify( $html, $uid ); |
| 152 | 151 | } |
@@ -215,8 +214,7 @@ discard block |
||
| 215 | 214 | { |
| 216 | 215 | $this->logException( $e ); |
| 217 | 216 | } |
| 218 | - } |
|
| 219 | - else |
|
| 217 | + } else |
|
| 220 | 218 | { |
| 221 | 219 | $html = $this->modify( $html, $uid ); |
| 222 | 220 | } |
@@ -214,8 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | $html = $view->render( $view->config( $tplconf, $default ) ); |
| 217 | - } |
|
| 218 | - else |
|
| 217 | + } else |
|
| 219 | 218 | { |
| 220 | 219 | $html = $this->modify( $html, $uid ); |
| 221 | 220 | } |
@@ -293,8 +292,7 @@ discard block |
||
| 293 | 292 | { |
| 294 | 293 | $this->logException( $e ); |
| 295 | 294 | } |
| 296 | - } |
|
| 297 | - else |
|
| 295 | + } else |
|
| 298 | 296 | { |
| 299 | 297 | $html = $this->modify( $html, $uid ); |
| 300 | 298 | } |
@@ -214,8 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | $html = $view->render( $view->config( $tplconf, $default ) ); |
| 217 | - } |
|
| 218 | - else |
|
| 217 | + } else |
|
| 219 | 218 | { |
| 220 | 219 | $html = $this->modify( $html, $uid ); |
| 221 | 220 | } |
@@ -293,8 +292,7 @@ discard block |
||
| 293 | 292 | { |
| 294 | 293 | $this->logException( $e ); |
| 295 | 294 | } |
| 296 | - } |
|
| 297 | - else |
|
| 295 | + } else |
|
| 298 | 296 | { |
| 299 | 297 | $html = $this->modify( $html, $uid ); |
| 300 | 298 | } |