@@ -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 ); |
@@ -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(); |
@@ -138,7 +138,7 @@ |
||
138 | 138 | public function data( \Aimeos\Base\View\Iface $view, array &$tags = [], string &$expire = null ) : \Aimeos\Base\View\Iface |
139 | 139 | { |
140 | 140 | $tree = \Aimeos\Controller\Frontend::create( $this->context(), 'catalog' )->uses( $this->domains() ) |
141 | - ->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::LIST ); |
|
141 | + ->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::list ); |
|
142 | 142 | |
143 | 143 | $products = \Aimeos\Controller\Frontend::create( $this->context(), 'product' )->uses( $this->domains() ) |
144 | 144 | ->category( $tree->getChildren()->getId()->all(), 'promotion' )->search(); |
@@ -384,7 +384,7 @@ |
||
384 | 384 | $domain = str_replace( '/', '_', $item->getResourceType() ); // maximum compatiblity |
385 | 385 | |
386 | 386 | if( in_array( $item->getResourceType(), ['catalog', 'product', 'supplier'] ) ) { |
387 | - $tags[] = $tagAll ? $domain . '-' . $item->getId() : $domain ; |
|
387 | + $tags[] = $tagAll ? $domain . '-' . $item->getId() : $domain; |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | if( $item instanceof \Aimeos\MShop\Common\Item\Time\Iface && ( $date = $item->getDateEnd() ) !== null ) { |
@@ -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( $orderItem->setBaseItem( $basket ) ) ) === null ) // no payment service available |
|
224 | + if( ( $form = $this->processPayment( $orderItem->setBaseItem( $basket ) ) ) === 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 | } |
@@ -51,10 +51,10 @@ |
||
51 | 51 | && ( $articleId = $this->param( 'd_articleid' ) ) |
52 | 52 | ) { |
53 | 53 | foreach($this->detailProductItem->getListItems( 'product', 'default' ) as $listItem) : |
54 | - if($product = $listItem->getRefItem()) : |
|
55 | - $varAttr[$product->getId()] = $product->getRefItems( 'attribute', null, 'variant' )->col( 'attribute.id', 'attribute.type' ); |
|
56 | - endif; |
|
57 | - endforeach; |
|
54 | + if($product = $listItem->getRefItem()) : |
|
55 | + $varAttr[$product->getId()] = $product->getRefItems( 'attribute', null, 'variant' )->col( 'attribute.id', 'attribute.type' ); |
|
56 | + endif; |
|
57 | + endforeach; |
|
58 | 58 | |
59 | 59 | } |
60 | 60 | ?> |
@@ -50,8 +50,8 @@ |
||
50 | 50 | if( isset( $this->detailProductItem ) |
51 | 51 | && ( $articleId = $this->param( 'd_articleid' ) ) |
52 | 52 | ) { |
53 | - foreach($this->detailProductItem->getListItems( 'product', 'default' ) as $listItem) : |
|
54 | - if($product = $listItem->getRefItem()) : |
|
53 | + foreach( $this->detailProductItem->getListItems( 'product', 'default' ) as $listItem ) : |
|
54 | + if( $product = $listItem->getRefItem() ) : |
|
55 | 55 | $varAttr[$product->getId()] = $product->getRefItems( 'attribute', null, 'variant' )->col( 'attribute.id', 'attribute.type' ); |
56 | 56 | endif; |
57 | 57 | endforeach; |