@@ -249,8 +249,7 @@ |
||
| 249 | 249 | { |
| 250 | 250 | $view->standardErrorList = $view->get( 'standardErrorList', [] ) + $errors; |
| 251 | 251 | throw new \Aimeos\Client\Html\Exception( sprintf( 'Please recheck your delivery choice' ) ); |
| 252 | - } |
|
| 253 | - else |
|
| 252 | + } else |
|
| 254 | 253 | { |
| 255 | 254 | $basketCtrl->addService( 'delivery', $serviceId, $attributes ); |
| 256 | 255 | } |
@@ -249,8 +249,7 @@ |
||
| 249 | 249 | { |
| 250 | 250 | $view->standardErrorList = $view->get( 'standardErrorList', [] ) + $errors; |
| 251 | 251 | throw new \Aimeos\Client\Html\Exception( sprintf( 'Please recheck your payment choice' ) ); |
| 252 | - } |
|
| 253 | - else |
|
| 252 | + } else |
|
| 254 | 253 | { |
| 255 | 254 | $basketCtrl->addService( 'payment', $serviceId, $attributes ); |
| 256 | 255 | } |
@@ -463,9 +463,11 @@ discard block |
||
| 463 | 463 | $disable = $view->config( 'client/html/checkout/standard/address/delivery/disable-new', false ); |
| 464 | 464 | $type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_DELIVERY; |
| 465 | 465 | |
| 466 | - if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) // new address |
|
| 466 | + if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) { |
|
| 467 | + // new address |
|
| 467 | 468 | { |
| 468 | 469 | $params = $view->param( 'ca_delivery', [] ); |
| 470 | + } |
|
| 469 | 471 | $invalid = $this->checkFields( $params ); |
| 470 | 472 | |
| 471 | 473 | if( count( $invalid ) > 0 ) |
@@ -475,10 +477,11 @@ discard block |
||
| 475 | 477 | } |
| 476 | 478 | |
| 477 | 479 | $basketCtrl->setAddress( $type, $params ); |
| 478 | - } |
|
| 479 | - else if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) !== '-1' ) // existing address |
|
| 480 | + } else if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) !== '-1' ) { |
|
| 481 | + // existing address |
|
| 480 | 482 | { |
| 481 | 483 | $list = []; |
| 484 | + } |
|
| 482 | 485 | $params = $view->param( 'ca_delivery_' . $option, [] ); |
| 483 | 486 | |
| 484 | 487 | if( !empty( $params ) && ( $invalid = $this->checkFields( $params ) ) !== [] ) |
@@ -495,8 +498,7 @@ discard block |
||
| 495 | 498 | $address = $controller->editAddressItem( $option, $list ); |
| 496 | 499 | |
| 497 | 500 | $basketCtrl->setAddress( $type, $address ); |
| 498 | - } |
|
| 499 | - else |
|
| 501 | + } else |
|
| 500 | 502 | { |
| 501 | 503 | $basketCtrl->setAddress( $type, null ); |
| 502 | 504 | } |
@@ -516,9 +518,12 @@ discard block |
||
| 516 | 518 | $context = $this->getContext(); |
| 517 | 519 | $basketCntl = \Aimeos\Controller\Frontend::create( $context, 'basket' ); |
| 518 | 520 | |
| 519 | - try { |
|
| 521 | + try |
|
| 522 | + { |
|
| 520 | 523 | $langid = $basketCntl->get()->getAddress( 'delivery' )->getLanguageId(); |
| 521 | - } catch( \Exception $e ) { |
|
| 524 | + } |
|
| 525 | + catch( \Exception $e ) |
|
| 526 | + { |
|
| 522 | 527 | $langid = $view->param( 'ca_delivery/order.base.address.languageid', $context->getLocale()->getLanguageId() ); |
| 523 | 528 | } |
| 524 | 529 | $view->deliveryLanguage = $langid; |
@@ -697,8 +702,7 @@ discard block |
||
| 697 | 702 | $invalid[$key] = $name; |
| 698 | 703 | unset( $params[$key] ); |
| 699 | 704 | } |
| 700 | - } |
|
| 701 | - else |
|
| 705 | + } else |
|
| 702 | 706 | { |
| 703 | 707 | unset( $params[$key] ); |
| 704 | 708 | } |
@@ -319,7 +319,9 @@ |
||
| 319 | 319 | $view->addressPaymentItem = $paymentAddressItem; |
| 320 | 320 | $view->addressDeliveryItems = $deliveryAddressItems; |
| 321 | 321 | } |
| 322 | - catch( \Exception $e ) {} // customer has no account yet |
|
| 322 | + catch( \Exception $e ) |
|
| 323 | + { |
|
| 324 | +} // customer has no account yet |
|
| 323 | 325 | |
| 324 | 326 | |
| 325 | 327 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); |
@@ -540,9 +540,11 @@ discard block |
||
| 540 | 540 | $disable = $view->config( 'client/html/checkout/standard/address/billing/disable-new', false ); |
| 541 | 541 | $type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT; |
| 542 | 542 | |
| 543 | - if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) // new address |
|
| 543 | + if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) { |
|
| 544 | + // new address |
|
| 544 | 545 | { |
| 545 | 546 | $params = $view->param( 'ca_billing', [] ); |
| 547 | + } |
|
| 546 | 548 | |
| 547 | 549 | if( ( $invalid = $this->checkFields( $params ) ) !== [] ) |
| 548 | 550 | { |
@@ -551,8 +553,7 @@ discard block |
||
| 551 | 553 | } |
| 552 | 554 | |
| 553 | 555 | $basketCtrl->setAddress( $type, $params ); |
| 554 | - } |
|
| 555 | - else // existing address |
|
| 556 | + } else // existing address |
|
| 556 | 557 | { |
| 557 | 558 | $list = []; |
| 558 | 559 | $params = $view->param( 'ca_billing_' . $option, [] ); |
@@ -588,9 +589,12 @@ discard block |
||
| 588 | 589 | $context = $this->getContext(); |
| 589 | 590 | $basketCntl = \Aimeos\Controller\Frontend::create( $context, 'basket' ); |
| 590 | 591 | |
| 591 | - try { |
|
| 592 | + try |
|
| 593 | + { |
|
| 592 | 594 | $langid = $basketCntl->get()->getAddress( 'payment' )->getLanguageId(); |
| 593 | - } catch( \Exception $e ) { |
|
| 595 | + } |
|
| 596 | + catch( \Exception $e ) |
|
| 597 | + { |
|
| 594 | 598 | $langid = $view->param( 'ca_billing/order.base.address.languageid', $context->getLocale()->getLanguageId() ); |
| 595 | 599 | } |
| 596 | 600 | $view->billingLanguage = $langid; |
@@ -769,8 +773,7 @@ discard block |
||
| 769 | 773 | $invalid[$key] = $name; |
| 770 | 774 | unset( $params[$key] ); |
| 771 | 775 | } |
| 772 | - } |
|
| 773 | - else |
|
| 776 | + } else |
|
| 774 | 777 | { |
| 775 | 778 | unset( $params[$key] ); |
| 776 | 779 | } |
@@ -268,14 +268,12 @@ discard block |
||
| 268 | 268 | $orderCntl->block( $orderItem ); |
| 269 | 269 | |
| 270 | 270 | $context->getSession()->set( 'aimeos/orderid', $orderItem->getId() ); |
| 271 | - } |
|
| 272 | - elseif ( $view->param( 'cp_payment', null ) !== null ) |
|
| 271 | + } elseif ( $view->param( 'cp_payment', null ) !== null ) |
|
| 273 | 272 | { |
| 274 | 273 | $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL; |
| 275 | 274 | $orderItem = $orderCntl->getItem( $context->getSession()->get( 'aimeos/orderid' ) ); |
| 276 | 275 | $basket = $basketCntl->load( $orderItem->getBaseId(), $parts, false ); |
| 277 | - } |
|
| 278 | - else |
|
| 276 | + } else |
|
| 279 | 277 | { |
| 280 | 278 | return; |
| 281 | 279 | } |
@@ -289,8 +287,7 @@ discard block |
||
| 289 | 287 | $orderCntl = \Aimeos\Controller\Frontend::create( $context, 'order' ); |
| 290 | 288 | $orderCntl->saveItem( $orderItem ); |
| 291 | 289 | |
| 292 | - } |
|
| 293 | - elseif( ( $form = $this->processPayment( $basket, $orderItem ) ) !== null ) |
|
| 290 | + } elseif( ( $form = $this->processPayment( $basket, $orderItem ) ) !== null ) |
|
| 294 | 291 | { |
| 295 | 292 | $view->standardUrlNext = $form->getUrl(); |
| 296 | 293 | $view->standardMethod = $form->getMethod(); |
@@ -24,9 +24,12 @@ |
||
| 24 | 24 | |
| 25 | 25 | <?php if( ( $mediaItem = reset( $mediaItems ) ) !== false ) : ?> |
| 26 | 26 | <div class="media-item" style="background-image: url('<?= $this->content( $mediaItem->getPreview() ); ?>')"></div> |
| 27 | - <?php else : ?> |
|
| 27 | + <?php else { |
|
| 28 | + : ?> |
|
| 28 | 29 | <div class="media-item"></div> |
| 29 | - <?php endif; ?> |
|
| 30 | + <?php endif; |
|
| 31 | +} |
|
| 32 | +?> |
|
| 30 | 33 | |
| 31 | 34 | <h3 class="name"><?= $enc->html( $productItem->getName(), $enc::TRUST ); ?></h3> |
| 32 | 35 | |
@@ -71,9 +71,12 @@ |
||
| 71 | 71 | </a> |
| 72 | 72 | </li> |
| 73 | 73 | <?php endforeach; ?> |
| 74 | - <?php else : ?> |
|
| 74 | + <?php else { |
|
| 75 | + : ?> |
|
| 75 | 76 | <li> |
| 76 | - <a href="<?= $enc->attr( $this->url( $listTarget, $listController, $listAction, $params, [], $listConfig ) ); ?>"> |
|
| 77 | + <a href="<?= $enc->attr( $this->url( $listTarget, $listController, $listAction, $params, [], $listConfig ) ); |
|
| 78 | +} |
|
| 79 | +?>"> |
|
| 77 | 80 | <?= $enc->html( $this->translate( 'client', 'Your search result' ), $enc::TRUST ); ?> |
| 78 | 81 | </a> |
| 79 | 82 | </li> |
@@ -103,7 +103,10 @@ |
||
| 103 | 103 | <?php $current = $params; if( is_array( $current['f_optid'] ) ) { unset( $current['f_optid'][$key] ); } ?> |
| 104 | 104 | <?php elseif( isset( $oneIds[$attrType] ) && ( $key = array_search( $id, (array) $oneIds[$attrType] ) ) !== false ) : ?> |
| 105 | 105 | <?php $current = $params; if( is_array( $current['f_oneid'][$attrType] ) ) { unset( $current['f_oneid'][$attrType][$key] ); } ?> |
| 106 | - <?php else : continue; ?> |
|
| 106 | + <?php else { |
|
| 107 | + : continue; |
|
| 108 | +} |
|
| 109 | +?> |
|
| 107 | 110 | <?php endif; ?> |
| 108 | 111 | <li class="attr-item"> |
| 109 | 112 | <a class="attr-name" href="<?= $enc->attr( $this->url( $listTarget, $listController, $listAction, $current, [], $listConfig ) ); ?>"> |