@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->setAddress( $entry->id, null ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->setAddress( $relId, null ); |
| 85 | 84 | } |
@@ -87,13 +86,11 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->item = $this->controller->get(); |
| 89 | 88 | $status = 200; |
| 90 | - } |
|
| 91 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 89 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $status = 404; |
| 94 | 92 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 95 | - } |
|
| 96 | - catch( \Exception $e ) |
|
| 93 | + } catch( \Exception $e ) |
|
| 97 | 94 | { |
| 98 | 95 | $status = 500; |
| 99 | 96 | $view->errors = $this->getErrorDetails( $e ); |
@@ -139,13 +136,11 @@ discard block |
||
| 139 | 136 | |
| 140 | 137 | $view->item = $this->controller->get(); |
| 141 | 138 | $status = 201; |
| 142 | - } |
|
| 143 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 139 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 144 | 140 | { |
| 145 | 141 | $status = 404; |
| 146 | 142 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 147 | - } |
|
| 148 | - catch( \Exception $e ) |
|
| 143 | + } catch( \Exception $e ) |
|
| 149 | 144 | { |
| 150 | 145 | $status = 500; |
| 151 | 146 | $view->errors = $this->getErrorDetails( $e ); |
@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteProduct( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteProduct( $relId ); |
| 85 | 84 | } |
@@ -87,13 +86,11 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->item = $this->controller->get(); |
| 89 | 88 | $status = 200; |
| 90 | - } |
|
| 91 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 89 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $status = 404; |
| 94 | 92 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 95 | - } |
|
| 96 | - catch( \Exception $e ) |
|
| 93 | + } catch( \Exception $e ) |
|
| 97 | 94 | { |
| 98 | 95 | $status = 500; |
| 99 | 96 | $view->errors = $this->getErrorDetails( $e ); |
@@ -146,13 +143,11 @@ discard block |
||
| 146 | 143 | |
| 147 | 144 | $view->item = $this->controller->get(); |
| 148 | 145 | $status = 200; |
| 149 | - } |
|
| 150 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 146 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 151 | 147 | { |
| 152 | 148 | $status = 404; |
| 153 | 149 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 154 | - } |
|
| 155 | - catch( \Exception $e ) |
|
| 150 | + } catch( \Exception $e ) |
|
| 156 | 151 | { |
| 157 | 152 | $status = 500; |
| 158 | 153 | $view->errors = $this->getErrorDetails( $e ); |
@@ -206,13 +201,11 @@ discard block |
||
| 206 | 201 | |
| 207 | 202 | $view->item = $this->controller->get(); |
| 208 | 203 | $status = 201; |
| 209 | - } |
|
| 210 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 204 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 211 | 205 | { |
| 212 | 206 | $status = 404; |
| 213 | 207 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 214 | - } |
|
| 215 | - catch( \Exception $e ) |
|
| 208 | + } catch( \Exception $e ) |
|
| 216 | 209 | { |
| 217 | 210 | $status = 500; |
| 218 | 211 | $view->errors = $this->getErrorDetails( $e ); |
@@ -59,13 +59,11 @@ discard block |
||
| 59 | 59 | $status = 200; |
| 60 | 60 | $type = $view->param( 'id', 'default' ); |
| 61 | 61 | $view->item = $this->controller->setType( $type )->clear()->get(); |
| 62 | - } |
|
| 63 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 62 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 64 | 63 | { |
| 65 | 64 | $status = 404; |
| 66 | 65 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 67 | - } |
|
| 68 | - catch( \Exception $e ) |
|
| 66 | + } catch( \Exception $e ) |
|
| 69 | 67 | { |
| 70 | 68 | $status = 500; |
| 71 | 69 | $view->errors = $this->getErrorDetails( $e ); |
@@ -93,21 +91,18 @@ discard block |
||
| 93 | 91 | try |
| 94 | 92 | { |
| 95 | 93 | $view->item = $this->controller->load( $id, $this->getParts( $view ) ); |
| 96 | - } |
|
| 97 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 94 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 98 | 95 | { |
| 99 | 96 | $view->item = $this->controller->setType( $id )->get(); |
| 100 | 97 | $allow = true; |
| 101 | 98 | } |
| 102 | 99 | |
| 103 | 100 | $status = 200; |
| 104 | - } |
|
| 105 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 101 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 106 | 102 | { |
| 107 | 103 | $status = 404; |
| 108 | 104 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 109 | - } |
|
| 110 | - catch( \Exception $e ) |
|
| 105 | + } catch( \Exception $e ) |
|
| 111 | 106 | { |
| 112 | 107 | $status = 500; |
| 113 | 108 | $view->errors = $this->getErrorDetails( $e ); |
@@ -141,13 +136,11 @@ discard block |
||
| 141 | 136 | |
| 142 | 137 | $view->item = $basket; |
| 143 | 138 | $status = 200; |
| 144 | - } |
|
| 145 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 139 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 146 | 140 | { |
| 147 | 141 | $status = 404; |
| 148 | 142 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 149 | - } |
|
| 150 | - catch( \Exception $e ) |
|
| 143 | + } catch( \Exception $e ) |
|
| 151 | 144 | { |
| 152 | 145 | $status = 500; |
| 153 | 146 | $view->errors = $this->getErrorDetails( $e ); |
@@ -175,13 +168,11 @@ discard block |
||
| 175 | 168 | |
| 176 | 169 | $view->item = $item; |
| 177 | 170 | $status = 200; |
| 178 | - } |
|
| 179 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 171 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 180 | 172 | { |
| 181 | 173 | $status = 404; |
| 182 | 174 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 183 | - } |
|
| 184 | - catch( \Exception $e ) |
|
| 175 | + } catch( \Exception $e ) |
|
| 185 | 176 | { |
| 186 | 177 | $status = 500; |
| 187 | 178 | $view->errors = $this->getErrorDetails( $e ); |
@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->setService( $entry->id, null ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->setService( $relId, null ); |
| 85 | 84 | } |
@@ -87,13 +86,11 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->item = $this->controller->get(); |
| 89 | 88 | $status = 200; |
| 90 | - } |
|
| 91 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 89 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $status = 404; |
| 94 | 92 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 95 | - } |
|
| 96 | - catch( \Exception $e ) |
|
| 93 | + } catch( \Exception $e ) |
|
| 97 | 94 | { |
| 98 | 95 | $status = 500; |
| 99 | 96 | $view->errors = $this->getErrorDetails( $e ); |
@@ -150,13 +147,11 @@ discard block |
||
| 150 | 147 | |
| 151 | 148 | $view->item = $this->controller->get(); |
| 152 | 149 | $status = 201; |
| 153 | - } |
|
| 154 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 150 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 155 | 151 | { |
| 156 | 152 | $status = 404; |
| 157 | 153 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 158 | - } |
|
| 159 | - catch( \Exception $e ) |
|
| 154 | + } catch( \Exception $e ) |
|
| 160 | 155 | { |
| 161 | 156 | $status = 500; |
| 162 | 157 | $view->errors = $this->getErrorDetails( $e ); |
@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteCoupon( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteCoupon( $relId ); |
| 85 | 84 | } |
@@ -87,13 +86,11 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->item = $this->controller->get(); |
| 89 | 88 | $status = 200; |
| 90 | - } |
|
| 91 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 89 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $status = 404; |
| 94 | 92 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 95 | - } |
|
| 96 | - catch( \Exception $e ) |
|
| 93 | + } catch( \Exception $e ) |
|
| 97 | 94 | { |
| 98 | 95 | $status = 500; |
| 99 | 96 | $view->errors = $this->getErrorDetails( $e ); |
@@ -139,13 +136,11 @@ discard block |
||
| 139 | 136 | |
| 140 | 137 | $view->item = $this->controller->get(); |
| 141 | 138 | $status = 201; |
| 142 | - } |
|
| 143 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 139 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 144 | 140 | { |
| 145 | 141 | $status = 404; |
| 146 | 142 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 147 | - } |
|
| 148 | - catch( \Exception $e ) |
|
| 143 | + } catch( \Exception $e ) |
|
| 149 | 144 | { |
| 150 | 145 | $status = 500; |
| 151 | 146 | $view->errors = $this->getErrorDetails( $e ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer/lists/type' ); |
| 40 | 40 | |
| 41 | 41 | $userId = $custManager->findItem( 'UTC001' )->getId(); |
| 42 | - $typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId();; |
|
| 42 | + $typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId(); ; |
|
| 43 | 43 | |
| 44 | 44 | $this->context->setUserId( $userId ); |
| 45 | 45 | $item = $manager->createItem()->setParentId( $userId ); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer/lists/type' ); |
| 75 | 75 | |
| 76 | 76 | $userId = $custManager->findItem( 'UTC001' )->getId(); |
| 77 | - $typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId();; |
|
| 77 | + $typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId(); ; |
|
| 78 | 78 | |
| 79 | 79 | $this->context->setUserId( $userId ); |
| 80 | 80 | $item = $manager->createItem()->setParentId( $userId ); |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer/lists/type' ); |
| 271 | 271 | |
| 272 | 272 | $userId = $custManager->findItem( 'UTC001' )->getId(); |
| 273 | - $typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId();; |
|
| 273 | + $typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId(); ; |
|
| 274 | 274 | |
| 275 | 275 | $this->context->setUserId( $userId ); |
| 276 | 276 | $item = $manager->createItem()->setParentId( $userId ); |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | foreach( $items as $item ) { |
| 102 | 102 | $data[] = $entryFcn( $item ); |
| 103 | 103 | } |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | { |
| 107 | 106 | $data = $entryFcn( $items ); |
| 108 | 107 | } |