@@ -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,16 +86,14 @@ 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 = array( array( |
95 | 93 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
96 | 94 | 'detail' => $e->getTraceAsString(), |
97 | 95 | ) ); |
98 | - } |
|
99 | - catch( \Exception $e ) |
|
96 | + } catch( \Exception $e ) |
|
100 | 97 | { |
101 | 98 | $status = 500; |
102 | 99 | $view->errors = array( array( |
@@ -156,16 +153,14 @@ discard block |
||
156 | 153 | |
157 | 154 | $view->item = $this->controller->get(); |
158 | 155 | $status = 201; |
159 | - } |
|
160 | - catch( \Aimeos\MShop\Exception $e ) |
|
156 | + } catch( \Aimeos\MShop\Exception $e ) |
|
161 | 157 | { |
162 | 158 | $status = 404; |
163 | 159 | $view->errors = array( array( |
164 | 160 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
165 | 161 | 'detail' => $e->getTraceAsString(), |
166 | 162 | ) ); |
167 | - } |
|
168 | - catch( \Exception $e ) |
|
163 | + } catch( \Exception $e ) |
|
169 | 164 | { |
170 | 165 | $status = 500; |
171 | 166 | $view->errors = array( array( |
@@ -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,16 +86,14 @@ 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 = array( array( |
95 | 93 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
96 | 94 | 'detail' => $e->getTraceAsString(), |
97 | 95 | ) ); |
98 | - } |
|
99 | - catch( \Exception $e ) |
|
96 | + } catch( \Exception $e ) |
|
100 | 97 | { |
101 | 98 | $status = 500; |
102 | 99 | $view->errors = array( array( |
@@ -145,16 +142,14 @@ discard block |
||
145 | 142 | |
146 | 143 | $view->item = $this->controller->get(); |
147 | 144 | $status = 201; |
148 | - } |
|
149 | - catch( \Aimeos\MShop\Exception $e ) |
|
145 | + } catch( \Aimeos\MShop\Exception $e ) |
|
150 | 146 | { |
151 | 147 | $status = 404; |
152 | 148 | $view->errors = array( array( |
153 | 149 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
154 | 150 | 'detail' => $e->getTraceAsString(), |
155 | 151 | ) ); |
156 | - } |
|
157 | - catch( \Exception $e ) |
|
152 | + } catch( \Exception $e ) |
|
158 | 153 | { |
159 | 154 | $status = 500; |
160 | 155 | $view->errors = array( array( |
@@ -46,16 +46,14 @@ 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 = array( array( |
54 | 53 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
55 | 54 | 'detail' => $e->getTraceAsString(), |
56 | 55 | ) ); |
57 | - } |
|
58 | - catch( \Exception $e ) |
|
56 | + } catch( \Exception $e ) |
|
59 | 57 | { |
60 | 58 | $status = 500; |
61 | 59 | $view->errors = array( array( |
@@ -87,8 +85,7 @@ discard block |
||
87 | 85 | */ |
88 | 86 | $tplconf = 'client/jsonapi/product/standard/template-aggregate'; |
89 | 87 | $default = 'aggregate-standard.php'; |
90 | - } |
|
91 | - else |
|
88 | + } else |
|
92 | 89 | { |
93 | 90 | /** client/jsonapi/product/standard/template |
94 | 91 | * Relative path to the product JSON API template |
@@ -20,9 +20,12 @@ |
||
20 | 20 | |
21 | 21 | "errors": <?php echo json_encode( $this->errors, JSON_PRETTY_PRINT ); ?> |
22 | 22 | |
23 | - <?php else : ?> |
|
23 | + <?php else { |
|
24 | + : ?> |
|
24 | 25 | |
25 | - "data": <?php echo json_encode( $entries ); ?> |
|
26 | + "data": <?php echo json_encode( $entries ); |
|
27 | +} |
|
28 | +?> |
|
26 | 29 | |
27 | 30 | <?php endif; ?> |
28 | 31 | } |
@@ -152,8 +152,7 @@ |
||
152 | 152 | $data[] = $entryFcn( $attrItem ); |
153 | 153 | $included = array_merge( $included, $refFcn( $attrItem, 0 ) ); |
154 | 154 | } |
155 | - } |
|
156 | - else |
|
155 | + } else |
|
157 | 156 | { |
158 | 157 | $data = $entryFcn( $items ); |
159 | 158 | $included = $refFcn( $items, 0 ); |
@@ -105,8 +105,7 @@ |
||
105 | 105 | foreach( $items as $stockId => $stockItem ) { |
106 | 106 | $data[] = $entryFcn( $stockItem ); |
107 | 107 | } |
108 | - } |
|
109 | - else |
|
108 | + } else |
|
110 | 109 | { |
111 | 110 | $data = $entryFcn( $items ); |
112 | 111 | } |
@@ -83,8 +83,7 @@ |
||
83 | 83 | foreach( $items as $localeItem ) { |
84 | 84 | $data[] = $entryFcn( $localeItem ); |
85 | 85 | } |
86 | - } |
|
87 | - else |
|
86 | + } else |
|
88 | 87 | { |
89 | 88 | $data = $entryFcn( $items ); |
90 | 89 | } |
@@ -231,8 +231,7 @@ |
||
231 | 231 | $data[] = $entryFcn( $productItem ); |
232 | 232 | $included = array_merge( $included, $refFcn( $productItem, 0 ) ); |
233 | 233 | } |
234 | - } |
|
235 | - else |
|
234 | + } else |
|
236 | 235 | { |
237 | 236 | $data = $entryFcn( $items ); |
238 | 237 | $included = $refFcn( $items, 0 ); |