cosmetic fixes, enhance profile, fix mails, ...
This commit is contained in:
@@ -64,6 +64,8 @@ class CategoryController extends Controller
|
||||
]),
|
||||
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
|
||||
];
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Shop.Shelves.shelve', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class CustomerController extends Controller
|
||||
public function edit()
|
||||
{
|
||||
$id = Auth::id();
|
||||
$data['customer'] = Customers::get($id);
|
||||
$data['customer'] = Customers::get($id, 'addresses')->toArray();
|
||||
return view('Shop.Customers.edit', $data);
|
||||
}
|
||||
|
||||
@@ -35,5 +35,4 @@ class CustomerController extends Controller
|
||||
$customer = Customers::store($data);
|
||||
return response()->json(['error' => 0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\Invoices;
|
||||
use App\Repositories\Core\PDF;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
@@ -15,9 +16,21 @@ class InvoiceController extends Controller
|
||||
//
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
public function show($uuid)
|
||||
{
|
||||
$data = Invoices::get($id);
|
||||
$data = Invoices::getByUUID($uuid);
|
||||
return view('Shop.Invoices.show', $data);
|
||||
}
|
||||
|
||||
public function pdf($uuid)
|
||||
{
|
||||
\Debugbar::disable();
|
||||
$data['invoice'] = Invoices::getByUUID($uuid);
|
||||
$filename = 'invoice-' . $uuid . '.pdf';
|
||||
$html = view('Shop.Invoices.pdf', $data)->toHtml();
|
||||
// $html = '<h1>Hello world!</h1>';
|
||||
// return PDF::convertHTML($html);
|
||||
// return view('Shop.Invoices.pdf', $data);
|
||||
return PDF::view('Shop.Invoices.pdf', $data, $filename);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,16 +26,26 @@ class OrderController extends Controller
|
||||
$data = Orders::getByUUID($uuid);
|
||||
}
|
||||
|
||||
public function pdf($uuid)
|
||||
{
|
||||
$data = Orders::getByUUID($uuid);
|
||||
return view('Shop.Orders.pdf', $data);
|
||||
}
|
||||
|
||||
public function order()
|
||||
{
|
||||
$customer = Customers::getWithAddresses();
|
||||
$data = [
|
||||
'customer' => $customer ? $customer->toArray() : false,
|
||||
'basket' => ShopCart::getSummary(),
|
||||
'deliveries' => Deliveries::getAllWithSaleChannel()->toArray(),
|
||||
'sale_channel' => SaleChannels::getDefault()->toArray(),
|
||||
];
|
||||
return view('Shop.Orders.order', $data);
|
||||
if (ShopCart::count()) {
|
||||
$customer = Customers::getWithAddresses();
|
||||
$data = [
|
||||
'customer' => $customer ? $customer->toArray() : false,
|
||||
'basket' => ShopCart::getSummary(),
|
||||
'deliveries' => Deliveries::getAllWithSaleChannel()->toArray(),
|
||||
'sale_channel' => SaleChannels::getDefault()->toArray(),
|
||||
];
|
||||
return view('Shop.Orders.order', $data);
|
||||
} else {
|
||||
return redirect()->route('home');
|
||||
}
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
|
||||
Reference in New Issue
Block a user