@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $query = AttributeService::getModel()->where('attribute_group_id', '=', $attributeGroupId); |
33 | 33 | |
34 | 34 | $datatables = Datatables::of($query) |
35 | - ->addColumn('action', function ($query) use ($attributeGroupId) { |
|
35 | + ->addColumn('action', function($query) use ($attributeGroupId) { |
|
36 | 36 | $deleteLink = Form::deleteajax(url()->route('attribute.destroy', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
37 | 37 | $links = ' <a href="'.url()->route('attribute.edit', array('attributeGroupId' => $attributeGroupId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>'.$deleteLink; |
38 | 38 | return $links; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function store(Request $request, $attributeGroupId) |
66 | 66 | { |
67 | - $result = AttributeService::create($request->all(), $attributeGroupId); |
|
67 | + $result = AttributeService::create($request->all(), $attributeGroupId); |
|
68 | 68 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was inserted.'); |
69 | 69 | } |
70 | 70 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function update(Request $request, $attributeGroupId, $attributeId) |
90 | 90 | { |
91 | - $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
91 | + $result = AttributeService::updateById($request->all(), $attributeGroupId, $attributeId); |
|
92 | 92 | return AttributeService::notificationRedirect(array('attribute.index', $attributeGroupId), $result, 'The attribute was updated.'); |
93 | 93 | } |
94 | 94 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function destroy($attributeGroupId, $attributeId) |
102 | 102 | { |
103 | - $result = AttributeService::destroy($attributeId); |
|
103 | + $result = AttributeService::destroy($attributeId); |
|
104 | 104 | |
105 | 105 | if ($result) { |
106 | 106 | Notification::success('Atrribute was deleted.'); |
@@ -26,23 +26,23 @@ 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()->where('product_id', '=', $productId); |
33 | 33 | |
34 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
34 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
35 | 35 | $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
36 | 36 | $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; |
37 | 37 | |
38 | 38 | return $links; |
39 | 39 | }) |
40 | 40 | |
41 | - ->addColumn('amount', function ($query) { |
|
41 | + ->addColumn('amount', function($query) { |
|
42 | 42 | 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.'">'; |
43 | 43 | }) |
44 | 44 | |
45 | - ->addColumn('price', function ($query) { |
|
45 | + ->addColumn('price', function($query) { |
|
46 | 46 | $result = 0; |
47 | 47 | if ($query->price) { |
48 | 48 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'amount' => $query->amount |
92 | 92 | ); |
93 | 93 | |
94 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
94 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
95 | 95 | |
96 | 96 | |
97 | 97 | if ($query->discount_value) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return $result; |
103 | 103 | }) |
104 | 104 | |
105 | - ->addColumn('combinations', function ($query) use ($productId) { |
|
105 | + ->addColumn('combinations', function($query) use ($productId) { |
|
106 | 106 | $items = array(); |
107 | 107 | foreach ($query->combinations as $row) { |
108 | 108 | $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value; |
@@ -147,8 +147,8 @@ discard block |
||
147 | 147 | |
148 | 148 | public function store(Request $request, $productId) |
149 | 149 | { |
150 | - $result = ProductCombinationService::create($request->all(), $productId); |
|
151 | - if($result) { |
|
150 | + $result = ProductCombinationService::create($request->all(), $productId); |
|
151 | + if ($result) { |
|
152 | 152 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.'); |
153 | 153 | } |
154 | 154 | |
@@ -184,14 +184,14 @@ discard block |
||
184 | 184 | public function update(Request $request, $productId, $id) |
185 | 185 | { |
186 | 186 | |
187 | - $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
187 | + $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
188 | 188 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.'); |
189 | 189 | |
190 | 190 | } |
191 | 191 | |
192 | 192 | public function destroy($productId, $id) |
193 | 193 | { |
194 | - $result = ProductCombinationService::destroy($id); |
|
194 | + $result = ProductCombinationService::destroy($id); |
|
195 | 195 | |
196 | 196 | if ($result) { |
197 | 197 | Notification::success('The product combination is deleted.'); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | $query = ExtraFieldService::getValueModel()->where('extra_field_id', '=', $extraFieldId); |
25 | 25 | |
26 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) use ($extraFieldId) { |
|
26 | + $datatables = Datatables::of($query)->addColumn('action', function($query) use ($extraFieldId) { |
|
27 | 27 | $deleteLink = Form::deleteajax(url()->route('extra-field.values.destroy', array('ExtraFieldId' => $extraFieldId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
28 | 28 | $links = ' <a href="'.url()->route('extra-field.values.edit', array('ExtraFieldId' => $extraFieldId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> |
29 | 29 | '.$deleteLink; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | public function store(Request $request, $extraFieldId) |
46 | 46 | { |
47 | - $result = ExtraFieldService::createValue($request->all(), $extraFieldId); |
|
47 | + $result = ExtraFieldService::createValue($request->all(), $extraFieldId); |
|
48 | 48 | return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was inserted.'); |
49 | 49 | } |
50 | 50 | |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | |
56 | 56 | public function update(Request $request, $extraFieldId, $id) |
57 | 57 | { |
58 | - $result = ExtraFieldService::updateValueById($request->all(), $extraFieldId, $id); |
|
58 | + $result = ExtraFieldService::updateValueById($request->all(), $extraFieldId, $id); |
|
59 | 59 | return ExtraFieldService::notificationRedirect(array('extra-field.values.index', $extraFieldId), $result, 'The extra field was updated.'); |
60 | 60 | } |
61 | 61 | |
62 | 62 | public function destroy($extraFieldId, $id) |
63 | 63 | { |
64 | - $result = ExtraFieldService::destroyValue($id); |
|
64 | + $result = ExtraFieldService::destroyValue($id); |
|
65 | 65 | |
66 | 66 | if ($result) { |
67 | 67 | Notification::success('Extra field was deleted.'); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | if ($request->wantsJson()) { |
23 | 23 | $brand = BrandService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
24 | 24 | |
25 | - $datatables = Datatables::of($brand)->addColumn('action', function ($query) { |
|
25 | + $datatables = Datatables::of($brand)->addColumn('action', function($query) { |
|
26 | 26 | $deleteLink = Form::deleteajax(url()->route('brand.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $query->title); |
27 | 27 | $links = '<a href="'.url()->route('brand.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
28 | 28 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | public function store(Request $request) |
44 | 44 | { |
45 | - $result = BrandService::create($request->all()); |
|
45 | + $result = BrandService::create($request->all()); |
|
46 | 46 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was inserted.'); |
47 | 47 | } |
48 | 48 | |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | |
54 | 54 | public function update(Request $request, $brandId) |
55 | 55 | { |
56 | - $result = BrandService::updateById($request->all(), $brandId); |
|
56 | + $result = BrandService::updateById($request->all(), $brandId); |
|
57 | 57 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was updated.'); |
58 | 58 | } |
59 | 59 | |
60 | 60 | public function destroy($brandId) |
61 | 61 | { |
62 | - $result = BrandService::destroy($brandId); |
|
62 | + $result = BrandService::destroy($brandId); |
|
63 | 63 | if ($result) { |
64 | 64 | Notification::error('The brand was deleted.'); |
65 | 65 | return redirect()->route('brand.index'); |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | |
39 | 39 | public function index($productId) |
40 | 40 | { |
41 | - $datatable = new ProductAmountOptionDatatable(); |
|
41 | + $datatable = new ProductAmountOptionDatatable(); |
|
42 | 42 | $product = $this->product->find($productId); |
43 | 43 | if (Request::wantsJson()) { |
44 | 44 | |
45 | 45 | $query = $this->productAmountOption->getModel()->where('product_id', '=', $productId); |
46 | 46 | |
47 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
48 | - $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
47 | + $datatables = Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
48 | + $deleteLink = Form::deleteajax('/admin/product/'.$productId.'/product-amount-option/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
49 | 49 | $links = '<a href="/admin/product/'.$productId.'/product-amount-option/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
50 | 50 | |
51 | 51 | return $links; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function store($productId) |
78 | 78 | { |
79 | 79 | |
80 | - $result = $this->productAmountOption->create(Request::all(), $productId); |
|
80 | + $result = $this->productAmountOption->create(Request::all(), $productId); |
|
81 | 81 | |
82 | 82 | if (isset($result->id)) { |
83 | 83 | Notification::success('The product amount option is updated.'); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function update($productId, $id) |
109 | 109 | { |
110 | 110 | |
111 | - $result = $this->productAmountOption->updateById(Request::all(), $productId, $id); |
|
111 | + $result = $this->productAmountOption->updateById(Request::all(), $productId, $id); |
|
112 | 112 | |
113 | 113 | if (!$result->id) { |
114 | 114 | return redirect()->back()->withInput()->withErrors($result->errors()->all()); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | public function destroy($productId, $id) |
122 | 122 | { |
123 | - $result = $this->productAmountOption->destroy($id); |
|
123 | + $result = $this->productAmountOption->destroy($id); |
|
124 | 124 | |
125 | 125 | if ($result) { |
126 | 126 | Notification::success('The product amount option is deleted.'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | if ($request->wantsJson()) { |
15 | 15 | $query = TaxRateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
16 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
16 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
17 | 17 | $deleteLink = Form::deleteajax(url()->route('tax-rate.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
18 | 18 | $links = '<a href="'.url()->route('tax-rate.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
19 | 19 | return $links; |
@@ -22,10 +22,10 @@ discard block |
||
22 | 22 | if ($request->wantsJson()) { |
23 | 23 | |
24 | 24 | $query = ProductTagGroupService::getModel() |
25 | - ->select(['id','tag']) |
|
25 | + ->select(['id', 'tag']) |
|
26 | 26 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
27 | 27 | |
28 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) { |
|
28 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) { |
|
29 | 29 | $deleteLink = \Form::deleteajax(url()->route('product-tag-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
30 | 30 | $links = '<a href="'.url()->route('product-tag-group.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
31 | 31 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | public function store(Request $request) |
49 | 49 | { |
50 | - $result = ProductTagGroupService::create($request->all()); |
|
50 | + $result = ProductTagGroupService::create($request->all()); |
|
51 | 51 | return ProductTagGroupService::notificationRedirect('product-tag-group.index', $result, 'The product group tag was inserted.'); |
52 | 52 | } |
53 | 53 | |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | |
64 | 64 | public function update(Request $request, $productTagGroupId) |
65 | 65 | { |
66 | - $result = ProductTagGroupService::updateById($request->all(), $productTagGroupId); |
|
66 | + $result = ProductTagGroupService::updateById($request->all(), $productTagGroupId); |
|
67 | 67 | return ProductTagGroupService::notificationRedirect('product-tag-group.index', $result, 'The product group tag was updated.'); |
68 | 68 | } |
69 | 69 | |
70 | 70 | public function destroy($productTagGroupId) |
71 | 71 | { |
72 | - $result = ProductTagGroupService::destroy($productTagGroupId); |
|
72 | + $result = ProductTagGroupService::destroy($productTagGroupId); |
|
73 | 73 | |
74 | 74 | if ($result) { |
75 | 75 | Notification::success('The product group tag was deleted.'); |
@@ -25,13 +25,13 @@ |
||
25 | 25 | |
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 | } |