@@ -77,25 +77,21 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this->controller->deleteAddressItem( $entry->id ); |
| 79 | 79 | } |
| 80 | - } |
|
| 81 | - else |
|
| 80 | + } else |
|
| 82 | 81 | { |
| 83 | 82 | $this->controller->deleteAddressItem( $relId ); |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | 85 | $status = 200; |
| 87 | - } |
|
| 88 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 86 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 89 | 87 | { |
| 90 | 88 | $status = 403; |
| 91 | 89 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 92 | - } |
|
| 93 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 90 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 94 | 91 | { |
| 95 | 92 | $status = 404; |
| 96 | 93 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 97 | - } |
|
| 98 | - catch( \Exception $e ) |
|
| 94 | + } catch( \Exception $e ) |
|
| 99 | 95 | { |
| 100 | 96 | $status = 500; |
| 101 | 97 | $view->errors = $this->getErrorDetails( $e ); |
@@ -129,18 +125,15 @@ discard block |
||
| 129 | 125 | |
| 130 | 126 | $view->total = count( $view->items ); |
| 131 | 127 | $status = 200; |
| 132 | - } |
|
| 133 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 128 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 134 | 129 | { |
| 135 | 130 | $status = 403; |
| 136 | 131 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 137 | - } |
|
| 138 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 132 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 139 | 133 | { |
| 140 | 134 | $status = 404; |
| 141 | 135 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 142 | - } |
|
| 143 | - catch( \Exception $e ) |
|
| 136 | + } catch( \Exception $e ) |
|
| 144 | 137 | { |
| 145 | 138 | $status = 500; |
| 146 | 139 | $view->errors = $this->getErrorDetails( $e ); |
@@ -174,18 +167,15 @@ discard block |
||
| 174 | 167 | $view->items = $cntl->editAddressItem( $view->param( 'relatedid' ), (array) $payload->data->attributes ); |
| 175 | 168 | $view->total = 1; |
| 176 | 169 | $status = 200; |
| 177 | - } |
|
| 178 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 170 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 179 | 171 | { |
| 180 | 172 | $status = 403; |
| 181 | 173 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 182 | - } |
|
| 183 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 174 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 184 | 175 | { |
| 185 | 176 | $status = 404; |
| 186 | 177 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 187 | - } |
|
| 188 | - catch( \Exception $e ) |
|
| 178 | + } catch( \Exception $e ) |
|
| 189 | 179 | { |
| 190 | 180 | $status = 500; |
| 191 | 181 | $view->errors = $this->getErrorDetails( $e ); |
@@ -232,18 +222,15 @@ discard block |
||
| 232 | 222 | $view->total = count( $list ); |
| 233 | 223 | $view->items = $list; |
| 234 | 224 | $status = 201; |
| 235 | - } |
|
| 236 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 225 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 237 | 226 | { |
| 238 | 227 | $status = 403; |
| 239 | 228 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 240 | - } |
|
| 241 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 229 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 242 | 230 | { |
| 243 | 231 | $status = 404; |
| 244 | 232 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 245 | - } |
|
| 246 | - catch( \Exception $e ) |
|
| 233 | + } catch( \Exception $e ) |
|
| 247 | 234 | { |
| 248 | 235 | $status = 500; |
| 249 | 236 | $view->errors = $this->getErrorDetails( $e ); |
@@ -39,13 +39,11 @@ |
||
| 39 | 39 | { |
| 40 | 40 | $response = $this->getItem( $view, $request, $response ); |
| 41 | 41 | $status = 200; |
| 42 | - } |
|
| 43 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 42 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 44 | 43 | { |
| 45 | 44 | $status = 404; |
| 46 | 45 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 47 | - } |
|
| 48 | - catch( \Exception $e ) |
|
| 46 | + } catch( \Exception $e ) |
|
| 49 | 47 | { |
| 50 | 48 | $status = 500; |
| 51 | 49 | $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 ); |
@@ -46,13 +46,11 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $status = 200; |
| 49 | - } |
|
| 50 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 51 | 50 | { |
| 52 | 51 | $status = 404; |
| 53 | 52 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 54 | - } |
|
| 55 | - catch( \Exception $e ) |
|
| 53 | + } catch( \Exception $e ) |
|
| 56 | 54 | { |
| 57 | 55 | $status = 500; |
| 58 | 56 | $view->errors = $this->getErrorDetails( $e ); |
@@ -81,8 +79,7 @@ discard block |
||
| 81 | 79 | */ |
| 82 | 80 | $tplconf = 'client/jsonapi/product/standard/template-aggregate'; |
| 83 | 81 | $default = 'aggregate-standard.php'; |
| 84 | - } |
|
| 85 | - else |
|
| 82 | + } else |
|
| 86 | 83 | { |
| 87 | 84 | /** client/jsonapi/product/standard/template |
| 88 | 85 | * Relative path to the product JSON API template |
@@ -103,8 +103,7 @@ |
||
| 103 | 103 | $view->resources = (array) $resources; |
| 104 | 104 | $view->prefix = $prefix; |
| 105 | 105 | $status = 200; |
| 106 | - } |
|
| 107 | - catch( \Exception $e ) |
|
| 106 | + } catch( \Exception $e ) |
|
| 108 | 107 | { |
| 109 | 108 | $status = 500; |
| 110 | 109 | $view->errors = $this->getErrorDetails( $e ); |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $view->items = $cntl->getItem( $id ); |
| 45 | 45 | $view->total = 1; |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } else |
|
| 48 | 47 | { |
| 49 | 48 | $total = 0; |
| 50 | 49 | $filter = $cntl->createFilter(); |
@@ -55,18 +54,15 @@ discard block |
||
| 55 | 54 | } |
| 56 | 55 | |
| 57 | 56 | $status = 200; |
| 58 | - } |
|
| 59 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 57 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 60 | 58 | { |
| 61 | 59 | $status = 403; |
| 62 | 60 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 63 | - } |
|
| 64 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 61 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 65 | 62 | { |
| 66 | 63 | $status = 404; |
| 67 | 64 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 68 | - } |
|
| 69 | - catch( \Exception $e ) |
|
| 65 | + } catch( \Exception $e ) |
|
| 70 | 66 | { |
| 71 | 67 | $status = 500; |
| 72 | 68 | $view->errors = $this->getErrorDetails( $e ); |
@@ -107,23 +103,19 @@ discard block |
||
| 107 | 103 | $view->total = 1; |
| 108 | 104 | |
| 109 | 105 | $status = 201; |
| 110 | - } |
|
| 111 | - catch( \Aimeos\Client\JsonApi\Exception $e ) |
|
| 106 | + } catch( \Aimeos\Client\JsonApi\Exception $e ) |
|
| 112 | 107 | { |
| 113 | 108 | $status = $e->getCode(); |
| 114 | 109 | $view->errors = $this->getErrorDetails( $e, 'client/jsonapi' ); |
| 115 | - } |
|
| 116 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 110 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 117 | 111 | { |
| 118 | 112 | $status = 403; |
| 119 | 113 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 120 | - } |
|
| 121 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 114 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 122 | 115 | { |
| 123 | 116 | $status = 404; |
| 124 | 117 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 125 | - } |
|
| 126 | - catch( \Exception $e ) |
|
| 118 | + } catch( \Exception $e ) |
|
| 127 | 119 | { |
| 128 | 120 | $status = 500; |
| 129 | 121 | $view->errors = $this->getErrorDetails( $e ); |
@@ -58,8 +58,7 @@ discard block |
||
| 58 | 58 | $view->items = $provider->getServiceItem(); |
| 59 | 59 | $view->total = 1; |
| 60 | 60 | } |
| 61 | - } |
|
| 62 | - else |
|
| 61 | + } else |
|
| 63 | 62 | { |
| 64 | 63 | $attributes = $prices = $items = []; |
| 65 | 64 | $type = $view->param( 'filter/cs_type' ); |
@@ -81,13 +80,11 @@ discard block |
||
| 81 | 80 | } |
| 82 | 81 | |
| 83 | 82 | $status = 200; |
| 84 | - } |
|
| 85 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 83 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 86 | 84 | { |
| 87 | 85 | $status = 404; |
| 88 | 86 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 89 | - } |
|
| 90 | - catch( \Exception $e ) |
|
| 87 | + } catch( \Exception $e ) |
|
| 91 | 88 | { |
| 92 | 89 | $status = 500; |
| 93 | 90 | $view->errors = $this->getErrorDetails( $e ); |
@@ -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 ); |