@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -37,14 +37,17 @@ |
||
| 37 | 37 | <span class="name"> |
| 38 | 38 | <?php if( $attribute->getName() != '' ) : ?> |
| 39 | 39 | <?= $enc->html( $attribute->getName() ) ?> |
| 40 | - <?php else : ?> |
|
| 40 | + <?php else { |
|
| 41 | + : ?> |
|
| 41 | 42 | <?= $enc->html( $this->translate( 'client/code', $attribute->getCode() ) ) ?> |
| 42 | 43 | <?php endif ?> |
| 43 | 44 | </span> |
| 44 | 45 | |
| 45 | 46 | <?php switch( $attribute->getValue() ) : case 'array': case 'object': ?> |
| 46 | 47 | <span class="value"><?= $enc->html( join( ', ', (array) $attribute->getValue() ) ) ?></span> |
| 47 | - <?php break; default: ?> |
|
| 48 | + <?php break; |
|
| 49 | +} |
|
| 50 | +default: ?> |
|
| 48 | 51 | <span class="value"><?= $enc->html( $attribute->getValue() ) ?></span> |
| 49 | 52 | <?php endswitch ?> |
| 50 | 53 | |
@@ -155,7 +155,8 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | </ul> |
| 157 | 157 | |
| 158 | - <?php else : ?> |
|
| 158 | + <?php else { |
|
| 159 | + : ?> |
|
| 159 | 160 | |
| 160 | 161 | <input type="hidden" value="1" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrconfid', 'qty', ''] ) ) ?>"> |
| 161 | 162 | <select id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $code ) ?>" class="form-control select-list" |
@@ -205,7 +206,9 @@ discard block |
||
| 205 | 206 | value="<?= $enc->attr( $price->getValue() ) ?>" |
| 206 | 207 | <?php endif ?> |
| 207 | 208 | > |
| 208 | - <?php break; case 'date': ?> |
|
| 209 | + <?php break; |
|
| 210 | +} |
|
| 211 | +case 'date': ?> |
|
| 209 | 212 | <input id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $key ) ?>" class="form-control" type="date" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>"> |
| 210 | 213 | <?php break; default: ?> |
| 211 | 214 | <input id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $key ) ?>" class="form-control" type="text" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>"> |
@@ -60,7 +60,8 @@ discard block |
||
| 60 | 60 | <p class="order-notice"> |
| 61 | 61 | <?= $enc->html( $this->translate( 'client', 'Please enter your payment details' ), $enc::TRUST ) ?> |
| 62 | 62 | </p> |
| 63 | - <?php else : ?> |
|
| 63 | + <?php else { |
|
| 64 | + : ?> |
|
| 64 | 65 | <p class="order-notice"> |
| 65 | 66 | <?= $enc->html( $this->translate( 'client', 'You will now be forwarded to the next step' ), $enc::TRUST ) ?> |
| 66 | 67 | </p> |
@@ -103,7 +104,9 @@ discard block |
||
| 103 | 104 | <?php endforeach ?> |
| 104 | 105 | </select> |
| 105 | 106 | |
| 106 | - <?php break; case 'container': ?> |
|
| 107 | + <?php break; |
|
| 108 | +} |
|
| 109 | +case 'container': ?> |
|
| 107 | 110 | <div id="process-<?= $key ?>"></div> |
| 108 | 111 | |
| 109 | 112 | <?php break; case 'boolean': ?> |