@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'name'] |
31 | 31 | )->where('sending_method_id', '=', $sendingMethodId); |
32 | 32 | |
33 | - $datatables = \Datatables::of($users)->addColumn('action', function ($users) use ($sendingMethodId) { |
|
33 | + $datatables = \Datatables::of($users)->addColumn('action', function($users) use ($sendingMethodId) { |
|
34 | 34 | $delete = \Form::deleteajax(url()->route('sending-method.country-prices.destroy', array('sendingMethodId' => $sendingMethodId, 'id' => $users->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
35 | 35 | $link = '<a href="'.url()->route('sending-method.country-prices.edit', array('sendingMethodId' => $sendingMethodId, 'id' => $users->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$delete; |
36 | 36 | |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | $countries = \Excel::load($file, function($reader) { |
66 | 66 | })->get(); |
67 | 67 | |
68 | - if($countries) { |
|
69 | - $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId); |
|
68 | + if ($countries) { |
|
69 | + $result = SendingMethodService::importCountries($countries, $request->get('tax_rate_id'), $sendingMethodId); |
|
70 | 70 | Notification::success('The countries are inserted.'); |
71 | 71 | return redirect()->route('sending-method.country-prices.index', $sendingMethodId); |
72 | 72 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | public function store(Request $request, $sendingMethodId) |
76 | 76 | { |
77 | - $result = SendingMethodService::createCountry($request->all(), $sendingMethodId); |
|
77 | + $result = SendingMethodService::createCountry($request->all(), $sendingMethodId); |
|
78 | 78 | return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was inserted.'); |
79 | 79 | } |
80 | 80 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | |
90 | 90 | public function update(Request $request, $sendingMethodId, $id) |
91 | 91 | { |
92 | - $result = SendingMethodService::updateCountryById($request->all(), $id); |
|
92 | + $result = SendingMethodService::updateCountryById($request->all(), $id); |
|
93 | 93 | return SendingMethodService::notificationRedirect(array('sending-method.country-prices.index', $sendingMethodId), $result, 'The country was updated.'); |
94 | 94 | } |
95 | 95 | |
96 | 96 | public function destroy($sendingMethodId, $id) |
97 | 97 | { |
98 | - $result = SendingMethodService::destroyCountry($id); |
|
98 | + $result = SendingMethodService::destroyCountry($id); |
|
99 | 99 | |
100 | 100 | if ($result) { |
101 | 101 | Notification::success('The country price was deleted.'); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | public function index(Request $request, $productId) |
20 | 20 | { |
21 | - $product = ProductService::find($productId); |
|
21 | + $product = ProductService::find($productId); |
|
22 | 22 | if ($request->wantsJson()) { |
23 | 23 | |
24 | 24 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | foreach ($newProductAttributes as $key => $productAttribute) { |
97 | 97 | $newArray = array(); |
98 | 98 | foreach ($productAttribute as $keyNew => $valueNew) { |
99 | - $newArray[] = $keyNew.': '.$valueNew['value']; |
|
100 | - $attributesList[$valueNew['id']] = $valueNew['value']; |
|
99 | + $newArray[] = $keyNew.': '.$valueNew['value']; |
|
100 | + $attributesList[$valueNew['id']] = $valueNew['value']; |
|
101 | 101 | } |
102 | 102 | $productAttributesList[$key] = implode(', ', $newArray); |
103 | 103 | } |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
25 | 25 | |
26 | 26 | $datatables = \Datatables::of($query) |
27 | - ->addColumn('thumb', function ($query) use ($productId) { |
|
27 | + ->addColumn('thumb', function($query) use ($productId) { |
|
28 | 28 | return '<img src="/files/product/100x100/'.$query->product_id.'/'.$query->file.'" />'; |
29 | 29 | }) |
30 | 30 | |
31 | - ->addColumn('action', function ($query) use ($productId) { |
|
31 | + ->addColumn('action', function($query) use ($productId) { |
|
32 | 32 | $deleteLink = \Form::deleteajax(url()->route('product.images.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
33 | 33 | $links = '<a href="'.url()->route('product.images.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
34 | 34 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function store(Request $request, $productId) |
52 | 52 | { |
53 | - $result = ProductService::createImage($request->all(), $productId); |
|
53 | + $result = ProductService::createImage($request->all(), $productId); |
|
54 | 54 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was inserted.'); |
55 | 55 | } |
56 | 56 | |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | |
65 | 65 | if ($productImage->relatedProductAttributes->count()) { |
66 | 66 | foreach ($productImage->relatedProductAttributes as $row) { |
67 | - $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
67 | + $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | 71 | if ($productImage->relatedAttributes->count()) { |
72 | 72 | foreach ($productImage->relatedAttributes as $row) { |
73 | - $selectedAttributes[] = $row->pivot->attribute_id; |
|
73 | + $selectedAttributes[] = $row->pivot->attribute_id; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | public function generateAttributeLists($product) |
81 | 81 | { |
82 | - $productAttributes = $product->attributes; |
|
82 | + $productAttributes = $product->attributes; |
|
83 | 83 | $newProductAttributes = array(); |
84 | 84 | $attributesList = array(); |
85 | 85 | $productAttributesList = array(); |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | |
110 | 110 | public function update(Request $request, $productId, $productImageId) |
111 | 111 | { |
112 | - $result = ProductService::updateImageById($request->all(), $productId, $productImageId); |
|
112 | + $result = ProductService::updateImageById($request->all(), $productId, $productImageId); |
|
113 | 113 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was update.'); |
114 | 114 | } |
115 | 115 | |
116 | 116 | public function destroy($productId, $productImageId) |
117 | 117 | { |
118 | - $result = ProductService::destroyImage($productImageId); |
|
118 | + $result = ProductService::destroyImage($productImageId); |
|
119 | 119 | |
120 | 120 | if ($result) { |
121 | 121 | Notification::success('The product image is deleted.'); |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | $query = ProductRelatedProductService::getModel()->where('product_id', '=', $productId); |
28 | 28 | |
29 | 29 | $datatables = \Datatables::of($query) |
30 | - ->addColumn('related', function ($query) use ($productId) { |
|
30 | + ->addColumn('related', function($query) use ($productId) { |
|
31 | 31 | return $query->RelatedProduct->title; |
32 | 32 | }) |
33 | - ->addColumn('product', function ($query) use ($productId) { |
|
33 | + ->addColumn('product', function($query) use ($productId) { |
|
34 | 34 | return $query->Product->title; |
35 | 35 | }) |
36 | - ->addColumn('action', function ($query) use ($productId) { |
|
36 | + ->addColumn('action', function($query) use ($productId) { |
|
37 | 37 | $deleteLink = \Form::deleteajax(url()->route('product.related-product.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
38 | 38 | |
39 | 39 | return $deleteLink; |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | |
56 | 56 | public function store(Request $request, $productId) |
57 | 57 | { |
58 | - $result = ProductRelatedProductService::create($request->all(), $productId); |
|
58 | + $result = ProductRelatedProductService::create($request->all(), $productId); |
|
59 | 59 | return redirect()->route('product.related-product.index', $productId); |
60 | 60 | } |
61 | 61 | |
62 | 62 | public function destroy($productId, $productRelatedProductId) |
63 | 63 | { |
64 | - $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
64 | + $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
65 | 65 | |
66 | 66 | if ($result) { |
67 | 67 | Notification::success('The related product is deleted.'); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | ['product.*', |
34 | 34 | 'brand.title as brandtitle', |
35 | 35 | 'product_category.title as categorytitle'] |
36 | - )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages','taxRate')) |
|
36 | + )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate')) |
|
37 | 37 | |
38 | 38 | ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id') |
39 | 39 | |
@@ -42,23 +42,23 @@ discard block |
||
42 | 42 | ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
43 | 43 | |
44 | 44 | $datatables = \Datatables::of($product) |
45 | - ->filterColumn('reference_code', function ($query, $keyword) { |
|
45 | + ->filterColumn('reference_code', function($query, $keyword) { |
|
46 | 46 | $query->whereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
47 | 47 | }) |
48 | - ->filterColumn('active', function ($query, $keyword) { |
|
48 | + ->filterColumn('active', function($query, $keyword) { |
|
49 | 49 | $query->whereRaw("product.active like ?", ["%{$keyword}%"]); |
50 | 50 | ; |
51 | 51 | }) |
52 | 52 | |
53 | - ->addColumn('rank', function ($product) { |
|
53 | + ->addColumn('rank', function($product) { |
|
54 | 54 | return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="/admin/product/change-rank/'.$product->id.'">'; |
55 | 55 | |
56 | 56 | }) |
57 | 57 | |
58 | - ->filterColumn('title', function ($query, $keyword) { |
|
58 | + ->filterColumn('title', function($query, $keyword) { |
|
59 | 59 | |
60 | 60 | $query->where( |
61 | - function ($query) use ($keyword) { |
|
61 | + function($query) use ($keyword) { |
|
62 | 62 | $query->whereRaw("product.title like ?", ["%{$keyword}%"]); |
63 | 63 | $query->orWhereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
64 | 64 | $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]); |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | ); |
68 | 68 | }) |
69 | 69 | |
70 | - ->filterColumn('categorytitle', function ($query, $keyword) { |
|
70 | + ->filterColumn('categorytitle', function($query, $keyword) { |
|
71 | 71 | $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]); |
72 | 72 | }) |
73 | 73 | |
74 | - ->addColumn('active', function ($product) { |
|
74 | + ->addColumn('active', function($product) { |
|
75 | 75 | if ($product->active) { |
76 | 76 | return '<a href="#" class="change-active" data-url="'.url()->route('product.change-active', array('productId' => $product->id)).'"><span class="glyphicon glyphicon-ok icon-green"></span></a>'; |
77 | 77 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | return '<a href="#" class="change-active" data-url="'.url()->route('product.change-active', array('productId' => $product->id)).'"><span class="glyphicon glyphicon-remove icon-red"></span></a>'; |
80 | 80 | }) |
81 | 81 | |
82 | - ->addColumn('title', function ($product) { |
|
82 | + ->addColumn('title', function($product) { |
|
83 | 83 | if ($product->brand) { |
84 | 84 | return $product->brand->title.' | '.$product->title; |
85 | 85 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | }) |
89 | 89 | |
90 | 90 | |
91 | - ->addColumn('amount', function ($product) { |
|
91 | + ->addColumn('amount', function($product) { |
|
92 | 92 | if ($product->attributes->count()) { |
93 | 93 | return '<a href="/admin/product/'.$product->id.'/product-combination">combinations</a>'; |
94 | 94 | } |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | return '<input type="text" class="change-amount" value="'.$product->amount.'" style="width:50px;" data-url="'.url()->route('product.change-amount', array('productId' => $product->id)).'">'; |
97 | 97 | }) |
98 | 98 | |
99 | - ->addColumn('image', function ($product) { |
|
99 | + ->addColumn('image', function($product) { |
|
100 | 100 | if ($product->productImages->count()) { |
101 | 101 | return '<img src="/files/product/100x100/'.$product->id.'/'.$product->productImages->first()->file.'" />'; |
102 | 102 | } |
103 | 103 | }) |
104 | - ->addColumn('price', function ($product) { |
|
104 | + ->addColumn('price', function($product) { |
|
105 | 105 | |
106 | 106 | $result = ""; |
107 | 107 | if ($product->price) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'amount' => $product->amount |
152 | 152 | ); |
153 | 153 | |
154 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
154 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
155 | 155 | |
156 | 156 | |
157 | 157 | if ($product->discount_value) { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | }) |
164 | 164 | |
165 | 165 | |
166 | - ->addColumn('categorytitle', function ($product) { |
|
166 | + ->addColumn('categorytitle', function($product) { |
|
167 | 167 | if ($product->subcategories()->count()) { |
168 | 168 | $subcategories = $product->subcategories()->pluck('title')->toArray(); |
169 | 169 | return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>'; |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | return $product->categorytitle; |
173 | 173 | }) |
174 | 174 | |
175 | - ->addColumn('action', function ($product) { |
|
175 | + ->addColumn('action', function($product) { |
|
176 | 176 | $deleteLink = \Form::deleteajax(url()->route('product.destroy', $product->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $product->title); |
177 | 177 | $copy = '<a href="'.url()->route('product.copy', $product->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Copy</a>'; |
178 | 178 | |
@@ -195,26 +195,26 @@ discard block |
||
195 | 195 | ['product.*', |
196 | 196 | 'brand.title as brandtitle', |
197 | 197 | 'product_category.title as categorytitle'] |
198 | - )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages','taxRate')) |
|
198 | + )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate')) |
|
199 | 199 | ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id') |
200 | 200 | ->leftJoin('brand as brand', 'brand.id', '=', 'product.brand_id') |
201 | 201 | ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
202 | 202 | |
203 | 203 | $datatables = \Datatables::of($product) |
204 | - ->addColumn('rank', function ($product) { |
|
204 | + ->addColumn('rank', function($product) { |
|
205 | 205 | return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="'.url()->route('product.change-rank', array('productId' => $product->id)).'">'; |
206 | 206 | }) |
207 | - ->filterColumn('categorytitle', function ($query, $keyword) { |
|
207 | + ->filterColumn('categorytitle', function($query, $keyword) { |
|
208 | 208 | $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]); |
209 | 209 | }) |
210 | - ->addColumn('title', function ($product) { |
|
210 | + ->addColumn('title', function($product) { |
|
211 | 211 | if ($product->brand) { |
212 | 212 | return $product->brand->title.' | '.$product->title; |
213 | 213 | } |
214 | 214 | |
215 | 215 | return $product->title; |
216 | 216 | }) |
217 | - ->addColumn('categorytitle', function ($product) { |
|
217 | + ->addColumn('categorytitle', function($product) { |
|
218 | 218 | if ($product->subcategories()->count()) { |
219 | 219 | $subcategories = $product->subcategories()->pluck('title')->toArray(); |
220 | 220 | return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>'; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | public function store(Request $request) |
245 | 245 | { |
246 | - $result = ProductService::create($request->all()); |
|
246 | + $result = ProductService::create($request->all()); |
|
247 | 247 | return ProductService::notificationRedirect('product.index', $result, 'The product was inserted.'); |
248 | 248 | } |
249 | 249 | |
@@ -288,10 +288,10 @@ discard block |
||
288 | 288 | public function postExport() |
289 | 289 | { |
290 | 290 | |
291 | - $result = ProductService::selectAllExport(); |
|
292 | - Excel::create('export', function ($excel) use ($result) { |
|
291 | + $result = ProductService::selectAllExport(); |
|
292 | + Excel::create('export', function($excel) use ($result) { |
|
293 | 293 | |
294 | - $excel->sheet('Products', function ($sheet) use ($result) { |
|
294 | + $excel->sheet('Products', function($sheet) use ($result) { |
|
295 | 295 | $newArray = array(); |
296 | 296 | foreach ($result as $row) { |
297 | 297 | $category = ""; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $i = 0; |
321 | 321 | foreach ($row->productImages as $image) { |
322 | 322 | $i++; |
323 | - $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file; |
|
323 | + $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file; |
|
324 | 324 | } |
325 | 325 | } |
326 | 326 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | public function update(Request $request, $productId) |
391 | 391 | { |
392 | 392 | $input = $request->all(); |
393 | - $result = ProductService::updateById($input, $productId); |
|
393 | + $result = ProductService::updateById($input, $productId); |
|
394 | 394 | |
395 | 395 | $redirect = redirect()->route('product.index'); |
396 | 396 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | public function destroy($id) |
422 | 422 | { |
423 | - $result = ProductService::destroy($id); |
|
423 | + $result = ProductService::destroy($id); |
|
424 | 424 | |
425 | 425 | if ($result) { |
426 | 426 | Notification::success('The product was deleted.'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
29 | 29 | |
30 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
30 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
31 | 31 | $deleteLink = Form::deleteajax(url()->route('sending-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
32 | 32 | $links = '<a href="'.url()->route('sending-method.country-prices.index', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Country prices ('.$query->countryPrices()->count().')</a> <a href="/admin/sending-method/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
33 | 33 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function store(Request $request) |
53 | 53 | { |
54 | - $result = SendingMethodService::create($request->all()); |
|
54 | + $result = SendingMethodService::create($request->all()); |
|
55 | 55 | return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was inserted.'); |
56 | 56 | } |
57 | 57 | |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | |
69 | 69 | public function update(Request $request, $sendingMethodId) |
70 | 70 | { |
71 | - $result = SendingMethodService::updateById($request->all(), $sendingMethodId); |
|
71 | + $result = SendingMethodService::updateById($request->all(), $sendingMethodId); |
|
72 | 72 | return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was updated.'); |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function destroy($sendingMethodId) |
76 | 76 | { |
77 | - $result = SendingMethodService::destroy($sendingMethodId); |
|
77 | + $result = SendingMethodService::destroy($sendingMethodId); |
|
78 | 78 | |
79 | 79 | if ($result) { |
80 | 80 | Notification::success('The sending method was deleted.'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | $product = ProductService::find($productId); |
28 | 28 | |
29 | - if($product) { |
|
29 | + if ($product) { |
|
30 | 30 | if ($request->wantsJson()) { |
31 | 31 | |
32 | 32 | $query = ProductCombinationService::getModel()->select( |
@@ -34,18 +34,18 @@ discard block |
||
34 | 34 | 'default_on'] |
35 | 35 | )->where('product_id', '=', $productId); |
36 | 36 | |
37 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
37 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
38 | 38 | $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
39 | 39 | $links = '<a href="'.url()->route('product-combination.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
40 | 40 | |
41 | 41 | return $links; |
42 | 42 | }) |
43 | 43 | |
44 | - ->addColumn('amount', function ($query) { |
|
44 | + ->addColumn('amount', function($query) { |
|
45 | 45 | return '<input type="text" class="change-amount-product-attribute" value="'.$query->amount.'" data-url="/admin/product/'.$query->product_id.'/product-combination/change-amount-attribute/'.$query->id.'">'; |
46 | 46 | }) |
47 | 47 | |
48 | - ->addColumn('price', function ($query) { |
|
48 | + ->addColumn('price', function($query) { |
|
49 | 49 | $result = 0; |
50 | 50 | if ($query->price) { |
51 | 51 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'amount' => $query->amount |
95 | 95 | ); |
96 | 96 | |
97 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
97 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
98 | 98 | |
99 | 99 | |
100 | 100 | if ($query->discount_value) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | return $result; |
106 | 106 | }) |
107 | 107 | |
108 | - ->addColumn('combinations', function ($query) use ($productId) { |
|
108 | + ->addColumn('combinations', function($query) use ($productId) { |
|
109 | 109 | $items = array(); |
110 | 110 | foreach ($query->combinations as $row) { |
111 | 111 | $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value; |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | |
151 | 151 | public function store(Request $request, $productId) |
152 | 152 | { |
153 | - $result = ProductCombinationService::create($request->all(), $productId); |
|
154 | - if($result) { |
|
153 | + $result = ProductCombinationService::create($request->all(), $productId); |
|
154 | + if ($result) { |
|
155 | 155 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.'); |
156 | 156 | |
157 | 157 | } |
@@ -188,14 +188,14 @@ discard block |
||
188 | 188 | public function update(Request $request, $productId, $id) |
189 | 189 | { |
190 | 190 | |
191 | - $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
191 | + $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
192 | 192 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.'); |
193 | 193 | |
194 | 194 | } |
195 | 195 | |
196 | 196 | public function destroy($productId, $id) |
197 | 197 | { |
198 | - $result = ProductCombinationService::destroy($id); |
|
198 | + $result = ProductCombinationService::destroy($id); |
|
199 | 199 | |
200 | 200 | if ($result) { |
201 | 201 | Notification::success('The product combination is deleted.'); |
@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | ->select(['id', 'title', 'logo_file_name']); |
26 | 26 | $datatables = Datatables::of($query) |
27 | 27 | |
28 | - ->addColumn('action', function ($query) { |
|
28 | + ->addColumn('action', function($query) { |
|
29 | 29 | $deleteLink = Form::deleteajax(url()->route('shop.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
30 | 30 | $links = '<a href="'.url()->route('shop.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
31 | 31 | return $links; |
32 | 32 | }) |
33 | 33 | |
34 | - ->addColumn('image', function ($query) { |
|
34 | + ->addColumn('image', function($query) { |
|
35 | 35 | if ($query->logo_file_name) { |
36 | 36 | return '<img src="http://shop.brulo.nl/files/'.$query->id.'/logo/'.$query->logo_file_name.'" />'; |
37 | 37 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function store(Request $request) |
52 | 52 | { |
53 | - $result = ShopService::create($request->all()); |
|
53 | + $result = ShopService::create($request->all()); |
|
54 | 54 | return ShopService::notificationRedirect('shop.index', $result, 'The shop was inserted.'); |
55 | 55 | } |
56 | 56 | |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | |
62 | 62 | public function update(Request $request, $shopId) |
63 | 63 | { |
64 | - $result = ShopService::updateById($request->all(), $shopId); |
|
64 | + $result = ShopService::updateById($request->all(), $shopId); |
|
65 | 65 | return ShopService::notificationRedirect('shop.index', $result, 'The shop was updated.'); |
66 | 66 | } |
67 | 67 | |
68 | 68 | public function destroy($shopId) |
69 | 69 | { |
70 | - $result = ShopService::destroy($shopId); |
|
70 | + $result = ShopService::destroy($shopId); |
|
71 | 71 | |
72 | 72 | if ($result) { |
73 | 73 | Notification::success('The shop was deleted.'); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | if ($request->wantsJson()) { |
16 | 16 | $query = TaxRateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
17 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
17 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
18 | 18 | $deleteLink = Form::deleteajax(url()->route('tax-rate.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
19 | 19 | $links = '<a href="'.url()->route('tax-rate.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
20 | 20 | return $links; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function store(Request $request) |
35 | 35 | { |
36 | - $result = TaxRateService::create($request->all()); |
|
36 | + $result = TaxRateService::create($request->all()); |
|
37 | 37 | return TaxRateService::notificationRedirect('tax-rate.index', $result, 'The tax rate was inserted.'); |
38 | 38 | } |
39 | 39 | |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | |
45 | 45 | public function update(Request $request, $taxRateId) |
46 | 46 | { |
47 | - $result = TaxRateService::updateById($request->all(), $taxRateId); |
|
47 | + $result = TaxRateService::updateById($request->all(), $taxRateId); |
|
48 | 48 | return TaxRateService::notificationRedirect('tax-rate.index', $result, 'The tax rate was updated.'); |
49 | 49 | } |
50 | 50 | |
51 | 51 | public function destroy($taxRateId) |
52 | 52 | { |
53 | - $result = TaxRateService::destroy($taxRateId); |
|
53 | + $result = TaxRateService::destroy($taxRateId); |
|
54 | 54 | if ($result) { |
55 | 55 | Notification::error('The tax rate was deleted.'); |
56 | 56 | return redirect()->route('tax-rate.index'); |