@@ -524,19 +524,22 @@ discard block |
||
524 | 524 | $disable = $view->config( 'client/html/checkout/standard/address/delivery/disable-new', false ); |
525 | 525 | $type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_DELIVERY; |
526 | 526 | |
527 | - if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) // new address |
|
527 | + if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) { |
|
528 | + // new address |
|
528 | 529 | { |
529 | 530 | $params = $view->param( 'ca_delivery', [] ); |
531 | + } |
|
530 | 532 | |
531 | 533 | if( ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) { |
532 | 534 | throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) ); |
533 | 535 | } |
534 | 536 | |
535 | 537 | $ctrl->addAddress( $type, $params, 0 ); |
536 | - } |
|
537 | - else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) // existing address |
|
538 | + } else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) { |
|
539 | + // existing address |
|
538 | 540 | { |
539 | 541 | $params = $view->param( 'ca_delivery_' . $option, [] ); |
542 | + } |
|
540 | 543 | |
541 | 544 | if( !empty( $params ) && ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) { |
542 | 545 | throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) ); |
@@ -549,13 +552,11 @@ discard block |
||
549 | 552 | $params = array_replace( $address->toArray(), $params + ['order.base.address.addressid' => $option] ); |
550 | 553 | $addr = $ctrl->addAddress( $type, $params, 0 )->get()->getAddress( $type, 0 ); // sanitize address first |
551 | 554 | $custCntl->addAddressItem( $address->copyFrom( $addr ), $option )->store(); // update existing address |
552 | - } |
|
553 | - else |
|
555 | + } else |
|
554 | 556 | { |
555 | 557 | $ctrl->addAddress( $type, $params, 0 ); |
556 | 558 | } |
557 | - } |
|
558 | - else |
|
559 | + } else |
|
559 | 560 | { |
560 | 561 | $ctrl->deleteAddress( $type ); |
561 | 562 | } |
@@ -787,8 +788,7 @@ discard block |
||
787 | 788 | $invalid[$key] = $name; |
788 | 789 | unset( $params[$key] ); |
789 | 790 | } |
790 | - } |
|
791 | - else |
|
791 | + } else |
|
792 | 792 | { |
793 | 793 | unset( $params[$key] ); |
794 | 794 | } |
@@ -129,8 +129,11 @@ |
||
129 | 129 | <span class="value col-7"> |
130 | 130 | <?php if( $interval = $this->get( 'listsIntervalItems', map() )->get( $item->getInterval() ) ) : ?> |
131 | 131 | <?= $enc->html( $interval->getName(), $enc::TRUST ); ?> |
132 | - <?php else : ?> |
|
133 | - <?= $enc->html( $item->getInterval(), $enc::TRUST ); ?> |
|
132 | + <?php else { |
|
133 | + : ?> |
|
134 | + <?= $enc->html( $item->getInterval(), $enc::TRUST ); |
|
135 | +} |
|
136 | +?> |
|
134 | 137 | <?php endif; ?> |
135 | 138 | </span> |
136 | 139 | </div> |
@@ -57,9 +57,12 @@ discard block |
||
57 | 57 | <p class="order-notice"> |
58 | 58 | <?= $enc->html( $this->translate( 'client', 'Please enter your payment details' ), $enc::TRUST ); ?> |
59 | 59 | </p> |
60 | - <?php else : ?> |
|
60 | + <?php else { |
|
61 | + : ?> |
|
61 | 62 | <p class="order-notice"> |
62 | - <?= $enc->html( $this->translate( 'client', 'You will now be forwarded to the next step' ), $enc::TRUST ); ?> |
|
63 | + <?= $enc->html( $this->translate( 'client', 'You will now be forwarded to the next step' ), $enc::TRUST ); |
|
64 | +} |
|
65 | +?> |
|
63 | 66 | </p> |
64 | 67 | <?php endif; ?> |
65 | 68 | |
@@ -72,8 +75,11 @@ discard block |
||
72 | 75 | <input type="hidden" id="process-<?= $id; ?>" value="<?= $enc->attr( $value ); ?>" |
73 | 76 | name="<?= $enc->attr( $this->formparam( [$item->getInternalCode(), $key], $prefix ) ); ?>" |
74 | 77 | /> |
75 | - <?php else : ?> |
|
76 | - <input type="hidden" id="process-<?= $id; ?>" value="<?= $enc->attr( $value ); ?>" |
|
78 | + <?php else { |
|
79 | + : ?> |
|
80 | + <input type="hidden" id="process-<?= $id; |
|
81 | +} |
|
82 | +?>" value="<?= $enc->attr( $value ); ?>" |
|
77 | 83 | name="<?= $enc->attr( $this->formparam( $item->getInternalCode(), $prefix ) ); ?>" |
78 | 84 | /> |
79 | 85 | <?php endif; ?> |
@@ -161,10 +167,13 @@ discard block |
||
161 | 167 | <?= $enc->html( $this->translate( 'client', 'Proceed' ), $enc::TRUST ); ?> |
162 | 168 | </a> |
163 | 169 | |
164 | - <?php else : ?> |
|
170 | + <?php else { |
|
171 | + : ?> |
|
165 | 172 | |
166 | 173 | <button class="btn btn-primary btn-lg btn-action"> |
167 | - <?= $enc->html( $this->translate( 'client', 'Proceed' ), $enc::TRUST ); ?> |
|
174 | + <?= $enc->html( $this->translate( 'client', 'Proceed' ), $enc::TRUST ); |
|
175 | +} |
|
176 | +?> |
|
168 | 177 | </button> |
169 | 178 | |
170 | 179 | <?php endif; ?> |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $this->pdf->setFont( 'dejavusans', '', 10 ); |
25 | 25 | |
26 | 26 | $vmargin = [ |
27 | - 'h1' => [ // HTML tag |
|
27 | + 'h1' => [// HTML tag |
|
28 | 28 | 0 => ['h' => 1.5, 'n' => 0], // space before = h * n |
29 | 29 | 1 => ['h' => 1.5, 'n' => 3] // space after = h * n |
30 | 30 | ], |
@@ -319,13 +319,11 @@ |
||
319 | 319 | { |
320 | 320 | $item = $item->set( 'checked', true ); |
321 | 321 | unset( $attrparams['f_attrid'][$key] ); |
322 | - } |
|
323 | - elseif( ( $key = array_search( $id, $oneIds ) ) !== false ) |
|
322 | + } elseif( ( $key = array_search( $id, $oneIds ) ) !== false ) |
|
324 | 323 | { |
325 | 324 | $item = $item->set( 'checked', true ); |
326 | 325 | unset( $attrparams['f_oneid'][$key] ); |
327 | - } |
|
328 | - elseif( ( $key = array_search( $id, $optIds ) ) !== false ) |
|
326 | + } elseif( ( $key = array_search( $id, $optIds ) ) !== false ) |
|
329 | 327 | { |
330 | 328 | $item = $item->set( 'checked', true ); |
331 | 329 | unset( $attrparams['f_optid'][$key] ); |
@@ -166,8 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | $html = $view->render( $config->get( $tplconf, $default ) ); |
169 | - } |
|
170 | - else |
|
169 | + } else |
|
171 | 170 | { |
172 | 171 | $html = $this->modifyBody( $html, $uid ); |
173 | 172 | } |
@@ -236,8 +235,7 @@ discard block |
||
236 | 235 | { |
237 | 236 | $this->logException( $e ); |
238 | 237 | } |
239 | - } |
|
240 | - else |
|
238 | + } else |
|
241 | 239 | { |
242 | 240 | $html = $this->modifyHeader( $html, $uid ); |
243 | 241 | } |
@@ -443,7 +443,7 @@ |
||
443 | 443 | } |
444 | 444 | |
445 | 445 | $tree = \Aimeos\Controller\Frontend::create( $context, 'catalog' )->uses( $domains ) |
446 | - ->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::LIST ); |
|
446 | + ->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::list ); |
|
447 | 447 | |
448 | 448 | |
449 | 449 | $articles = map(); |
@@ -239,7 +239,7 @@ |
||
239 | 239 | ->col( 'order.base.product.id', 'order.base.product.productid' ); |
240 | 240 | |
241 | 241 | $exclude = \Aimeos\Controller\Frontend::create( $context, 'review' ) |
242 | - ->for( 'product', $prodMap->keys()->toArray() ) |
|
242 | + ->for( 'product', $prodMap->keys()->toArray() ) |
|
243 | 243 | ->slice( 0, $prodMap->count() ) |
244 | 244 | ->list()->getRefId(); |
245 | 245 |