@@ -152,7 +152,8 @@ discard block |
||
152 | 152 | |
153 | 153 | </ul> |
154 | 154 | |
155 | - <?php else : ?> |
|
155 | + <?php else { |
|
156 | + : ?> |
|
156 | 157 | |
157 | 158 | <input type="hidden" value="1" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrconfid', 'qty', ''] ) ) ?>"> |
158 | 159 | <select id="select-<?= $enc->attr( $key ) ?>" class="form-control select-list" |
@@ -204,7 +205,9 @@ discard block |
||
204 | 205 | value="<?= $enc->attr( $price->getValue() ) ?>" |
205 | 206 | <?php endif ?> |
206 | 207 | > |
207 | - <?php break; case 'date': ?> |
|
208 | + <?php break; |
|
209 | +} |
|
210 | +case 'date': ?> |
|
208 | 211 | <input id="select-<?= $enc->attr( $key ) ?>" class="form-control" type="date" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>"> |
209 | 212 | <?php break; default: ?> |
210 | 213 | <input id="select-<?= $enc->attr( $key ) ?>" class="form-control" type="text" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>"> |
@@ -58,7 +58,10 @@ |
||
58 | 58 | <?php $current = $params; if( is_array( $current['f_optid'] ) ) { unset( $current['f_optid'][$key] ); } ?> |
59 | 59 | <?php elseif( isset( $oneIds[$attrType] ) && ( $key = array_search( $id, (array) $oneIds[$attrType] ) ) !== false ) : ?> |
60 | 60 | <?php $current = $params; if( is_array( $current['f_oneid'][$attrType] ) ) { unset( $current['f_oneid'][$attrType][$key] ); } ?> |
61 | - <?php else : continue; ?> |
|
61 | + <?php else { |
|
62 | + : continue; |
|
63 | +} |
|
64 | +?> |
|
62 | 65 | <?php endif; ?> |
63 | 66 | |
64 | 67 | <a class="minibutton close" href="<?= $enc->attr( $this->link( $linkKey, $attribute->get( 'params', [] ) ) ); ?>"> |
@@ -43,8 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | $serviceCntl = \Aimeos\Controller\Frontend::create( $context, 'service' ); |
45 | 45 | $orderItem = $serviceCntl->updateSync( $view->request(), $code, $orderid ); |
46 | - } |
|
47 | - else |
|
46 | + } else |
|
48 | 47 | { |
49 | 48 | $orderCntl = \Aimeos\Controller\Frontend::create( $context, 'order' ); |
50 | 49 | $orderItem = $orderCntl->get( $orderid, false ); |
@@ -211,28 +211,27 @@ |
||
211 | 211 | $orderItem = $orderCntl->add( $basket->getId(), ['order.type' => 'web'] )->store(); |
212 | 212 | |
213 | 213 | $context->session()->set( 'aimeos/orderid', $orderItem->getId() ); |
214 | - } |
|
215 | - elseif( ( $orderid = $context->session()->get( 'aimeos/orderid' ) ) !== null ) |
|
214 | + } elseif( ( $orderid = $context->session()->get( 'aimeos/orderid' ) ) !== null ) |
|
216 | 215 | { |
217 | 216 | $parts = ['order/base/address', 'order/base/coupon', 'order/base/product', 'order/base/service']; |
218 | 217 | $orderItem = $orderCntl->get( $orderid, false ); |
219 | 218 | $basket = $basketCntl->load( $orderItem->getBaseId(), $parts, false ); |
220 | - } |
|
221 | - else |
|
219 | + } else |
|
222 | 220 | { |
223 | 221 | return; |
224 | 222 | } |
225 | 223 | |
226 | - if( ( $form = $this->processPayment( $basket, $orderItem ) ) === null ) // no payment service available |
|
224 | + if( ( $form = $this->processPayment( $basket, $orderItem ) ) === null ) { |
|
225 | + // no payment service available |
|
227 | 226 | { |
228 | 227 | $services = $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT ); |
228 | + } |
|
229 | 229 | $args = ( $service = reset( $services ) ) ? ['code' => $service->getCode()] : []; |
230 | 230 | |
231 | 231 | $orderCntl->save( $orderItem->setStatusPayment( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) ); |
232 | 232 | $view->standardUrlNext = $this->getUrlConfirm( $view, $args, ['absoluteUri' => true] ); |
233 | 233 | $view->standardMethod = 'POST'; |
234 | - } |
|
235 | - else |
|
234 | + } else |
|
236 | 235 | { |
237 | 236 | $this->addFormData( $view, $form ); |
238 | 237 | } |
@@ -149,8 +149,7 @@ |
||
149 | 149 | $value = $oservice->getAttribute( $key, 'delivery' ) ?: $value; |
150 | 150 | $item->value = $oservice->getAttribute( $key . '/hidden', 'delivery' ) ?: $value; |
151 | 151 | } |
152 | - } |
|
153 | - else |
|
152 | + } else |
|
154 | 153 | { |
155 | 154 | foreach( $attr as $key => $item ) { |
156 | 155 | $item->value = is_array( $item->getDefault() ) ? key( $item->getDefault() ) : $item->getDefault(); |
@@ -149,8 +149,7 @@ |
||
149 | 149 | $value = $oservice->getAttribute( $key, 'payment' ) ?: $value; |
150 | 150 | $item->value = $oservice->getAttribute( $key . '/hidden', 'payment' ) ?: $value; |
151 | 151 | } |
152 | - } |
|
153 | - else |
|
152 | + } else |
|
154 | 153 | { |
155 | 154 | foreach( $attr as $key => $item ) { |
156 | 155 | $item->value = is_array( $item->getDefault() ) ? key( $item->getDefault() ) : $item->getDefault(); |
@@ -104,7 +104,7 @@ |
||
104 | 104 | public function data( \Aimeos\Base\View\Iface $view, array &$tags = [], string &$expire = null ) : \Aimeos\Base\View\Iface |
105 | 105 | { |
106 | 106 | $tree = \Aimeos\Controller\Frontend::create( $this->context(), 'catalog' )->uses( $this->domains() ) |
107 | - ->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::LIST ); |
|
107 | + ->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::list ); |
|
108 | 108 | |
109 | 109 | // Delete cache when products are added or deleted even when in "tag-all" mode |
110 | 110 | $this->addMetaItems( $tree, $expire, $tags, ['catalog', 'product'] ); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | <title><?= $enc->html( strip_tags( $catItem->getName() ) ) ?> | <?= $enc->html( $this->get( 'contextSiteLabel', 'Aimeos' ) ) ?></title> |
31 | 31 | |
32 | - <link rel="canonical" href="<?= $enc->attr( $this->link( 'client/html/catalog/tree/url', map( $this->get( 'listParams', [] ))->except( 'f_sort' )->all(), ['absoluteUri' => true] ) ) ?>"> |
|
32 | + <link rel="canonical" href="<?= $enc->attr( $this->link( 'client/html/catalog/tree/url', map( $this->get( 'listParams', [] ) )->except( 'f_sort' )->all(), ['absoluteUri' => true] ) ) ?>"> |
|
33 | 33 | |
34 | 34 | <?php foreach( $catItem->getRefItems( 'text', 'meta-keyword', 'default' ) as $textItem ) : ?> |
35 | 35 | <meta name="keywords" content="<?= $enc->attr( strip_tags( $textItem->getContent() ) ) ?>"> |