@@ -62,7 +62,7 @@ |
||
62 | 62 | 'paymentMethodsList' => $paymentMethodsList)); |
63 | 63 | } |
64 | 64 | |
65 | - return view('frontend.checkout.login')->with(array( 'sendingMethodsList' => $sendingMethodsList, 'paymentMethodsList' => $paymentMethodsList)); |
|
65 | + return view('frontend.checkout.login')->with(array( 'sendingMethodsList' => $sendingMethodsList, 'paymentMethodsList' => $paymentMethodsList)); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $user = auth('web')->user(); |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | |
27 | 27 | $paymentMethodsList = Cart::getConditionsByType('sending_method')->first()->getAttributes()['data']['related_payment_methods_list']; |
28 | 28 | |
29 | - if(!Cart::getConditionsByType('sending_method')->count()) { |
|
29 | + if (!Cart::getConditionsByType('sending_method')->count()) { |
|
30 | 30 | Notification::error('Selecteer een verzendwijze'); |
31 | 31 | return redirect()->to('cart'); |
32 | 32 | } |
33 | 33 | |
34 | - if(!Cart::getConditionsByType('payment_method')->count()) { |
|
34 | + if (!Cart::getConditionsByType('payment_method')->count()) { |
|
35 | 35 | Notification::error('Selecteer een betaalwijze'); |
36 | 36 | return redirect()->to('cart'); |
37 | 37 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'paymentMethodsList' => $paymentMethodsList)); |
51 | 51 | } |
52 | 52 | |
53 | - return view('frontend.checkout.login')->with(array( 'sendingMethodsList' => $sendingMethodsList, 'paymentMethodsList' => $paymentMethodsList)); |
|
53 | + return view('frontend.checkout.login')->with(array('sendingMethodsList' => $sendingMethodsList, 'paymentMethodsList' => $paymentMethodsList)); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $user = auth('web')->user(); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $userdata = $request->all(); |
106 | 106 | |
107 | 107 | $rules = array( |
108 | - 'email' => 'required|email', // required and must be unique in the ducks table |
|
108 | + 'email' => 'required|email', // required and must be unique in the ducks table |
|
109 | 109 | 'password' => 'required', |
110 | 110 | 'firstname' => 'required', |
111 | 111 | 'lastname' => 'required', |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $data = $register; |
153 | 153 | $data['shop'] = app('shop'); |
154 | 154 | |
155 | - Mail::send('frontend.email.register-mail', array('password' => $userdata['password'], 'user' => $data->toArray(), 'billAddress' => $data->clientBillAddress->toArray()), function ($message) use ($data) { |
|
155 | + Mail::send('frontend.email.register-mail', array('password' => $userdata['password'], 'user' => $data->toArray(), 'billAddress' => $data->clientBillAddress->toArray()), function($message) use ($data) { |
|
156 | 156 | |
157 | 157 | $message->to($data['email'])->from($data['shop']->email, $data['shop']->title)->subject('Je bent geregistreerd.'); |
158 | 158 | }); |
@@ -216,15 +216,15 @@ discard block |
||
216 | 216 | $data['user_id'] = $noAccountUser['client_id']; |
217 | 217 | } |
218 | 218 | |
219 | - if(Cart::getConditionsByType('sending_method')->count()) { |
|
219 | + if (Cart::getConditionsByType('sending_method')->count()) { |
|
220 | 220 | $data['sending_method'] = Cart::getConditionsByType('sending_method'); |
221 | 221 | } |
222 | 222 | |
223 | - if(Cart::getConditionsByType('sending_method_country_price')->count()) { |
|
223 | + if (Cart::getConditionsByType('sending_method_country_price')->count()) { |
|
224 | 224 | $data['sending_method_country_price'] = Cart::getConditionsByType('sending_method_country_price'); |
225 | 225 | } |
226 | 226 | |
227 | - if(Cart::getConditionsByType('payment_method')->count()) { |
|
227 | + if (Cart::getConditionsByType('payment_method')->count()) { |
|
228 | 228 | $data['payment_method'] = Cart::getConditionsByType('payment_method'); |
229 | 229 | } |
230 | 230 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $template = 'frontend.product.combinations'; |
44 | 44 | |
45 | 45 | $leadingAttributeId = key(reset($newPullDowns)); |
46 | - if($productAttributeId) { |
|
46 | + if ($productAttributeId) { |
|
47 | 47 | $leadingAttributeId = $productAttributeId; |
48 | 48 | } else { |
49 | 49 | $productAttributeId = $pullDowns['productAttribute']->first()->id; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | ->addColumn('status', function ($order) { |
48 | 48 | if ($order->orderStatus) { |
49 | - return $order->orderStatus->title; |
|
49 | + return $order->orderStatus->title; |
|
50 | 50 | } |
51 | 51 | }) |
52 | 52 |
@@ -44,16 +44,16 @@ discard block |
||
44 | 44 | |
45 | 45 | $datatables = DataTables::of($order) |
46 | 46 | |
47 | - ->addColumn('status', function ($order) { |
|
47 | + ->addColumn('status', function($order) { |
|
48 | 48 | if ($order->orderStatus) { |
49 | 49 | return $order->orderStatus->title; |
50 | 50 | } |
51 | 51 | }) |
52 | 52 | |
53 | - ->addColumn('created_at', function ($order) { |
|
53 | + ->addColumn('created_at', function($order) { |
|
54 | 54 | return date('d F H:i', strtotime($order->created_at)); |
55 | 55 | }) |
56 | - ->addColumn('status', function ($order) { |
|
56 | + ->addColumn('status', function($order) { |
|
57 | 57 | if ($order->orderStatus) { |
58 | 58 | if ($order->orderStatus->color) { |
59 | 59 | return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>'; |
@@ -61,33 +61,33 @@ discard block |
||
61 | 61 | return $order->orderStatus->title; |
62 | 62 | } |
63 | 63 | }) |
64 | - ->addColumn('client', function ($order) { |
|
64 | + ->addColumn('client', function($order) { |
|
65 | 65 | if ($order->client) { |
66 | 66 | if ($order->orderBillAddress) { |
67 | 67 | return $order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname; |
68 | 68 | } |
69 | 69 | } |
70 | 70 | }) |
71 | - ->addColumn('products', function ($order) { |
|
71 | + ->addColumn('products', function($order) { |
|
72 | 72 | if ($order->products) { |
73 | 73 | return $order->products->count(); |
74 | 74 | } |
75 | 75 | }) |
76 | - ->addColumn('price_with_tax', function ($order) { |
|
76 | + ->addColumn('price_with_tax', function($order) { |
|
77 | 77 | $money = '€ '.$order->getPriceWithTaxNumberFormat(); |
78 | 78 | return $money; |
79 | 79 | }) |
80 | - ->addColumn('paymentMethod', function ($order) { |
|
80 | + ->addColumn('paymentMethod', function($order) { |
|
81 | 81 | if ($order->orderPaymentMethod) { |
82 | 82 | return $order->orderPaymentMethod->title; |
83 | 83 | } |
84 | 84 | }) |
85 | - ->addColumn('sendingMethod', function ($order) { |
|
85 | + ->addColumn('sendingMethod', function($order) { |
|
86 | 86 | if ($order->orderSendingMethod) { |
87 | 87 | return $order->orderSendingMethod->title; |
88 | 88 | } |
89 | 89 | }) |
90 | - ->addColumn('action', function ($order) { |
|
90 | + ->addColumn('action', function($order) { |
|
91 | 91 | $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
92 | 92 | $links = '<a href="/admin/order/'.$order->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a> '.$download; |
93 | 93 |
@@ -47,6 +47,6 @@ |
||
47 | 47 | public function store($productId, Request $request) |
48 | 48 | { |
49 | 49 | $result = ProductExtraFieldValueService::create($request->all(), $productId); |
50 | - return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
|
50 | + return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
|
51 | 51 | } |
52 | 52 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function store($productId, Request $request) |
48 | 48 | { |
49 | - $result = ProductExtraFieldValueService::create($request->all(), $productId); |
|
49 | + $result = ProductExtraFieldValueService::create($request->all(), $productId); |
|
50 | 50 | return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
51 | 51 | } |
52 | 52 | } |
@@ -259,9 +259,9 @@ |
||
259 | 259 | { |
260 | 260 | $order = OrderService::find($orderId); |
261 | 261 | if($order->orderLabel()->count()) { |
262 | - header("Content-type: application/octet-stream"); |
|
263 | - header("Content-disposition: attachment;filename=label.pdf"); |
|
264 | - echo $order->orderLabel->data; |
|
262 | + header("Content-type: application/octet-stream"); |
|
263 | + header("Content-disposition: attachment;filename=label.pdf"); |
|
264 | + echo $order->orderLabel->data; |
|
265 | 265 | } |
266 | 266 | } |
267 | 267 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | use Hideyo\Ecommerce\Framework\Services\Order\OrderFacade as OrderService; |
15 | 15 | use Hideyo\Ecommerce\Framework\Services\Order\OrderStatusFacade as OrderStatusService; |
16 | 16 | use Hideyo\Ecommerce\Framework\Services\PaymentMethod\PaymentMethodFacade as PaymentMethodService; |
17 | -use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService;use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService; |
|
17 | +use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService; use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService; |
|
18 | 18 | use Illuminate\Http\Request; |
19 | 19 | use Carbon\Carbon; |
20 | 20 | use Notification; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | public function index(Request $request) |
29 | 29 | { |
30 | - $shop = auth('hideyobackend')->user()->shop; |
|
30 | + $shop = auth('hideyobackend')->user()->shop; |
|
31 | 31 | $now = Carbon::now(); |
32 | 32 | |
33 | 33 | $revenueThisMonth = null; |
@@ -55,15 +55,15 @@ discard block |
||
55 | 55 | |
56 | 56 | $datatables = \DataTables::of($order) |
57 | 57 | |
58 | - ->addColumn('generated_custom_order_id', function ($order) { |
|
58 | + ->addColumn('generated_custom_order_id', function($order) { |
|
59 | 59 | return $order->generated_custom_order_id; |
60 | 60 | }) |
61 | 61 | |
62 | - ->addColumn('created_at', function ($order) { |
|
62 | + ->addColumn('created_at', function($order) { |
|
63 | 63 | return date('d F H:i', strtotime($order->created_at)); |
64 | 64 | }) |
65 | 65 | |
66 | - ->addColumn('status', function ($order) { |
|
66 | + ->addColumn('status', function($order) { |
|
67 | 67 | if ($order->orderStatus) { |
68 | 68 | if ($order->orderStatus->color) { |
69 | 69 | return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>'; |
@@ -72,46 +72,46 @@ discard block |
||
72 | 72 | } |
73 | 73 | }) |
74 | 74 | |
75 | - ->filterColumn('client', function ($query, $keyword) { |
|
75 | + ->filterColumn('client', function($query, $keyword) { |
|
76 | 76 | |
77 | 77 | $query->where( |
78 | - function ($query) use ($keyword) { |
|
78 | + function($query) use ($keyword) { |
|
79 | 79 | $query->whereRaw("order_address.firstname like ?", ["%{$keyword}%"]); |
80 | 80 | $query->orWhereRaw("order_address.lastname like ?", ["%{$keyword}%"]); |
81 | 81 | ; |
82 | 82 | } |
83 | 83 | ); |
84 | 84 | }) |
85 | - ->addColumn('client', function ($order) { |
|
85 | + ->addColumn('client', function($order) { |
|
86 | 86 | if ($order->client) { |
87 | 87 | if ($order->orderBillAddress) { |
88 | - return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count() .')</a>'; |
|
88 | + return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count().')</a>'; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | }) |
92 | - ->addColumn('products', function ($order) { |
|
92 | + ->addColumn('products', function($order) { |
|
93 | 93 | if ($order->products) { |
94 | 94 | return $order->products->count(); |
95 | 95 | } |
96 | 96 | }) |
97 | - ->addColumn('price_with_tax', function ($order) { |
|
97 | + ->addColumn('price_with_tax', function($order) { |
|
98 | 98 | $money = '€ '.$order->getPriceWithTaxNumberFormat(); |
99 | 99 | return $money; |
100 | 100 | }) |
101 | 101 | |
102 | 102 | |
103 | - ->addColumn('paymentMethod', function ($order) { |
|
103 | + ->addColumn('paymentMethod', function($order) { |
|
104 | 104 | if ($order->orderPaymentMethod) { |
105 | 105 | return $order->orderPaymentMethod->title; |
106 | 106 | } |
107 | 107 | }) |
108 | - ->addColumn('sendingMethod', function ($order) { |
|
108 | + ->addColumn('sendingMethod', function($order) { |
|
109 | 109 | if ($order->orderSendingMethod) { |
110 | 110 | return $order->orderSendingMethod->title; |
111 | 111 | } |
112 | 112 | }) |
113 | - ->addColumn('action', function ($order) { |
|
114 | - $deleteLink = \Form::deleteajax('/admin/order/'. $order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
113 | + ->addColumn('action', function($order) { |
|
114 | + $deleteLink = \Form::deleteajax('/admin/order/'.$order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
115 | 115 | $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
116 | 116 | |
117 | 117 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | if ($data and $data['order']) { |
146 | 146 | |
147 | - if($data['type'] == 'one-pdf') { |
|
147 | + if ($data['type'] == 'one-pdf') { |
|
148 | 148 | $pdfHtml = ""; |
149 | 149 | $countOrders = count($data['order']); |
150 | 150 | $i = 0; |
@@ -170,15 +170,15 @@ discard block |
||
170 | 170 | $pdf = PDF::loadHTML($pdfHtmlBody); |
171 | 171 | |
172 | 172 | return $pdf->download('order-'.$order->generated_custom_order_id.'.pdf'); |
173 | - } elseif($data['type'] == 'product-list') { |
|
173 | + } elseif ($data['type'] == 'product-list') { |
|
174 | 174 | $products = OrderService::productsByOrderIds($data['order']); |
175 | 175 | |
176 | - if($products) { |
|
176 | + if ($products) { |
|
177 | 177 | |
178 | 178 | |
179 | - Excel::create('products', function ($excel) use ($products) { |
|
179 | + Excel::create('products', function($excel) use ($products) { |
|
180 | 180 | |
181 | - $excel->sheet('Products', function ($sheet) use ($products) { |
|
181 | + $excel->sheet('Products', function($sheet) use ($products) { |
|
182 | 182 | $newArray = array(); |
183 | 183 | foreach ($products as $key => $row) { |
184 | 184 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | if ($orders) { |
211 | 211 | $request->session()->put('print_orders', $orders->toArray()); |
212 | - return response()->json(array('orders' => $orders->toArray() )); |
|
212 | + return response()->json(array('orders' => $orders->toArray())); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | $request->session()->destroy('print_orders'); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | public function downloadLabel($orderId) |
253 | 253 | { |
254 | 254 | $order = OrderService::find($orderId); |
255 | - if($order->orderLabel()->count()) { |
|
255 | + if ($order->orderLabel()->count()) { |
|
256 | 256 | header("Content-type: application/octet-stream"); |
257 | 257 | header("Content-disposition: attachment;filename=label.pdf"); |
258 | 258 | echo $order->orderLabel->data; |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | 'clientDeliveryCompany' => $order->orderDeliveryAddress->company |
283 | 283 | ); |
284 | 284 | foreach ($replace as $key => $val) { |
285 | - $content = str_replace("[" . $key . "]", $val, $content); |
|
285 | + $content = str_replace("[".$key."]", $val, $content); |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | return $content; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | |
296 | 296 | public function update(Request $request, $orderId) |
297 | 297 | { |
298 | - $result = OrderService::updateById($request->all(), $orderId); |
|
298 | + $result = OrderService::updateById($request->all(), $orderId); |
|
299 | 299 | |
300 | 300 | if ($result->errors()->all()) { |
301 | 301 | return redirect()->back()->withInput()->withErrors($result->errors()->all()); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | function ($query) use ($keyword) { |
69 | 69 | $query->whereRaw("product.title like ?", ["%{$keyword}%"]); |
70 | 70 | $query->orWhereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
71 | - $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]); |
|
71 | + $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]); |
|
72 | 72 | ; |
73 | 73 | } |
74 | 74 | ); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ['product.*', |
30 | 30 | 'brand.title as brandtitle', |
31 | 31 | 'product_category.title as categorytitle'] |
32 | - )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages','taxRate')) |
|
32 | + )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate')) |
|
33 | 33 | |
34 | 34 | ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id') |
35 | 35 | |
@@ -38,23 +38,23 @@ discard block |
||
38 | 38 | ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
39 | 39 | |
40 | 40 | $datatables = \DataTables::of($product) |
41 | - ->filterColumn('reference_code', function ($query, $keyword) { |
|
41 | + ->filterColumn('reference_code', function($query, $keyword) { |
|
42 | 42 | $query->whereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
43 | 43 | }) |
44 | - ->filterColumn('active', function ($query, $keyword) { |
|
44 | + ->filterColumn('active', function($query, $keyword) { |
|
45 | 45 | $query->whereRaw("product.active like ?", ["%{$keyword}%"]); |
46 | 46 | ; |
47 | 47 | }) |
48 | 48 | |
49 | - ->addColumn('rank', function ($product) { |
|
49 | + ->addColumn('rank', function($product) { |
|
50 | 50 | return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="/admin/product/change-rank/'.$product->id.'">'; |
51 | 51 | |
52 | 52 | }) |
53 | 53 | |
54 | - ->filterColumn('title', function ($query, $keyword) { |
|
54 | + ->filterColumn('title', function($query, $keyword) { |
|
55 | 55 | |
56 | 56 | $query->where( |
57 | - function ($query) use ($keyword) { |
|
57 | + function($query) use ($keyword) { |
|
58 | 58 | $query->whereRaw("product.title like ?", ["%{$keyword}%"]); |
59 | 59 | $query->orWhereRaw("product.reference_code like ?", ["%{$keyword}%"]); |
60 | 60 | $query->orWhereRaw("brand.title like ?", ["%{$keyword}%"]); |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | ); |
64 | 64 | }) |
65 | 65 | |
66 | - ->filterColumn('categorytitle', function ($query, $keyword) { |
|
66 | + ->filterColumn('categorytitle', function($query, $keyword) { |
|
67 | 67 | $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]); |
68 | 68 | }) |
69 | 69 | |
70 | - ->addColumn('active', function ($product) { |
|
70 | + ->addColumn('active', function($product) { |
|
71 | 71 | if ($product->active) { |
72 | 72 | 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>'; |
73 | 73 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 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>'; |
76 | 76 | }) |
77 | 77 | |
78 | - ->addColumn('title', function ($product) { |
|
78 | + ->addColumn('title', function($product) { |
|
79 | 79 | if ($product->brand) { |
80 | 80 | return $product->brand->title.' | '.$product->title; |
81 | 81 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | }) |
85 | 85 | |
86 | 86 | |
87 | - ->addColumn('amount', function ($product) { |
|
87 | + ->addColumn('amount', function($product) { |
|
88 | 88 | if ($product->attributes->count()) { |
89 | 89 | return '<a href="/admin/product/'.$product->id.'/product-combination">combinations</a>'; |
90 | 90 | } |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | return '<input type="text" class="change-amount" value="'.$product->amount.'" style="width:50px;" data-url="'.url()->route('product.change-amount', array('productId' => $product->id)).'">'; |
93 | 93 | }) |
94 | 94 | |
95 | - ->addColumn('image', function ($product) { |
|
95 | + ->addColumn('image', function($product) { |
|
96 | 96 | if ($product->productImages->count()) { |
97 | 97 | return '<img src="/files/product/100x100/'.$product->id.'/'.$product->productImages->first()->file.'" />'; |
98 | 98 | } |
99 | 99 | }) |
100 | - ->addColumn('price', function ($product) { |
|
100 | + ->addColumn('price', function($product) { |
|
101 | 101 | |
102 | 102 | $result = ""; |
103 | 103 | if ($product->price) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'amount' => $product->amount |
148 | 148 | ); |
149 | 149 | |
150 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
150 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
151 | 151 | |
152 | 152 | |
153 | 153 | if ($product->discount_value) { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | }) |
160 | 160 | |
161 | 161 | |
162 | - ->addColumn('categorytitle', function ($product) { |
|
162 | + ->addColumn('categorytitle', function($product) { |
|
163 | 163 | if ($product->subcategories()->count()) { |
164 | 164 | $subcategories = $product->subcategories()->pluck('title')->toArray(); |
165 | 165 | return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>'; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | return $product->categorytitle; |
169 | 169 | }) |
170 | 170 | |
171 | - ->addColumn('action', function ($product) { |
|
171 | + ->addColumn('action', function($product) { |
|
172 | 172 | $deleteLink = \Form::deleteajax(url()->route('product.destroy', $product->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $product->title); |
173 | 173 | $copy = '<a href="'.url()->route('product.copy', $product->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Copy</a>'; |
174 | 174 | |
@@ -191,26 +191,26 @@ discard block |
||
191 | 191 | ['product.*', |
192 | 192 | 'brand.title as brandtitle', |
193 | 193 | 'product_category.title as categorytitle'] |
194 | - )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages','taxRate')) |
|
194 | + )->with(array('productCategory', 'brand', 'subcategories', 'attributes', 'productImages', 'taxRate')) |
|
195 | 195 | ->leftJoin('product_category as product_category', 'product_category.id', '=', 'product.product_category_id') |
196 | 196 | ->leftJoin('brand as brand', 'brand.id', '=', 'product.brand_id') |
197 | 197 | ->where('product.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
198 | 198 | |
199 | 199 | $datatables = \DataTables::of($product) |
200 | - ->addColumn('rank', function ($product) { |
|
200 | + ->addColumn('rank', function($product) { |
|
201 | 201 | return '<input type="text" class="change-rank" value="'.$product->rank.'" style="width:50px;" data-url="'.url()->route('product.change-rank', array('productId' => $product->id)).'">'; |
202 | 202 | }) |
203 | - ->filterColumn('categorytitle', function ($query, $keyword) { |
|
203 | + ->filterColumn('categorytitle', function($query, $keyword) { |
|
204 | 204 | $query->whereRaw("product_category.title like ?", ["%{$keyword}%"]); |
205 | 205 | }) |
206 | - ->addColumn('title', function ($product) { |
|
206 | + ->addColumn('title', function($product) { |
|
207 | 207 | if ($product->brand) { |
208 | 208 | return $product->brand->title.' | '.$product->title; |
209 | 209 | } |
210 | 210 | |
211 | 211 | return $product->title; |
212 | 212 | }) |
213 | - ->addColumn('categorytitle', function ($product) { |
|
213 | + ->addColumn('categorytitle', function($product) { |
|
214 | 214 | if ($product->subcategories()->count()) { |
215 | 215 | $subcategories = $product->subcategories()->pluck('title')->toArray(); |
216 | 216 | return $product->categorytitle.', <small> '.implode(', ', $subcategories).'</small>'; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | public function store(Request $request) |
241 | 241 | { |
242 | - $result = ProductService::create($request->all()); |
|
242 | + $result = ProductService::create($request->all()); |
|
243 | 243 | return ProductService::notificationRedirect('product.index', $result, 'The product was inserted.'); |
244 | 244 | } |
245 | 245 | |
@@ -284,10 +284,10 @@ discard block |
||
284 | 284 | public function postExport() |
285 | 285 | { |
286 | 286 | |
287 | - $result = ProductService::selectAllExport(); |
|
288 | - Excel::create('export', function ($excel) use ($result) { |
|
287 | + $result = ProductService::selectAllExport(); |
|
288 | + Excel::create('export', function($excel) use ($result) { |
|
289 | 289 | |
290 | - $excel->sheet('Products', function ($sheet) use ($result) { |
|
290 | + $excel->sheet('Products', function($sheet) use ($result) { |
|
291 | 291 | $newArray = array(); |
292 | 292 | foreach ($result as $row) { |
293 | 293 | $category = ""; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $i = 0; |
317 | 317 | foreach ($row->productImages as $image) { |
318 | 318 | $i++; |
319 | - $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file; |
|
319 | + $newArray[$row->id]['image_'.$i] = url('/').'/files/product/800x800/'.$row->id.'/'.$image->file; |
|
320 | 320 | } |
321 | 321 | } |
322 | 322 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | public function update(Request $request, $productId) |
387 | 387 | { |
388 | 388 | $input = $request->all(); |
389 | - $result = ProductService::updateById($input, $productId); |
|
389 | + $result = ProductService::updateById($input, $productId); |
|
390 | 390 | |
391 | 391 | $redirect = redirect()->route('product.index'); |
392 | 392 | |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | |
417 | 417 | public function destroy($id) |
418 | 418 | { |
419 | - $result = ProductService::destroy($id); |
|
419 | + $result = ProductService::destroy($id); |
|
420 | 420 | |
421 | 421 | if ($result) { |
422 | 422 | Notification::success('The product was deleted.'); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | }) |
49 | 49 | ->addColumn('bill', function ($addresses) { |
50 | 50 | if ($addresses->clientBillAddress()->count()) { |
51 | - return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
|
51 | + return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return '<span class="glyphicon glyphicon-remove icon-red"></span>'; |
@@ -27,24 +27,24 @@ discard block |
||
27 | 27 | $addresses = ClientService::getAddressModel()->with(array('clientDeliveryAddress', 'clientBillAddress'))->where('client_id', '=', $clientId); |
28 | 28 | |
29 | 29 | $datatables = DataTables::of($addresses) |
30 | - ->addColumn('housenumber', function ($addresses) { |
|
30 | + ->addColumn('housenumber', function($addresses) { |
|
31 | 31 | return $addresses->housenumber.$addresses->housenumber_suffix; |
32 | 32 | }) |
33 | - ->addColumn('delivery', function ($addresses) { |
|
33 | + ->addColumn('delivery', function($addresses) { |
|
34 | 34 | if ($addresses->clientDeliveryAddress()->count()) { |
35 | 35 | return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
36 | 36 | } |
37 | 37 | |
38 | 38 | return '<span class="glyphicon glyphicon-remove icon-red"></span>'; |
39 | 39 | }) |
40 | - ->addColumn('bill', function ($addresses) { |
|
40 | + ->addColumn('bill', function($addresses) { |
|
41 | 41 | if ($addresses->clientBillAddress()->count()) { |
42 | 42 | return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
43 | 43 | } |
44 | 44 | |
45 | 45 | return '<span class="glyphicon glyphicon-remove icon-red"></span>'; |
46 | 46 | }) |
47 | - ->addColumn('action', function ($addresses) use ($clientId) { |
|
47 | + ->addColumn('action', function($addresses) use ($clientId) { |
|
48 | 48 | $deleteLink = Form::deleteajax(url()->route('client.addresses.destroy', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
49 | 49 | $links = '<a href="'.url()->route('client.addresses.edit', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
50 | 50 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | public function store(Request $request, $clientId) |
67 | 67 | { |
68 | - $result = ClientService::createAddress($request->all(), $clientId); |
|
68 | + $result = ClientService::createAddress($request->all(), $clientId); |
|
69 | 69 | return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is inserted.'); |
70 | 70 | } |
71 | 71 | |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | |
78 | 78 | public function update(Request $request, $clientId, $id) |
79 | 79 | { |
80 | - $result = ClientService::editAddress($clientId, $id, $request->all()); |
|
80 | + $result = ClientService::editAddress($clientId, $id, $request->all()); |
|
81 | 81 | return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is updated.'); |
82 | 82 | } |
83 | 83 | |
84 | 84 | public function destroy($clientId, $id) |
85 | 85 | { |
86 | - $result = ClientService::destroyAddress($id); |
|
86 | + $result = ClientService::destroyAddress($id); |
|
87 | 87 | |
88 | 88 | if ($result) { |
89 | 89 | Notification::success('The client address is deleted.'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $query = CouponService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
25 | 25 | |
26 | 26 | $datatables = \DataTables::of($query) |
27 | - ->addColumn('action', function ($query) { |
|
27 | + ->addColumn('action', function($query) { |
|
28 | 28 | $deleteLink = Form::deleteajax(url()->route('coupon-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
29 | 29 | $links = '<a href="'.url()->route('coupon-group.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
30 | 30 | return $links; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | public function store(Request $request) |
45 | 45 | { |
46 | - $result = CouponService::createGroup($request->all()); |
|
46 | + $result = CouponService::createGroup($request->all()); |
|
47 | 47 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was inserted.'); |
48 | 48 | } |
49 | 49 | |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | |
55 | 55 | public function update(Request $request, $couponGroupId) |
56 | 56 | { |
57 | - $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
57 | + $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
58 | 58 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was updated.'); |
59 | 59 | } |
60 | 60 | |
61 | 61 | public function destroy($couponGroupId) |
62 | 62 | { |
63 | - $result = CouponService::destroyGroup($couponGroupId); |
|
63 | + $result = CouponService::destroyGroup($couponGroupId); |
|
64 | 64 | |
65 | 65 | if ($result) { |
66 | 66 | Notification::success('The coupon was deleted.'); |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | |
32 | 32 | $datatables = DataTables::of($image) |
33 | 33 | |
34 | - ->addColumn('thumb', function ($image) { |
|
34 | + ->addColumn('thumb', function($image) { |
|
35 | 35 | return '<img src="/files/content/100x100/'.$image->content_id.'/'.$image->file.'" />'; |
36 | 36 | }) |
37 | - ->addColumn('action', function ($image) use ($contentId) { |
|
38 | - $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'. $image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
37 | + ->addColumn('action', function($image) use ($contentId) { |
|
38 | + $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'.$image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
39 | 39 | $links = '<a href="/admin/content/'.$contentId.'/images/'.$image->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
40 | 40 | |
41 | 41 | return $links; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public function store(Request $request, $contentId) |
57 | 57 | { |
58 | - $result = ContentService::createImage($request->all(), $contentId); |
|
58 | + $result = ContentService::createImage($request->all(), $contentId); |
|
59 | 59 | return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was inserted.'); |
60 | 60 | } |
61 | 61 | |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | |
68 | 68 | public function update(Request $request, $contentId, $contentImageId) |
69 | 69 | { |
70 | - $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId); |
|
70 | + $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId); |
|
71 | 71 | return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was updated.'); |
72 | 72 | } |
73 | 73 | |
74 | 74 | public function destroy($contentId, $contentImageId) |
75 | 75 | { |
76 | - $result = ContentService::destroyImage($contentImageId); |
|
76 | + $result = ContentService::destroyImage($contentImageId); |
|
77 | 77 | |
78 | 78 | if ($result) { |
79 | 79 | Notification::success('The file was deleted.'); |