diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1ce9f87..e42969f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,36 +2,50 @@ - - - - + + + + + + + - - - - - + + - + + + + + + - - - + + - - - + + + + + + - - - - - + + + + + + + + + + + + + - @@ -46,236 +60,15 @@ $PROJECT_DIR$/composer.json /usr/local/bin/composer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -284,37 +77,95 @@ - + - - + + - + - + - + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -325,19 +176,6 @@ - your - render - base_ - url - aktvie - ac - card_show - route - $(this).find(".modal-body select[name='factor']").val(button.data('factor')); - dele - getRoles - admin - card count put get @@ -355,15 +193,30 @@ cardexpiredate getS slat + data_c + save + check + data_protection + update_p + _scrollTo + user_update_password_first + logou + log + same_as_billing + select + back_to_shop + secu $PROJECT_DIR$/app - $PROJECT_DIR$/resources/views/web $PROJECT_DIR$/app/Http/Controllers $PROJECT_DIR$/database/migrations + $PROJECT_DIR$/resources/views/user + $PROJECT_DIR$/resources/views + $PROJECT_DIR$/resources/views/web @@ -401,82 +254,60 @@ - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - @@ -586,9 +417,9 @@ - @@ -646,34 +477,24 @@ - - - - - - + + + + + + - - - - - - - - - - @@ -688,32 +509,14 @@ - - - - - - - - - - - - - - + + - - - - - - @@ -725,38 +528,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -764,10 +535,23 @@ - - - + + + + + + + + + + + + + + + + @@ -784,15 +568,16 @@ + - - - - - + + + + + @@ -864,11 +649,14 @@ + + + - @@ -880,10 +668,10 @@ - + - + @@ -896,7 +684,7 @@ - + @@ -909,403 +697,363 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index d7ebb9a..44a1b3e 100755 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Models\SfGuardUser; +use App\Models\ShoppingPayment; use App\User; use Auth; use Carbon\Carbon; @@ -69,7 +69,7 @@ class HomeController extends Controller abort(404); } - public function checkLogin($identify, $token) + /* public function checkLogin($identify, $token) { if($identify){ //user find by $identify @@ -110,6 +110,7 @@ class HomeController extends Controller } return abort(404); } + */ public function legalDataProtected() { @@ -131,7 +132,9 @@ class HomeController extends Controller if ( ! $user) { - return redirect('/status/not/found'); + // return redirect('/status/not/found'); + return redirect('/home'); + } $user->confirmed = 1; @@ -144,7 +147,7 @@ class HomeController extends Controller //Login! Auth::login($user); - return redirect('/status/verify'); + return redirect('/home'); } public function statusRegister(){ @@ -177,7 +180,27 @@ class HomeController extends Controller } } return json_encode(true); + } + public function blocked() + { + return view('status.user_blocked'); + } + public function backToShop($reference = ""){ + + if($reference){ + $ShoppingPayment = ShoppingPayment::where('reference', $reference)->first(); + if($ShoppingPayment->status == 'success'){ + $user = Auth::user(); + $user->wizard = 4; + $user->save(); + return redirect(route('wizard', [4])); + }else{ + \Session()->flash('alert-error', "Es ist ein Fehler bei der Bestellung aufgetreten"); + return redirect(route('wizard')); + } + + } } } diff --git a/app/Http/Controllers/LeadController.php b/app/Http/Controllers/LeadController.php index 86e72cf..fc096e4 100755 --- a/app/Http/Controllers/LeadController.php +++ b/app/Http/Controllers/LeadController.php @@ -47,6 +47,10 @@ class LeadController extends Controller if($id == "new"){ $user = new User(); $user->account = new UserAccount(); + $user->account->same_as_billing = 1; + $user->account->country_id = 1; + $user->account->shipping_country_id = 1; + $user->id = "new"; }else{ $user = User::findOrFail($id); if(!$user->account){ @@ -66,52 +70,66 @@ class LeadController extends Controller */ public function store(Request $request) { - $data = Input::all(); - if ($data['user_id'] == "new") { - $user = new User(); - $user->id = "new"; - $user->account = new UserAccount(); - $user->account->company_country_id = isset($data['company_country_id']) ? $data['company_country_id'] : 0; - $user->account->salutation = isset($data['salutation']) ? $data['salutation'] : 0; + $data = Input::all(); + if ($data['user_id'] == "new" || $data['user_id'] == 0) { $rules = array( 'salutation' => 'required', - 'last_name' => 'required|max:255', - 'country_id' => 'required|integer|min:1', + 'first_name'=>'required', + 'last_name'=>'required', 'email' => 'required|string|email|max:255|unique:users', 'email-confirm' => 'required|same:email', ); - - } else { - $user = User::findOrFail($data['user_id']); - if(!$user->account){ - $user->account = new UserAccount(); - } + }else{ $rules = array( 'salutation' => 'required', - 'last_name' => 'required|max:255', - 'country_id' => 'required|integer|min:1', + 'first_name'=>'required', + 'last_name'=>'required', + 'address'=>'required', + 'zipcode'=>'required', + 'city' => 'required', 'email' => 'required|string|email|max:255|exists:users,email', 'email-confirm' => 'required|same:email', ); + if(!Input::get('same_as_billing')){ + $rules = array_merge($rules, [ + 'shipping_firstname'=>'required', + 'shipping_lastname'=>'required', + 'shipping_address'=>'required', + 'shipping_zipcode'=>'required', + 'shipping_city' => 'required', + 'shipping_salutation' => 'required' + + ]); + } + } - if(Input::get('company') == 1){ - $rules['company_name'] = 'required|max:255'; - $rules['company_country_id'] = 'required|integer|min:1'; - } - - $data = [ - 'user' => $user, - ]; $validator = Validator::make(Input::all(), $rules); - if ($validator->fails()) { - return view('admin.lead_edit', $data)->withErrors($validator); - } else { - $data = Input::all(); - $this->userRepo->update(Input::all()); + if ($data['user_id'] == "new" || $data['user_id'] == 0) { + $user_id = "new"; + }else{ + $user = User::findOrFail($data['user_id']); + $user_id = $user->id; + } + return redirect(route('admin_lead_edit', [$user_id]))->withErrors($validator)->withInput(Input::all()); + }else{ + + if ($data['user_id'] == "new" || $data['user_id'] == 0) { + $user = new User(); + $user->id = "new"; + $user->account = new UserAccount(); + + }else { + $user = User::findOrFail($data['user_id']); + if(!$user->account){ + $user->account = new UserAccount(); + } + } + + $this->userRepo->update($data); if(isset($data['contact_verify'])){ @@ -135,7 +153,12 @@ class LeadController extends Controller } \Session()->flash('alert-save', true); - return redirect('/admin/leads'); + return redirect(route('admin_leads')); + + + } + + } } \ No newline at end of file diff --git a/app/Http/Controllers/Web/CheckoutController.php b/app/Http/Controllers/Web/CheckoutController.php index a33a7e1..fcb5e66 100755 --- a/app/Http/Controllers/Web/CheckoutController.php +++ b/app/Http/Controllers/Web/CheckoutController.php @@ -11,6 +11,7 @@ use App\Models\ShoppingOrder; use App\Models\ShoppingOrderItem; use App\Models\ShoppingPayment; use App\Models\ShoppingUser; +use App\User; use Illuminate\Session\SessionManager; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Mail; @@ -37,7 +38,7 @@ class CheckoutController extends Controller public function checkout(){ - $user_shop = Util::getUserShop(); +// $user_shop = Util::getUserShop(); if(Input::get('selected_country')){ Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country')); @@ -46,7 +47,42 @@ class CheckoutController extends Controller // $selected_country = $ShippingCountry->id; } - $shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id')); + if(!$this->getPayments('shopping_user_id') && Util::getAuthUser()){ + + $user = Util::getAuthUser(); + $user->email; + $account = $user->account; + $shopping_user = new ShoppingUser(); + $shopping_user->auth_user_id = $user->id; + $shopping_user->billing_salutation = $user->account->salutation; + $shopping_user->billing_company = $user->account->company; + $shopping_user->billing_firstname = $user->account->first_name; + $shopping_user->billing_lastname = $user->account->last_name; + $shopping_user->billing_address = $user->account->address; + $shopping_user->billing_address_2 = $user->account->address_2; + $shopping_user->billing_zipcode = $user->account->zipcode; + $shopping_user->billing_city = $user->account->city; + $shopping_user->billing_country_id = $user->account->country_id; + $shopping_user->billing_phone = $user->account->phone; + $shopping_user->billing_email = $user->email; + $shopping_user->accepted_data_checkbox = 1; + $shopping_user->same_as_billing = $user->account->same_as_billing; + $shopping_user->shipping_salutation = $user->account->shipping_salutation; + $shopping_user->shipping_company = $user->account->shipping_company; + $shopping_user->shipping_firstname = $user->account->shipping_firstname; + $shopping_user->shipping_lastname = $user->account->shipping_lastname; + $shopping_user->shipping_address = $user->account->shipping_address; + $shopping_user->shipping_address_2 = $user->account->shipping_address_2; + $shopping_user->shipping_zipcode = $user->account->shipping_zipcode; + $shopping_user->shipping_city = $user->account->shipping_city; + $shopping_user->shipping_country_id = $user->account->shipping_country_id; + $shopping_user->shipping_phone = $user->account->shipping_phone; + $shopping_user->save(); + $this->putPayments('shopping_user_id', $shopping_user->id); + + }else{ + $shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id')); + } if($shopping_user->same_as_billing === NULL){ $shopping_user->same_as_billing = true; } @@ -59,7 +95,7 @@ class CheckoutController extends Controller public function checkoutFinal(){ - /* + $rules = array( 'billing_salutation' => 'required', 'billing_firstname'=>'required', @@ -86,7 +122,7 @@ class CheckoutController extends Controller if ($validator->fails()) { return back()->withErrors($validator)->withErrors($validator)->withInput(Input::all()); } - */ + $data = Input::all(); //make User @@ -203,15 +239,16 @@ class CheckoutController extends Controller $data = [ 'key' => '698fb2555f8b2efc74f60b2121421f45', - 'txaction' => 'appointed', - 'clearingtype' => 'vor', - 'userid' => '157787236', - 'txid' => '319655873', - 'price' => '13.80', - 'param' => '6', //$this->shopping_order->id, - 'reference' => '15c76c0d470cf9', + 'txaction' => 'paid', + 'clearingtype' => 'wlt', + 'userid' => '158006846', + 'txid' => '320267294', + 'price' => '59.00', + 'param' => '18', //$this->shopping_order->id, + 'reference' => '15c79ba77992e2', ]; + if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){ \Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data)); abort(404); @@ -274,6 +311,28 @@ class CheckoutController extends Controller if($data['txaction'] == 'paid'){ $shopping_order->paid = true; $shopping_order->save(); + //if product has actions + if($shopping_order->shopping_order_items && $shopping_order->auth_user_id){ + foreach($shopping_order->shopping_order_items as $shopping_order_item){ + if($shopping_order_item->product){ + if($shopping_order_item->product->action){ + + $user = User::findOrFail($shopping_order->auth_user_id); + foreach ($shopping_order_item->product->action as $do){ + if($shopping_order_item->product->getActionName($do) == 'payment_for_account'){ + $user->payment_account = date("Y-m-d H:i:s", strtotime("+1 years")); + $user->wizard = 10; + } + if($shopping_order_item->product->getActionName($do) == 'payment_for_shop'){ + $user->payment_shop = date("Y-m-d H:i:s", strtotime("+1 years")); + $user->wizard = 10; + } + $user->save(); + } + } + } + } + } } if($data['txaction'] == 'appointed'){ @@ -321,6 +380,7 @@ class CheckoutController extends Controller $data = [ 'shopping_user_id' => $shopping_user->id, + 'auth_user_id' => $shopping_user->auth_user_id, 'country_id' => Yard::instance('shopping')->getShippingCountryId(), 'user_shop_id' => $user_shop->id, 'total' => Yard::instance('shopping')->total(2, '.', ','), diff --git a/app/Http/Controllers/Web/SiteController.php b/app/Http/Controllers/Web/SiteController.php index 68dc4e2..8c4498d 100755 --- a/app/Http/Controllers/Web/SiteController.php +++ b/app/Http/Controllers/Web/SiteController.php @@ -26,8 +26,8 @@ class SiteController extends Controller $products = ['aloe-vera-gel-99', 'aloe-vera-saft-500-ml', 'aloe-vera-lippenbalsam']; $set_products = ['aloe-vera-cleaner-set', 'aloe-vera-koerper-set', 'aloe-vera-repair-set']; $data = [ - 'products' => Product::whereIn('slug', $products)->get(), - 'set_products' => Product::whereIn('slug', $set_products)->get(), + 'products' => Product::whereIn('slug', $products)->where('active', true)->where('show_at', '<=', 1)->get(), + 'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->where('show_at', '<=', 1)->get(), 'user_shop' => Util::getUserShop(), ]; return view('web.index', $data); @@ -36,12 +36,12 @@ class SiteController extends Controller public function site($site, $subsite = false, $product_slug = false) { - $subsite = trim($subsite, '/'); - $product_slug = trim($product_slug, '/'); + $subsite = trim($subsite, '/'); + $product_slug = trim($product_slug, '/'); if($product_slug){ $category = Category::where('slug', $subsite)->where('active', true)->first(); - $product = Product::where('slug', $product_slug)->where('active', true)->first(); + $product = Product::where('slug', $product_slug)->where('active', true)->where('show_at', '<=', 1)->first(); if ($category && $product) { $data = [ @@ -49,7 +49,7 @@ class SiteController extends Controller 'subsite' => $subsite, 'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(), 'product' => $product, - 'p_count' => Product::where('active', true)->count(), + 'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(), ]; return view('web.templates.produkte-show', $data); @@ -57,7 +57,6 @@ class SiteController extends Controller } if($site == 'produkte'){ - if($subsite || $subsite != 'alle-produkte') { $category = Category::where('slug', $subsite)->where('active', true)->first(); if ($category) { @@ -68,8 +67,8 @@ class SiteController extends Controller 'products' => Product::whereHas('categories', function ($query) use ($category) { $query->where('category_id', '=', $category->id); - })->where('active', true)->orderBy('pos', 'DESC')->get(), - 'p_count' => Product::where('active', true)->count(), + })->where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'DESC')->get(), + 'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(), ]; return view('web.templates.' . $site, $data); @@ -80,8 +79,8 @@ class SiteController extends Controller 'user_shop' => Util::getUserShop(), 'subsite' => 'alle-produkte', 'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(), - 'products' => Product::where('active', true)->orderBy('pos', 'ASC')->get(), - 'p_count' => Product::where('active', true)->count(), + 'products' => Product::where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'ASC')->get(), + 'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(), ]; return view('web.templates.'.$site, $data); } diff --git a/app/Http/Controllers/WizardController.php b/app/Http/Controllers/WizardController.php new file mode 100755 index 0000000..38fb98b --- /dev/null +++ b/app/Http/Controllers/WizardController.php @@ -0,0 +1,199 @@ +account){ + $account = UserAccount::create([]); + $user->account_id = $account->id; + $user->save(); + return redirect(route('wizard')); + } + + $step = (!$user->wizard ? 0 : $user->wizard ); + if($step == 10){ + return redirect('/'); + } + $data = [ + 'user' => Auth::user(), + 'step' => $step, + 'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(), + ]; + + return view('user.wizard.show', $data); + } + + + public function store($step = 0) + { + + if(!Auth::check()){ + return redirect('login'); + } + + $user = Auth::user(); + if(!$user->account){ + $user->account = new UserAccount(); + } + + if($step == 0){ + $rules = array( + 'accepted_data_protection' => 'required', + 'accepted_active' => 'required', + ); + $validator = Validator::make(Input::all(), $rules); + if ($validator->fails()) { + $data = [ + 'user' => Auth::user(), + 'step' => $step, + ]; + return view('user.wizard.show', $data)->withErrors($validator); + } + $account = $user->account; + $account->data_protection = now(); + $account->save(); + $user->agreement = now(); + $user->wizard = 1; + $user->save(); + + return redirect(route('wizard', [1])); + } + if($step == 1){ + + if($user->isPasswort()){ + $user->wizard = 2; + $user->save(); + return redirect(route('wizard', [2])); + } + $rules = array( + 'password' => 'required|string|min:6|confirmed', + ); + $validator = Validator::make(Input::all(), $rules); + if ($validator->fails()) { + $data = [ + 'user' => Auth::user(), + 'step' => $step, + ]; + return view('user.wizard.show', $data)->withErrors($validator); + }else{ + $user->fill([ + 'password' => Hash::make(Input::get('password')) + ])->save(); + $user->wizard = 2; + $user->save(); + return redirect(route('wizard', [2])); + + + + } + } + if($step == 2){ + $rules = array( + 'salutation' => 'required', + 'first_name'=>'required', + 'last_name'=>'required', + 'address'=>'required', + 'zipcode'=>'required', + 'city' => 'required', + ); + + if(!Input::get('same_as_billing')){ + $rules = array_merge($rules, [ + 'shipping_firstname'=>'required', + 'shipping_lastname'=>'required', + 'shipping_address'=>'required', + 'shipping_zipcode'=>'required', + 'shipping_city' => 'required', + 'shipping_salutation' => 'required' + + ]); + } + $validator = Validator::make(Input::all(), $rules); + if ($validator->fails()) { + return redirect(route('wizard', [2]))->withErrors($validator)->withInput(Input::all()); + }else{ + $data = Input::all(); + $data['same_as_billing'] = Input::get('same_as_billing') == NULL ? 0 : 1; + $user->account->fill($data)->save(); + $user->wizard = 3; + $user->active_date = now(); + $user->active = 1; + $user->save(); + return redirect(route('wizard', [3])); + + } + } + + if($step == 3){ + + + if(Input::get('switchers-package-wizard')){ + Yard::instance('shopping')->destroy(); + $product = Product::find(Input::get('switchers-package-wizard')); + if($product && $product->active && $product->show_at == 3){ + $image = ""; + if($product->images->count()){ + $image = $product->images->first()->slug; + } + Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); + + do { + $identifier = Util::getToken(); + } while( ShoppingInstance::where('identifier', $identifier)->count() ); + + ShoppingInstance::create([ + 'identifier' => $identifier, + 'user_shop_id' => 1, //is first faker shop! + 'auth_user_id' => $user->id, + 'subdomain' => url('/'), + 'country_id' => Yard::instance('shopping')->getShippingCountryId(), + + ]); + Yard::instance('shopping')->store($identifier); + + //add to DB + $path = route('checkout.checkout_card', ['identifier'=>$identifier]); + $path = str_replace('http', 'https', $path); + return redirect()->secure($path); + + + + } + } + \Session()->flash('alert-error', "Fehler beim Produkt"); + return redirect(route('wizard', [3])); + } + + + + } + +} \ No newline at end of file diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 2eb48d1..8baa7f9 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -53,7 +53,7 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, + 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'admin' => \App\Http\Middleware\Admin::class, 'superadmin' => \App\Http\Middleware\SuperAdmin::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php new file mode 100644 index 0000000..8b409af --- /dev/null +++ b/app/Http/Middleware/Authenticate.php @@ -0,0 +1,83 @@ +auth = $auth; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string[] ...$guards + * @return mixed + * + * @throws \Illuminate\Auth\AuthenticationException + */ + public function handle($request, Closure $next, ...$guards) + { + + $this->authenticate($guards); + + //is blocked + if(in_array('user', $guards) && $this->auth->user()->blocked == 1){ + return redirect(route('user_blocked')); + } + + //is wizard + if(in_array('user', $guards) && $this->auth->user()->wizard < 5){ + return redirect(route('wizard')); + } + //can use wizard < 10 to repay + if(in_array('user', $guards) && $this->auth->user()->wizard < 10){ + //return redirect(route('wizard')); + } + + return $next($request); + } + + /** + * Determine if the user is logged in to any of the given guards. + * + * @param array $guards + * @return void + * + * @throws \Illuminate\Auth\AuthenticationException + */ + protected function authenticate(array $guards) + { + if (empty($guards)) { + return $this->auth->authenticate(); + } + + foreach ($guards as $guard) { + if ($this->auth->guard($guard)->check()) { + return $this->auth->shouldUse($guard); + } + } + + throw new AuthenticationException('Unauthenticated.', $guards); + } +} diff --git a/app/Http/Middleware/Checkout.php b/app/Http/Middleware/Checkout.php index f1a485b..26c9538 100755 --- a/app/Http/Middleware/Checkout.php +++ b/app/Http/Middleware/Checkout.php @@ -21,7 +21,6 @@ class Checkout */ public function handle($request, Closure $next) { - if($identifier = ShoppingInstance::where('identifier', $request->route('identifier'))->first()){ //user shop $user_shop = $identifier->user_shop; @@ -29,7 +28,12 @@ class Checkout Util::setPostRoute('user.'); \Session::put('user_shop', $user_shop); \Session::put('isCheckout', true); + + if($identifier->auth_user_id){ + \Session::put('auth_user', $identifier->auth_user); + } } + Yard::instance('shopping')->destroy(); //restore yard Yard::instance('shopping')->restore($request->route('identifier')); Yard::instance('shopping')->setShippingCountryWithPrice($identifier->country_id); @@ -47,4 +51,4 @@ class Checkout return redirect(config('app.url')); } -} +} \ No newline at end of file diff --git a/app/Models/Product.php b/app/Models/Product.php index 19f6983..8350108 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -80,6 +80,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; */ class Product extends Model { + + protected $table = 'products'; protected $casts = [ @@ -89,7 +91,8 @@ class Product extends Model 'icons' => 'array', 'trans_description' => 'array', 'trans_usage' => 'array', - 'trans_ingredients' => 'array' + 'trans_ingredients' => 'array', + 'action' => 'array' ]; use Sluggable; @@ -114,7 +117,21 @@ class Product extends Model 'ingredients', 'pos', 'amount', - 'active' + 'active', + 'show_at', + 'action' + ]; + + public $showATs = [ + 0 => 'nur User Shop', + 1 => 'User + Berater Shop', + 2 => 'nur Berater Shop', + 3 => 'Registrierung Shop', + ]; + + public $actions = [ + 0 => 'payment_for_account', + 1 => 'payment_for_shop', ]; public function sluggable() @@ -139,7 +156,12 @@ class Product extends Model } - + public function getActionName($id = 0){ + if(isset($this->actions[$id])){ + return $this->actions[$id]; + } + return false; + } public function _format_number($value){ return preg_replace("/[^0-9,]/", "", $value); } @@ -163,6 +185,9 @@ class Product extends Model public function getFormattedPrice() { + if(!isset($this->attributes['price'])){ + return ""; + } if(\App::getLocale() == "en"){ return number_format($this->attributes['price'], 2, '.', ','); } @@ -171,6 +196,9 @@ class Product extends Model public function getFormattedPriceEk() { + if(!isset($this->attributes['price_ek'])){ + return ""; + } if(\App::getLocale() == "en"){ return number_format($this->attributes['price_ek'], 2, '.', ','); } @@ -179,6 +207,9 @@ class Product extends Model public function getFormattedTax() { + if(!isset($this->attributes['tax'])){ + return ""; + } if(\App::getLocale() == "en"){ return number_format($this->attributes['tax'], 2, '.', ','); } @@ -187,6 +218,9 @@ class Product extends Model public function getFormattedPriceOld() { + if(!isset($this->attributes['price_old'])){ + return ""; + } if(\App::getLocale() == "en"){ return number_format($this->attributes['price_old'], 2, '.', ','); } diff --git a/app/Models/ShippingPrice.php b/app/Models/ShippingPrice.php index 2888505..e6cb432 100644 --- a/app/Models/ShippingPrice.php +++ b/app/Models/ShippingPrice.php @@ -75,6 +75,9 @@ class ShippingPrice extends Model public function getFormattedPrice() { + if ($this->attributes['price'] === NULL) { + return $this->attributes['price']; + } if (\App::getLocale() == "en") { return number_format($this->attributes['price'], 2, '.', ','); } diff --git a/app/Models/ShoppingInstance.php b/app/Models/ShoppingInstance.php index 8baaae0..60b470d 100644 --- a/app/Models/ShoppingInstance.php +++ b/app/Models/ShoppingInstance.php @@ -10,7 +10,7 @@ class ShoppingInstance extends Model protected $fillable = [ - 'identifier', 'user_shop_id', 'subdomain', 'country_id' + 'identifier', 'user_shop_id', 'auth_user_id', 'subdomain', 'country_id' ]; public function user_shop() @@ -23,4 +23,11 @@ class ShoppingInstance extends Model return $this->belongsTo('App\Models\Country', 'country_id'); } + //can null + public function auth_user() + { + return $this->belongsTo('App\User','auth_user_id'); + } + + } diff --git a/app/Models/ShoppingOrder.php b/app/Models/ShoppingOrder.php index a97482e..915b63a 100644 --- a/app/Models/ShoppingOrder.php +++ b/app/Models/ShoppingOrder.php @@ -10,6 +10,7 @@ class ShoppingOrder extends Model protected $fillable = [ 'shopping_user_id', + 'auth_user_id', 'country_id', 'user_shop_id', 'total', @@ -37,6 +38,13 @@ class ShoppingOrder extends Model return $this->belongsTo('App\Models\UserShop','user_shop_id'); } + //can null + public function auth_user() + { + return $this->belongsTo('App\User','auth_user_id'); + } + + public function shopping_order_items(){ return $this->hasMany('App\Models\ShoppingOrderItem', 'shopping_order_id'); } diff --git a/app/Models/UserAccount.php b/app/Models/UserAccount.php index 46b6015..281f99f 100644 --- a/app/Models/UserAccount.php +++ b/app/Models/UserAccount.php @@ -33,6 +33,13 @@ class UserAccount extends Model protected $table = 'user_accounts'; + protected $fillable = [ + 'company', 'salutation', 'first_name', 'last_name', 'address', 'address_2', 'zipcode', 'city', 'country_id', 'pre_phone_id', 'phone', 'pre_mobil_id', 'mobil', + 'tax_number', 'tax_identification_number', 'same_as_billing', + 'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_pre_phone_id', 'shipping_phone', + 'birthday', 'website', 'facebook', 'facebook_fanpage', 'instagram' + ]; + use SoftDeletes; protected $dates = ['deleted_at']; @@ -42,20 +49,14 @@ class UserAccount extends Model return $this->hasOne('App\User', 'account_id'); } - - public function company_country() - { - return $this->belongsTo('App\Models\Country', 'company_country_id'); - } - public function country() { return $this->belongsTo('App\Models\Country', 'country_id'); } - public function company_pre_phone() + public function shipping_country() { - return $this->belongsTo('App\Models\Country', 'company_pre_phone_id'); + return $this->belongsTo('App\Models\Country', 'shipping_country_id'); } public function pre_phone() @@ -68,12 +69,9 @@ class UserAccount extends Model return $this->belongsTo('App\Models\Country', 'pre_mobil_id'); } - public function getCompanyAttribute(){ - - if(empty($this->attributes['company']) && @$this->attributes['company'] !== 0){ - return 1; - } - return $this->attributes['company']; + public function shipping_pre_phone() + { + return $this->belongsTo('App\Models\Country', 'shipping_pre_phone_id'); } public function getBirthdayAttribute($value) @@ -84,13 +82,16 @@ class UserAccount extends Model return Carbon::parse($value)->format(\Util::formatDateDB()); } - public function setBirthdayAttribute( $value ) { - $this->attributes['birthday'] = (new Carbon($value))->format('Y-m-d'); + $this->attributes['birthday'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL; } public function getDataProtectionFormat(){ if(!$this->attributes['data_protection']){ return ""; } return Carbon::parse($this->attributes['data_protection'])->format(\Util::formatDateTimeDB()); } + + + + } diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index afe1fc0..234fefa 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -18,7 +18,7 @@ class UserRepository extends BaseRepository { public function update($data) { - if($data['user_id'] == "new"){ + if($data['user_id'] == "new" || $data['user_id'] == 0){ $this->model = User::create([ 'email' => $data['email'], @@ -35,44 +35,9 @@ class UserRepository extends BaseRepository { $account = $this->model->account; } - $account->company = $data['company']; + $data['same_as_billing'] = !isset($data['same_as_billing']) ? 0 : 1; - $account->company_name = $data['company_name']; - - $account->company_street = $data['company_street']; - $account->company_postal_code = $data['company_postal_code']; - $account->company_city = $data['company_city']; - $account->company_country_id = isset($data['company_country_id']) ? $data['company_country_id'] : null; - $account->company_pre_phone_id = isset($data['company_pre_phone_id']) ? $data['company_pre_phone_id']: null; - $account->company_phone = $data['company_phone']; - $account->company_homepage = $data['company_homepage']; - - $account->salutation = $data['salutation']; - $account->title = $data['title']; - $account->first_name = $data['first_name']; - $account->last_name = $data['last_name']; - - $account->street = $data['street']; - $account->postal_code = $data['postal_code']; - $account->city = $data['city']; - $account->country_id = isset($data['country_id']) ? $data['country_id'] : null; - - $account->pre_phone_id = isset($data['pre_phone_id']) ? $data['pre_phone_id']: null; - $account->phone = $data['phone']; - - $account->pre_mobil_id = isset($data['pre_mobil_id']) ? $data['pre_mobil_id']: null; - $account->mobil = $data['mobil']; - - $account->birthday = $data['birthday']; - $account->website = $data['website']; - $account->instagram = $data['instagram']; - $account->facebook = $data['facebook']; - $account->facebook_fanpage = $data['facebook_fanpage']; - - //data_protection - //active_date - //active - $account->save(); + $account->fill($data)->save(); if(!$this->model->account_id){ $this->model->account_id = $account->id; diff --git a/app/Services/Util.php b/app/Services/Util.php index 554fdb0..d5ec49c 100644 --- a/app/Services/Util.php +++ b/app/Services/Util.php @@ -52,6 +52,15 @@ class Util return false; } + public static function getAuthUser(){ + if(\Session::has('auth_user')){ + if($auth_user = \Session::get('auth_user')){ + return $auth_user; + } + } + return false; + } + public static function addRoute($p = []){ $b = []; @@ -73,11 +82,11 @@ class Util return false; } - public static function getUserShopBackUrl(){ + public static function getUserShopBackUrl($reference = ""){ if(\Session::has('user_shop')){ if($user_shop = \Session::get('user_shop')){ - return 'http://'.$user_shop->slug.".".Config('app.domain')."/back/to/shop"; + return 'http://'.$user_shop->slug.".".Config('app.domain')."/back/to/shop/".$reference; } } return url("/"); diff --git a/app/Services/Yard.php b/app/Services/Yard.php index 5f936e7..77d17b1 100644 --- a/app/Services/Yard.php +++ b/app/Services/Yard.php @@ -12,7 +12,7 @@ use Illuminate\Support\Collection; class Yard extends Cart { private $shipping = 0; - private $shipping_country_id = 7; //default de + private $shipping_country_id = 0; //default de private $ysession; private $yinstance; @@ -30,9 +30,13 @@ class Yard extends Cart parent::__construct($session, $events); + if($this->shipping_country_id == 0){ + $shippingCountry = ShippingCountry::first(); + $this->shipping_country_id = $shippingCountry->id; + + } if($this->shipping == 0){ self::instance('shopping')->setShippingCountryWithPrice($this->shipping_country_id); - } } @@ -90,10 +94,12 @@ class Yard extends Cart if($shipping_country_id > 0){ $shippingCountry = ShippingCountry::find($shipping_country_id); $shipping = $shippingCountry->shipping; - if($this->weight()){ - //blance by weigt + if($this->weight() == 0){ + $price = $shipping->prices->first(); + $price->price = 0; + }else{ + $price = $shipping->prices->first(); } - $price = $shipping->prices->first(); if($price){ $this->shipping = floatval($price->price); $this->putShippingExtra('shipping_price', $this->shipping); diff --git a/app/User.php b/app/User.php index bfd118d..3ad865c 100755 --- a/app/User.php +++ b/app/User.php @@ -150,6 +150,20 @@ class User extends Authenticatable return false; } + /** + * @return bool + */ + public function showSideNav() + { + if($this->active == 1 && $this->blocked == 0 && $this->wizard >= 10){ + return true; + } + return false; + } + + + + /** * @return string */ @@ -174,6 +188,18 @@ class User extends Authenticatable return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB()); } + public function getPaymentAccountDateFormat(){ + if(!$this->attributes['payment_account']){ return ""; } + return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB()); + } + + public function getPaymentShopDateFormat(){ + if(!$this->attributes['payment_shop']){ return ""; } + return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateTimeDB()); + } + + + /** * @return string */ diff --git a/config/auth.php b/config/auth.php index 7817501..4345b95 100755 --- a/config/auth.php +++ b/config/auth.php @@ -14,7 +14,7 @@ return [ */ 'defaults' => [ - 'guard' => 'web', + 'guard' => 'user', 'passwords' => 'users', ], @@ -36,7 +36,7 @@ return [ */ 'guards' => [ - 'web' => [ + 'user' => [ 'driver' => 'session', 'provider' => 'users', ], diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 66d1d30..91013ef 100755 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -31,12 +31,19 @@ class CreateUsersTable extends Migration $table->dateTime('agreement')->nullable(); $table->boolean('admin')->default(false); + $table->boolean('wizard')->default(false); + $table->boolean('blocked')->default(false); + + $table->char('lang', 2)->index(); $table->text('notes')->nullable(); $table->rememberToken(); $table->timestamp('last_login')->nullable(); + $table->timestamp('payment_account')->nullable(); + $table->timestamp('payment_shop')->nullable(); + $table->timestamps(); $table->softDeletes(); diff --git a/database/migrations/2018_09_29_170559_create_user_accounts_table.php b/database/migrations/2018_09_29_170559_create_user_accounts_table.php deleted file mode 100644 index c726f4b..0000000 --- a/database/migrations/2018_09_29_170559_create_user_accounts_table.php +++ /dev/null @@ -1,67 +0,0 @@ -increments('id'); - - $table->boolean('company')->default(true); - - $table->string('company_name')->nullable()->index(); - $table->string('company_street')->nullable(); - $table->string('company_postal_code')->nullable(); - $table->string('company_city')->nullable(); - $table->unsignedInteger('company_pre_phone_id')->nullable(); - $table->string('company_phone')->nullable(); - $table->string('company_homepage')->nullable(); - $table->unsignedInteger('company_country_id')->nullable()->index(); - - $table->char('salutation', 2)->nullable(); - $table->string('title')->nullable(); - $table->string('first_name')->nullable(); - $table->string('last_name')->nullable(); - $table->string('street')->nullable(); - $table->string('postal_code')->nullable(); - $table->string('city')->nullable(); - - $table->unsignedInteger('country_id')->nullable()->index(); - - $table->unsignedInteger('pre_phone_id')->nullable(); - $table->string('phone')->nullable(); - - $table->unsignedInteger('pre_mobil_id')->nullable(); - $table->string('mobil')->nullable(); - - $table->date('birthday')->nullable(); - $table->string('website')->nullable(); - $table->string('facebook')->nullable(); - $table->string('facebook_fanpage')->nullable(); - $table->string('instagram')->nullable(); - $table->timestamp('data_protection')->nullable(); - $table->timestamps(); - $table->softDeletes(); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('accounts'); - } -} diff --git a/database/migrations/2018_10_21_164001_create_products_table.php b/database/migrations/2018_10_21_164001_create_products_table.php index ac7909a..e424d69 100644 --- a/database/migrations/2018_10_21_164001_create_products_table.php +++ b/database/migrations/2018_10_21_164001_create_products_table.php @@ -52,6 +52,10 @@ class CreateProductsTable extends Migration $table->unsignedInteger('amount')->nullable(); //for shop + $table->tinyInteger('show_at')->unsigned()->nullable()->default(0); + $table->string('action')->nullable(); + + $table->timestamps(); $table->softDeletes(); diff --git a/database/migrations/2019_02_21_195012_create_shopping_instances_table.php b/database/migrations/2019_02_21_195012_create_shopping_instances_table.php index 15e031b..c968f03 100644 --- a/database/migrations/2019_02_21_195012_create_shopping_instances_table.php +++ b/database/migrations/2019_02_21_195012_create_shopping_instances_table.php @@ -16,6 +16,7 @@ class CreateShoppingInstancesTable extends Migration Schema::create('shopping_instances', function (Blueprint $table) { $table->string('identifier')->unique()->index(); $table->unsignedInteger('user_shop_id'); + $table->unsignedInteger('auth_user_id'); $table->unsignedInteger('country_id'); $table->string('subdomain'); diff --git a/database/migrations/2019_02_23_161530_create_shopping_users_table.php b/database/migrations/2019_02_23_161530_create_shopping_users_table.php index f928ba5..2f52705 100644 --- a/database/migrations/2019_02_23_161530_create_shopping_users_table.php +++ b/database/migrations/2019_02_23_161530_create_shopping_users_table.php @@ -16,6 +16,8 @@ class CreateShoppingUsersTable extends Migration Schema::create('shopping_users', function (Blueprint $table) { $table->increments('id'); + $table->unsignedInteger('auth_user_id'); + $table->char('billing_salutation', 2)->nullable(); $table->string('billing_company')->nullable(); $table->string('billing_firstname')->nullable(); diff --git a/database/migrations/2019_02_23_163527_create_shopping_orders_table.php b/database/migrations/2019_02_23_163527_create_shopping_orders_table.php index 97e9a2a..a90c438 100644 --- a/database/migrations/2019_02_23_163527_create_shopping_orders_table.php +++ b/database/migrations/2019_02_23_163527_create_shopping_orders_table.php @@ -17,6 +17,8 @@ class CreateShoppingOrdersTable extends Migration $table->increments('id'); $table->unsignedInteger('shopping_user_id'); + $table->unsignedInteger('auth_user_id'); + $table->unsignedInteger('country_id'); $table->unsignedInteger('user_shop_id'); diff --git a/database/migrations/2019_02_29_170559_create_user_accounts_table.php b/database/migrations/2019_02_29_170559_create_user_accounts_table.php new file mode 100644 index 0000000..f7b1cc0 --- /dev/null +++ b/database/migrations/2019_02_29_170559_create_user_accounts_table.php @@ -0,0 +1,88 @@ +increments('id'); + + + $table->string('company')->nullable(); + $table->char('salutation', 2)->nullable(); + $table->string('first_name')->nullable(); + $table->string('last_name')->nullable(); + $table->string('address')->nullable(); + $table->string('address_2')->nullable(); + $table->string('zipcode', 10)->nullable(); + $table->string('city')->nullable(); + + $table->unsignedInteger('country_id')->index()->default(1); + + $table->unsignedInteger('pre_phone_id')->nullable(); + $table->string('phone')->nullable(); + $table->unsignedInteger('pre_mobil_id')->nullable(); + $table->string('mobil')->nullable(); + + $table->string('tax_number', 20)->nullable(); + $table->string('tax_identification_number', 20)->nullable(); + + + $table->boolean('same_as_billing')->default(true); + + $table->char('shipping_salutation', 2)->nullable(); + $table->string('shipping_company')->nullable(); + $table->string('shipping_firstname')->nullable(); + $table->string('shipping_lastname')->nullable(); + $table->string('shipping_address')->nullable(); + $table->string('shipping_address_2')->nullable(); + $table->string('shipping_zipcode')->nullable(); + $table->string('shipping_city')->nullable(); + + $table->unsignedInteger('shipping_country_id')->default(1); + + $table->unsignedInteger('shipping_pre_phone_id')->nullable(); + $table->string('shipping_phone')->nullable(); + + $table->date('birthday')->nullable(); + $table->string('website')->nullable(); + $table->string('facebook')->nullable(); + $table->string('facebook_fanpage')->nullable(); + $table->string('instagram')->nullable(); + + $table->timestamp('data_protection')->nullable(); + + $table->timestamps(); + $table->softDeletes(); + + + $table->foreign('country_id') + ->references('id') + ->on('countries'); + + $table->foreign('shipping_country_id') + ->references('id') + ->on('countries'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_accounts'); + } +} diff --git a/public/css/application.css b/public/css/application.css index e69de29..1a94640 100644 --- a/public/css/application.css +++ b/public/css/application.css @@ -0,0 +1,4 @@ + +.alert ul { + margin-bottom: 0; +} \ No newline at end of file diff --git a/resources/lang/de.json b/resources/lang/de.json index e0f5f6f..ba5b3e3 100755 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -43,6 +43,7 @@ "Reset Password": "Passwort zur\u00fccksetzen", "Send Password Reset Link": "Link zum Zur\u00fccksetzen des Passworts senden", "save": "speichern", + "save and next": "speichern und weiter", "save changes": "\u00c4nderungen speichern", "abort": "abbrechen", "This field is required.": "Dieses Feld ist ein Pflichtfeld.", @@ -82,7 +83,7 @@ "Here you can adjust your data.": "Hier k\u00f6nnen Sie Ihre Daten anpassen.", "Overview": "\u00dcbersicht", "Adjust data": "Daten anpassen", - "Login & Security": "Anmeldung & Sicherheit", + "Data, Login & Security": "Daten, Anmeldung & Sicherheit", "Sign in with your e-mail:": "Anmeldung mit Ihrer E-Mail:", "Change your password here to access your account.": "\u00c4ndern Sie hier Ihr Passwort f\u00fcr den Zugriff auf Ihren Account.", "Activities": "Aktivit\u00e4ten", diff --git a/resources/views/admin/lead_edit.blade.php b/resources/views/admin/lead_edit.blade.php index 4d0cca8..dc58da6 100644 --- a/resources/views/admin/lead_edit.blade.php +++ b/resources/views/admin/lead_edit.blade.php @@ -17,26 +17,26 @@ @endif

- {{ __('Create/Edit Contact') }} + @if(!$user->id || $user->id == 'new') + {{ __('Neuen Berater erstellen') }} + @else + {{ __('Berater bearbeiten') }} + @endif

{!! Form::open(['url' => route('admin_lead_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!} - - - @include('user.form') - - @if(!$user->id || $user->id == 'new') - @include('user.data_verify') - @endif - + @if(!$user->id || $user->id == 'new') + @include('user.user_new_form') + @include('user.data_verify') + @else + @include('user.user_form') + @endif
-   - +   {{ __('abort') }}
- {!! Form::close() !!} diff --git a/resources/views/admin/leads.blade.php b/resources/views/admin/leads.blade.php index e868565..5570b56 100644 --- a/resources/views/admin/leads.blade.php +++ b/resources/views/admin/leads.blade.php @@ -4,13 +4,13 @@

- {{ __('Contacts') }} + {{ __('Berater') }}

@@ -62,44 +62,3 @@ @endsection - - - -*/?> - diff --git a/resources/views/admin/product/form.blade.php b/resources/views/admin/product/form.blade.php index 1c985d9..43e6f45 100755 --- a/resources/views/admin/product/form.blade.php +++ b/resources/views/admin/product/form.blade.php @@ -16,12 +16,21 @@ {{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }} +
+
+ + {{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }} -
- - {{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }} +
+ +
+ + {{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }} + +
+
@@ -39,6 +48,12 @@ {{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Leistungen'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
+ +
+ + {{ Form::select('action[]', $product->actions, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }} + +
diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 61b4777..6339cf1 100755 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -15,60 +15,33 @@ @endif - - -
-

{{ __('Your Data') }}

- - @if($user->active == 0) -

{{__('If you have checked your data, share your data here!')}}

- -
- -
- {!! Form::open(['url' => route('user_data_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!} - - - - @include('user.form') - @if(!$user->account->data_protection) - @include('user.data_confirm') - @endif - -
-   -
- {!! Form::close() !!} -
-
- - @else - {{ __('Adjust data') }} - @endif - -
- @if($user->active == 1 && !$user->user_shop) + @if($user->active == 1)

{{__('Your Shop') }}

- @if($user->shop) -

- {{__('open since')}} {{__('at')}} {{ $user->shop->getActiveDateFormat() }}

- @if($user->shop->active) -

- {{__('Status')}} {{ __('active') }}

- @else -

- {{__('Status')}} {{ __('inactive') }}

- @endif - {{__('settings your shop')}} - @else - {{__('open your shop')}} + @if($user->payment_shop) + @if($user->shop) +

+ {{__('open since')}} {{__('at')}} {{ $user->shop->getActiveDateFormat() }}

+ @if($user->shop->active) +

+ {{__('Status')}} {{ __('active') }}

+ @else +

+ {{__('Status')}} {{ __('inactive') }}

+ @endif + {{__('settings your shop')}} + + @else + {{__('open your shop')}} + @endif + @else +

+ {{__('Shop nicht gebucht')}}

@endif +
@endif @@ -76,38 +49,56 @@

{{__('Activities') }}

+ @if($user->payment_account ) +

+ {{__('Account aktiv')}} {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}

+ @else +

+ {{__('Account inaktiv')}}

+ @endif + + @if($user->payment_shop) +

+ {{__('Shop aktiv')}} {{__('bis zum')}}: {{ $user->getPaymentShopDateFormat() }}

+ @else +

+ {{__('Shop inaktiv')}}

+ @endif +
+ + @if($user->active == 1)

- {{__('Data released')}} {{__('at')}} {{ $user->getActiveDateFormat() }}

- @endif - @if($user->confirmed == 1) -

- {{__('E-Mail verified')}} {{__('at')}} {{ $user->getConfirmationDateFormat() }}

+ {{__('Daten vervollständigt')}} {{__('at')}}: {{ $user->getActiveDateFormat() }}

@endif + @if($user->account_id) - @if($user->account->data_protection) -

- {{__('Privacy policy approved')}} {{__('at')}} {{ $user->account->getDataProtectionFormat() }} -

- @endif + @if($user->active == 1) @if($user->agreement)

- {{__('Einverständniserklärung')}} {{__('at')}} {{ $user->getAgreementFormat() }} + {{__('Einverständniserklärung')}} {{__('at')}}: {{ $user->getAgreementFormat() }}

@else

{{__('Einverständniserklärung')}} {{ __('nicht akzeptiert') }}

- @endif @endif + @if($user->account->data_protection) +

+ {{__('Privacy policy approved')}} {{__('at')}}: {{ $user->account->getDataProtectionFormat() }} +

+ @endif + @endif + @if($user->confirmed == 1) +

+ {{__('E-Mail verified')}} {{__('at')}}: {{ $user->getConfirmationDateFormat() }}

@endif
@if($user->active == 1) - -
+ {{--

{{ __('Einwilligung & Datenschutz') }}

{!! Form::open(['url' => route('user_data_accepted_form'), 'class' => 'form-horizontal' , 'id'=>'data-privacy-form-validations']) !!} @@ -128,12 +119,16 @@ {!! Form::close() !!}
+ --}}
-

{{__('Login & Security') }}

+

{{__('Data, Login & Security') }}

{{__('Sign in with your e-mail:')}} {{ Auth::user()->email }}

+ {{ __('Adjust data') }} + {{__('Change E-Mail')}} +

@if(!$user->isPasswort())

{{__('Assign a password for your account.')}}

{{__('Create Password')}} @@ -141,9 +136,7 @@

{{__('Change your password here to access your account.')}}

{{__('Change password')}} @endif - {{__('Change E-Mail')}}
- @endif
@@ -152,11 +145,13 @@   {{ __('Logout') }}
-
+ {{-- +

{{__('Delete') }}

{{__('If you no longer want to use our offer, you can delete your account here.')}}

{{__('Delete Account')}}
+ --}} @endsection diff --git a/resources/views/layouts/application.blade.php b/resources/views/layouts/application.blade.php index c7bdc95..6c80da3 100755 --- a/resources/views/layouts/application.blade.php +++ b/resources/views/layouts/application.blade.php @@ -36,8 +36,8 @@ - + @@ -110,7 +110,6 @@ - @@ -135,6 +134,22 @@ + function _scrollTo(to, offset) { - - \ No newline at end of file diff --git a/resources/views/layouts/includes/layout-sidenav.blade.php b/resources/views/layouts/includes/layout-sidenav.blade.php index 7b403d9..cec0db9 100755 --- a/resources/views/layouts/includes/layout-sidenav.blade.php +++ b/resources/views/layouts/includes/layout-sidenav.blade.php @@ -12,16 +12,14 @@
{{__('Home')}}
- @if(Auth::user()->active == 1) - -
  • -
    {{ __('Your Data') }}
    -
  • + @if(Auth::user()->showSideNav()) +
  • +
    {{ __('Your Data') }}
    +
  • {{ __('Your Shop') }}
  • - @endif @if(Auth::user()->isAdmin()) @@ -48,7 +46,7 @@
  • -
    {{ __('Leads') }}
    +
    {{ __('Berater') }}
  • diff --git a/resources/views/status/user_blocked.blade.php b/resources/views/status/user_blocked.blade.php new file mode 100755 index 0000000..543d20a --- /dev/null +++ b/resources/views/status/user_blocked.blade.php @@ -0,0 +1,36 @@ +@extends('layouts.layout-2') + +@section('content') +
    +
    + + +
    +
    + +
    + + + +
    + +

    {{ __('Dein Account wurde gespeert') }}

    + + {{ __('Logout') }} + +
    +
    + + +
    +
    + +@endsection + diff --git a/resources/views/user/components/user_shop_register.blade.php b/resources/views/user/components/user_shop_register.blade.php index f850ca1..8d5c577 100644 --- a/resources/views/user/components/user_shop_register.blade.php +++ b/resources/views/user/components/user_shop_register.blade.php @@ -66,3 +66,95 @@ {!! Form::close() !!}
    + + diff --git a/resources/views/user/data_confirm.blade.php b/resources/views/user/data_confirm.blade.php index dfddad0..411a47f 100644 --- a/resources/views/user/data_confirm.blade.php +++ b/resources/views/user/data_confirm.blade.php @@ -5,16 +5,62 @@
    -
    \ No newline at end of file + + + + diff --git a/resources/views/user/data_verify.blade.php b/resources/views/user/data_verify.blade.php index 3bc8a30..bba19c0 100644 --- a/resources/views/user/data_verify.blade.php +++ b/resources/views/user/data_verify.blade.php @@ -1,12 +1,12 @@
    - {{ __('Kontakt verifizieren') }} + {{ __('Berater einladen') }}
    diff --git a/resources/views/user/edit.blade.php b/resources/views/user/edit.blade.php index 9a148cf..e3e50d2 100644 --- a/resources/views/user/edit.blade.php +++ b/resources/views/user/edit.blade.php @@ -20,11 +20,9 @@ {{ __('Your Data') }} - {!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!} - - @include('user.form') + @include('user.form')
      diff --git a/resources/views/user/form.blade.php b/resources/views/user/form.blade.php index 488d21c..9a3ca1f 100644 --- a/resources/views/user/form.blade.php +++ b/resources/views/user/form.blade.php @@ -1,89 +1,11 @@
    - {{ __('use') }} -
    -
    -
    - - - @if ($errors->has('company')) - - {{ $errors->first('company') }} - - @endif -
    -
    -
    -
    -
    - {{ __('Company data') }} -
    -
    -
    - - {{ Form::text('company_name', $user->account->company_name, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }} -
    - -
    - - {{ Form::text('company_street', $user->account->company_street, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }} - -
    - -
    -
    - - {{ Form::text('company_postal_code', $user->account->company_postal_code, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }} - -
    -
    - - {{ Form::text('company_city', $user->account->company_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }} - -
    -
    - - - @if ($errors->has('company_country_id')) - - {{ $errors->first('company_country_id') }} - - @endif -
    -
    - -
    -
    - - -
    - -
    - - {{ Form::text('company_phone', $user->account->company_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }} -
    -
    -
    - - {{ Form::text('company_homepage', $user->account->company_homepage, array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }} -
    - -
    -
    - - -
    -
    - {{ __('Personal Data') }} + {{ __('Rechnungsdaten') }}
    + +
    + {!! HTMLHelper::getCompanyOptions($user->account->company) !!} + + @if ($errors->has('company')) + + {{ $errors->first('company') }} + + @endif +
    +
    + {{ __('Company data') }} +
    +
    +
    + + {{ Form::text('company_name', $user->account->company_name, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }} +
    + +
    + + {{ Form::text('company_street', $user->account->company_street, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }} + +
    + +
    +
    + + {{ Form::text('company_postal_code', $user->account->company_postal_code, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }} + +
    +
    + + {{ Form::text('company_city', $user->account->company_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }} + +
    +
    + + + @if ($errors->has('company_country_id')) + + {{ $errors->first('company_country_id') }} + + @endif +
    +
    + +
    +
    + + +
    + +
    + + {{ Form::text('company_phone', $user->account->company_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }} +
    +
    +
    + + {{ Form::text('company_homepage', $user->account->company_homepage, array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }} +
    + +
    +
    + +
    {{ __('weiteres') }}
    @@ -222,17 +221,17 @@
    - + {{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
    - + {{ Form::text('website', $user->account->website, array('placeholder'=>__('website'), 'class'=>'form-control', 'id'=>'website')) }}
    - + {{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
    @@ -241,12 +240,12 @@
    - + {{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
    - + {{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('facebook_fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
    diff --git a/resources/views/user/update_password_first_form.blade.php b/resources/views/user/update_password_first_form.blade.php new file mode 100644 index 0000000..2449bc0 --- /dev/null +++ b/resources/views/user/update_password_first_form.blade.php @@ -0,0 +1,30 @@ + +
    +
    + {{__('Create Password')}} +
    +
    +
    + +
    + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
    +
    +
    + +
    + has('password_confirmation') ? 'is-invalid' : '' }} type="password" name="password_confirmation" placeholder="{{__('Confirm new Password')}}*" required> + @if ($errors->has('password_confirmation')) + + {{ $errors->first('password_confirmation') }} + + @endif +
    +
    +
    +
    \ No newline at end of file diff --git a/resources/views/user/user_form.blade.php b/resources/views/user/user_form.blade.php new file mode 100644 index 0000000..db857ff --- /dev/null +++ b/resources/views/user/user_form.blade.php @@ -0,0 +1,458 @@ +
    +
    + {{ __('Rechnungsdaten') }} +
    +
    + +
    +
    + + {{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }} +
    +
    +
    + +
    + + + @if ($errors->has('salutation')) + + {{ $errors->first('salutation') }} + + @endif +
    + +
    + + {{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }} + @if ($errors->has('first_name')) + + {{ $errors->first('first_name') }} + + @endif + +
    +
    + + {{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }} + @if ($errors->has('last_name')) + + {{ $errors->first('last_name') }} + + @endif + +
    +
    +
    + + {{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'address', 'tabindex' => 6)) }} + @if ($errors->has('address')) + + {{ $errors->first('address') }} + + @endif +
    +
    + + {{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }} +
    +
    +
    + + {{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'zipcode', 'tabindex' => 7)) }} + @if ($errors->has('zipcode')) + + {{ $errors->first('zipcode') }} + + @endif + +
    +
    + + {{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'city', 'tabindex' => 8)) }} + @if ($errors->has('city')) + + {{ $errors->first('city') }} + + @endif +
    +
    + + + @if ($errors->has('country_id')) + + {{ $errors->first('country_id') }} + + @endif +
    +
    + +
    +
    + + +
    +
    + + {{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }} +
    +
    +
    +
    + + +
    + +
    + + {{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }} +
    +
    + @if(!isset($step)) +
    + + @if($user->email) +
    +
    + + {{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 14)) }} +
    +
    + + {{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 15)) }} +
    +
    + @if(isset($can_change_mail)) + @if(count($user->user_update_email) > 0) +

    {{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}


    + @endif + {{ __('Contact') }} {{__('Change E-Mail')}} + @else + {{__('Change E-Mail')}} + @endif + @else +
    +
    + + {{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 14)) }} +
    +
    + + {{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 15)) }} +
    +
    + + @endif + @endif +
    +
    + +
    +
    +
    +
    + + {{ Form::text('tax_number', $user->account->tax_number, array('placeholder'=>__('Steuernummer'), 'class'=>'form-control', 'id'=>'tax_number')) }} +
    +
    + + {{ Form::text(' tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('USt-ID Nummer'), 'class'=>'form-control', 'id'=>' tax_identification_number')) }} +
    +
    +
    + +
    +
    +
    + +
    +
    + {{ __('Versand Adresse') }} +
    +
    + +
    +
    + + {{ Form::text('shipping_company', $user->account->shipping_company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'shipping_company', 'tabindex' => 16)) }} +
    +
    +
    +
    + + + @if ($errors->has('shipping_salutation')) + + {{ $errors->first('shipping_salutation') }} + + @endif +
    + +
    + + {{ Form::text('shipping_firstname', $user->account->shipping_firstname, array('placeholder'=>__('First name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_firstname', 'tabindex' => 18)) }} + @if ($errors->has('shipping_firstname')) + + {{ $errors->first('shipping_firstname') }} + + @endif + +
    +
    + + {{ Form::text('shipping_lastname', $user->account->shipping_lastname, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_lastname', 'tabindex' => 19)) }} + @if ($errors->has('shipping_lastname')) + + {{ $errors->first('shipping_lastname') }} + + @endif + +
    +
    +
    + + {{ Form::text('shipping_address', $user->account->shipping_address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_address', 'tabindex' => 20)) }} + @if ($errors->has('shipping_address')) + + {{ $errors->first('shipping_address') }} + + @endif +
    +
    + + {{ Form::text('shipping_address_2', $user->account->shipping_address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'shipping_address_2', 'tabindex' => 21)) }} + @if ($errors->has('shipping_address_2')) + + {{ $errors->first('shipping_address_2') }} + + @endif +
    +
    +
    + + {{ Form::text('shipping_zipcode', $user->account->shipping_zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_zipcode', 'tabindex' => 22)) }} + @if ($errors->has('shipping_zipcode')) + + {{ $errors->first('shipping_zipcode') }} + + @endif + +
    +
    + + {{ Form::text('shipping_city', $user->account->shipping_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_city', 'tabindex' => 23)) }} + @if ($errors->has('shipping_city')) + + {{ $errors->first('shipping_city') }} + + @endif +
    +
    + + + @if ($errors->has('shipping_country_id')) + + {{ $errors->first('shipping_country_id') }} + + @endif +
    +
    +
    +
    + + +
    +
    + + {{ Form::text('shipping_phone', $user->account->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }} +
    +
    + +
    +
    + +
    +
    + {{ __('weiteres') }} +
    +
    +
    +
    + + {{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }} +
    +
    + + {{ Form::text('website', $user->account->website, array('placeholder'=>__('Webseite'), 'class'=>'form-control', 'id'=>'website')) }} + +
    +
    + + {{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('Instagram'), 'class'=>'form-control', 'id'=>'instagram')) }} + +
    +
    +
    +
    + + {{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('Facebook'), 'class'=>'form-control', 'id'=>'facebook')) }} + +
    +
    + + {{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('Facebook Fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }} + +
    + +
    +
    +
    + + diff --git a/resources/views/user/user_new_form.blade.php b/resources/views/user/user_new_form.blade.php new file mode 100644 index 0000000..bcb176e --- /dev/null +++ b/resources/views/user/user_new_form.blade.php @@ -0,0 +1,254 @@ +
    +
    + {{ __('Rechnungsdaten') }} +
    +
    + +
    +
    + + {{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }} +
    +
    +
    + +
    + + + @if ($errors->has('salutation')) + + {{ $errors->first('salutation') }} + + @endif +
    + +
    + + {{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }} + @if ($errors->has('first_name')) + + {{ $errors->first('first_name') }} + + @endif + +
    +
    + + {{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }} + @if ($errors->has('last_name')) + + {{ $errors->first('last_name') }} + + @endif + +
    +
    +
    + + {{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'address', 'tabindex' => 6)) }} + @if ($errors->has('address')) + + {{ $errors->first('address') }} + + @endif +
    +
    + + {{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }} +
    +
    +
    + + {{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'zipcode', 'tabindex' => 7)) }} + @if ($errors->has('zipcode')) + + {{ $errors->first('zipcode') }} + + @endif + +
    +
    + + {{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'city', 'tabindex' => 8)) }} + @if ($errors->has('city')) + + {{ $errors->first('city') }} + + @endif +
    +
    + + + @if ($errors->has('country_id')) + + {{ $errors->first('country_id') }} + + @endif +
    +
    + +
    +
    + + +
    +
    + + {{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }} +
    +
    +
    +
    + + +
    + +
    + + {{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }} +
    +
    +
    +
    + + {{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'required'=>true, 'id'=>'email', 'tabindex' => 14)) }} +
    +
    + + {{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'required'=>true, 'id'=>'email-confirm', 'tabindex' => 15)) }} +
    +
    +
    +
    +{{ Form::hidden('same_as_billing', 1) }} + + diff --git a/resources/views/user/wizard/show.blade.php b/resources/views/user/wizard/show.blade.php new file mode 100644 index 0000000..d3915a2 --- /dev/null +++ b/resources/views/user/wizard/show.blade.php @@ -0,0 +1,188 @@ +@extends('layouts.layout-2') + +@section('content') + + @if ($errors->any()) +
    +
    +
    +
      + @foreach ($errors->all() as $error) +
    • {{ $error }}
    • + @endforeach +
    +
    +
    +
    + @endif + +

    + {{ __('Registrierung abschließen') }} +

    + +
    + + +
    +
    +
    + {!! Form::open(['url' => route('wizard_store', [0]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!} + @include('user.data_confirm') +
    +   +
    + {!! Form::close() !!} +
    +
    +
    +
    + @if(!$user->isPasswort()) + {!! Form::open(['url' => route('wizard_store', [1])]) !!} + @include('user.update_password_first_form') +
    +   +
    + {!! Form::close() !!} + @else + {!! Form::open(['url' => route('wizard_store', [1])]) !!} +

    Passwort wurde bereits erstellt.

    +   + {!! Form::close() !!} + @endif +
    +
    +
    +
    + {!! Form::open(['url' => route('wizard_store', [2]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!} + @include('user.user_form') +
    +   +
    + {!! Form::close() !!} +
    +
    +
    +
    + {!! Form::open(['url' => route('wizard_store', [3]), 'class' => 'form-horizontal']) !!} +
    + + +
    + @php($counter = 1) + @foreach($products as $product) +
    + + + + + @php($counter++) + + @endforeach + + +
    + + +
    + @if(count($product->images)) + + @endif +
    +
    {{$product->name}}
    + {!! $product->getLang('copy') !!} +
    +
    +
    {{$product->getFormattedPrice()}} EUR / p.a.
    +
    +
    +   +

    + Sie werden auf unseren checkout Server weitergeletet, die Verbindung ist mit SSL verschlüsselt. +
    + {!! Form::close() !!} +
    +
    +
    +
    +

    Vielen Dank,

    +

    Deine Registrierung ist abgeschlossen!

    +

    Sobald die Zahlung bei uns eingegangen ist, erhälst du automatisch eine E-Mail und dein Account wird freigeschaltet.

    +
    +
    +
    +
    + + + + + +@endsection diff --git a/resources/views/web/templates/checkout.blade.php b/resources/views/web/templates/checkout.blade.php index 522876a..60f328e 100644 --- a/resources/views/web/templates/checkout.blade.php +++ b/resources/views/web/templates/checkout.blade.php @@ -99,35 +99,9 @@ } - - - +
    - {{-- @if ($errors->any()) -
    -
    -
    -
      - @foreach ($errors->all() as $error) -
    • {{ $error }}
    • - @endforeach -
    -
    -
    -
    - @endif - --}} - {{-- - - - - --}} - @if ($errors->any())
    @@ -158,9 +132,6 @@
    @endif - - -
    {!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'']) !!}
    @@ -317,7 +288,7 @@
    - {!! Form::text('shipping_company', $shopping_user->shipping_company, ['class' => 'form-control', 'id'=>'billing_company']) !!} + {!! Form::text('shipping_company', $shopping_user->shipping_company, ['class' => 'form-control', 'id'=>'shipping_company']) !!}
    diff --git a/resources/views/web/user/layouts/includes/footer.blade.php b/resources/views/web/user/layouts/includes/footer.blade.php index 4156c5a..d800426 100644 --- a/resources/views/web/user/layouts/includes/footer.blade.php +++ b/resources/views/web/user/layouts/includes/footer.blade.php @@ -9,7 +9,7 @@ @if(Util::isCheckout()) @if(isset($order_reference))

    - zurück zum Shop + zurück zum Shop

    @else

    @@ -66,7 +66,7 @@

     

    @if(isset($order_reference)) - + zurück zum Shop @else diff --git a/resources/views/web/user/layouts/includes/header.blade.php b/resources/views/web/user/layouts/includes/header.blade.php index 74a7685..c1c319d 100644 --- a/resources/views/web/user/layouts/includes/header.blade.php +++ b/resources/views/web/user/layouts/includes/header.blade.php @@ -61,7 +61,7 @@ @if(Util::isCheckout()) @if(isset($order_reference)) - @@ -76,7 +76,7 @@