From 2ffc33dcd60fde768737304d9375d254f4b5426c Mon Sep 17 00:00:00 2001 From: Kevin Adametz Date: Fri, 20 Aug 2021 18:22:21 +0200 Subject: [PATCH] Custom Price / Land / User Order Homeparty --- app/Http/Controllers/MembershipController.php | 9 +- .../Controllers/PaymentMethodController.php | 4 +- .../Controllers/Sys/AdminToolsController.php | 24 +- .../Controllers/User/HomepartyController.php | 262 +++++++--- app/Http/Controllers/User/OrderController.php | 74 +-- app/Http/Controllers/UserDataController.php | 4 +- .../Controllers/Web/HomepartyController.php | 2 + app/Http/Controllers/Web/SiteController.php | 16 +- app/Http/Controllers/WizardController.php | 26 +- app/Http/Middleware/Checkout.php | 2 +- app/Models/Homeparty.php | 47 +- app/Models/HomepartyUserOrderItem.php | 24 + app/Models/PaymentMethod.php | 22 + app/Models/Product.php | 107 ++-- app/Models/ShippingCountry.php | 14 + app/Models/ShippingPrice.php | 12 +- app/Models/ShoppingOrderItem.php | 1 - app/Repositories/ProductRepository.php | 2 + app/Repositories/UserRepository.php | 6 +- app/Services/HTMLHelper.php | 2 + app/Services/HomepartyCart.php | 49 +- app/Services/HomepartyUserCart.php | 27 + app/Services/PriceService.php | 29 ++ app/Services/TaxPriceHelper.php | 13 + app/Services/UserService.php | 82 +++ app/Services/Yard.php | 146 +++++- ...018_10_21_164001_create_products_table.php | 5 +- ...2_29_170559_create_user_accounts_table.php | 4 + ...25_131854_create_payment_methods_table.php | 1 + ..._10_15_151059_create_homeparties_table.php | 6 +- public/images/logo_mivita.png | Bin 6874 -> 9194 bytes resources/views/admin/country/form.blade.php | 36 +- resources/views/admin/country/index.blade.php | 2 +- .../admin/payment_method/index.blade.php | 20 +- resources/views/admin/product/form.blade.php | 39 +- resources/views/admin/product/index.blade.php | 4 +- .../views/sys/admin/domain-ssl.blade.php | 57 +- .../views/user/homeparty/_edit.blade.php | 28 +- .../views/user/homeparty/detail.blade.php | 485 ++++++++++++++---- .../views/user/homeparty/guests.blade.php | 26 +- .../views/user/homeparty/index.blade.php | 9 +- .../homeparty/modal_show_products.blade.php | 15 +- .../views/user/homeparty/order.blade.php | 40 +- .../homeparty/self_guest_detail.blade.php | 2 +- .../homeparty/show_calc_bonus_host.blade.php | 69 ++- .../homeparty/show_products_order.blade.php | 64 ++- .../user/homeparty/show_total_order.blade.php | 106 +++- resources/views/user/order/delivery.blade.php | 14 +- resources/views/user/order/list.blade.php | 81 ++- .../views/user/order/shipping_me.blade.php | 23 +- .../views/user/order/shipping_ot.blade.php | 15 +- .../views/user/order/yard_view_form.blade.php | 55 +- .../views/web/templates/checkout.blade.php | 88 +++- routes/web.php | 6 +- 54 files changed, 1794 insertions(+), 512 deletions(-) create mode 100644 app/Services/PriceService.php create mode 100644 app/Services/TaxPriceHelper.php diff --git a/app/Http/Controllers/MembershipController.php b/app/Http/Controllers/MembershipController.php index 65ca030b..4308f61c 100755 --- a/app/Http/Controllers/MembershipController.php +++ b/app/Http/Controllers/MembershipController.php @@ -43,11 +43,10 @@ class MembershipController extends Controller $userHistoryUpgradeOrder = UserHistory::whereUserId($user->id)->whereAction('upgrade_order')->get()->last(); $userHistoryDeleteMembership = UserHistory::whereUserId($user->id)->whereAction('delete_membership')->whereStatus(50)->get()->last(); - $data = [ 'user' => $user, - 'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(), - 'upgrade' => Product::where('active', true)->where('show_at', '=', 4)->where('identifier', 'upgrade')->get(), + 'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(), + 'upgrade' => Product::where('active', true)->whereJsonContains('show_on', '5')->where('identifier', 'upgrade')->get(), 'diff_months' => $diff_months, 'userHistoryPaymentOrder' => $userHistoryPaymentOrder, 'userHistoryUpgradeOrder' => $userHistoryUpgradeOrder, @@ -91,7 +90,7 @@ class MembershipController extends Controller $user->abo_options = true; $user->save(); } - if($product && $product->active && $product->show_at >= 3){ + if($product && $product->active){ $image = ""; if($product->images->count()){ $image = $product->images->first()->slug; @@ -136,7 +135,7 @@ class MembershipController extends Controller \Session()->flash('alert-success', "keine Änderung vorgenommen."); return back(); } - if($product && $product->active && $product->show_at >= 3){ + if($product && $product->active){ $user->payment_order_id = $product->id; $user->save(); UserHistory::create(['user_id' => $user->id, 'action'=>$action, 'status'=>10, 'product_id'=>$product->id]); diff --git a/app/Http/Controllers/PaymentMethodController.php b/app/Http/Controllers/PaymentMethodController.php index c85c4942..fd965e72 100755 --- a/app/Http/Controllers/PaymentMethodController.php +++ b/app/Http/Controllers/PaymentMethodController.php @@ -35,7 +35,7 @@ class PaymentMethodController extends Controller 'name' => $data['name'], 'short' => $data['short'], 'pos' => $data['pos'], - 'show_at' => $data['show_at'], + 'show_on' => isset($data['show_on']) ? $data['show_on'] : null, 'default' => isset($data['default']) ? true : false, 'active' => isset($data['active']) ? true : false, ]); @@ -44,7 +44,7 @@ class PaymentMethodController extends Controller $model->name = $data['name']; $model->short = $data['short']; $model->pos = $data['pos']; - $model->show_at = $data['show_at']; + $model->show_on = isset($data['show_on']) ? $data['show_on'] : null; $model->default = isset($data['default']) ? true : false; $model->active = isset($data['active']) ? true : false; $model->save(); diff --git a/app/Http/Controllers/Sys/AdminToolsController.php b/app/Http/Controllers/Sys/AdminToolsController.php index 93257a46..bc26470e 100755 --- a/app/Http/Controllers/Sys/AdminToolsController.php +++ b/app/Http/Controllers/Sys/AdminToolsController.php @@ -115,14 +115,21 @@ class AdminToolsController extends Controller $user_shops = UserShop::all(); $text = ""; - $kas = new KasController(); + /* $kas = new KasController(); $domain = 'mivita.care'; $ssl = KasSLLController::getApiSSLParameter(); $subdomains = $kas->action('get_subdomains'); foreach ($subdomains as $subdomain){ - $text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']."\n"; + /*if($subdomain['subdomain_name'] === 'bio-aloe.mivita.care'){ + dump($subdomain); + } + if($subdomain['subdomain_name'] === 'rockmyworld-by-conny.mivita.care'){ + dd($subdomain); + }*/ + /* + $text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']." - "; if($subdomain['ssl_certificate_sni'] !== "Y"){ $pra = array( @@ -130,9 +137,18 @@ class AdminToolsController extends Controller ); $pra = array_merge($pra, $ssl); $value = $kas->action('update_ssl', $pra); - $text .= $value."\n"; + $text .= $value; + }else{ + if(isset($subdomain['ssl_certificate_sni_is_active'])){ + $text .= $subdomain['ssl_certificate_sni_is_active'].'-is_active'; + }else{ + $text .= '-CHECK!'; + + } } - } + + $text .= "\n"; + }*/ $data = [ 'values' => $user_shops, 'text' => $text, diff --git a/app/Http/Controllers/User/HomepartyController.php b/app/Http/Controllers/User/HomepartyController.php index 897dc57f..ac2107d5 100755 --- a/app/Http/Controllers/User/HomepartyController.php +++ b/app/Http/Controllers/User/HomepartyController.php @@ -2,25 +2,22 @@ namespace App\Http\Controllers\User; -use App\Http\Controllers\Controller; -use App\Models\Homeparty; -use App\Models\HomepartyUser; -use App\Models\HomepartyUserOrderItem; -use App\Models\Product; -use App\Models\ShippingCountry; -use App\Models\ShoppingInstance; -use App\Models\ShoppingOrder; -use App\Models\ShoppingUser; -use App\Models\UserHistory; -use App\Models\UserShop; -use App\Services\HomepartyCart; -use App\Services\Payment; -use App\Services\Util; -use App\User; use Auth; -use Request; -use Validator; use Yard; +use Request; +use App\User; +use Validator; +use App\Services\Util; +use App\Models\Product; +use App\Models\Homeparty; +use App\Models\UserHistory; +use App\Models\HomepartyUser; +use App\Services\UserService; +use App\Models\ShippingCountry; +use App\Services\HomepartyCart; +use App\Models\ShoppingInstance; +use App\Http\Controllers\Controller; +use App\Models\HomepartyUserOrderItem; class HomepartyController extends Controller @@ -34,18 +31,28 @@ class HomepartyController extends Controller public function index() { $data = [ - 'homepartys' => Homeparty::where('auth_user_id', '=', \Auth::user()->id)->get(), + 'homepartys' => Homeparty::where('auth_user_id', '=', \Auth::user()->id)->orderByDesc('id')->get(), ]; return view('user.homeparty.index', $data); } - public function detail($id) + public function detail($id, $step = false) { if($id === 'new'){ $homeparty = new Homeparty(); + $homeparty->id = 0; + $step = 1; $homeparty->description = "Willkommen zu unserer Auszeitparty rund um das Thema Bio Aloe Vera und Naturkosmetik. Wir informieren Dich darüber, was Premiumqualität bei Naturkosmetik wirklich ausmacht, zeigen Dir viele Anwendungsbeispiele bei Haut- und Darmproblemen und natürlich kannst Du unsere Produkte ausgiebig testen. Wir freuen uns auf Dich!"; }else{ $homeparty = $this->getHomparty($id); + if($homeparty->step < 10){ + $step = $homeparty->step; + }else{ + if(!$step){ + $step = 10; + } + } + } if($homeparty->homeparty_host){ $homeparty_user = $homeparty->homeparty_host; @@ -61,22 +68,43 @@ class HomepartyController extends Controller $data = [ 'homeparty' => $homeparty, 'homeparty_user' => $homeparty_user, + 'step' => $step, ]; return view('user.homeparty.detail', $data); } - public function store($id = null) + public function store($id = null, $step = false) { $data = Request::all(); - if($data['action'] === 'homeparty-party-store'){ + if($data['action'] === 'homeparty-party-store-detail'){ $rules = array( 'date' => 'required', 'name' => 'required', - 'place' => 'required' + 'place' => 'required', + ); + if(!$id){ + $rules = array( + 'date' => 'required', + 'name' => 'required', + 'place' => 'required', + 'country_id' => 'required' + ); + } + } + if($data['action'] === 'homeparty-party-store-address'){ + $rules = array( + 'shipping_firstname' => 'required', + 'shipping_lastname' => 'required', + 'shipping_address' => 'required', + 'shipping_zipcode' => 'required', + 'shipping_city' => 'required', + 'shipping_salutation' => 'required', + 'shipping_country_id' => 'required' ); } - if($data['action'] === 'homeparty-user-store'){ + + if($data['action'] === 'homeparty-party-store-host'){ $rules = array( 'billing_salutation' => 'required', 'billing_firstname' => 'required', @@ -86,25 +114,13 @@ class HomepartyController extends Controller 'billing_city' => 'required', 'billing_country_id' => 'required', ); - if (!Request::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', - 'shipping_country_id' => 'required' - ]); - } } - $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { return back()->withErrors($validator)->withInput(Request::all()); } - - if($data['action'] === 'homeparty-party-store'){ + + if($data['action'] === 'homeparty-party-store-detail'){ if(!$id){ //first save create and empty user/host do { @@ -112,29 +128,51 @@ class HomepartyController extends Controller } while( Homeparty::where('token', $token)->count() ); $data['token'] = $token; $data['auth_user_id'] = \Auth::user()->id; + $data['step'] = 2; + $step = 2; $homeparty = Homeparty::create($data); - $homeparty_user = HomepartyUser::create([ 'homeparty_id' => $homeparty->id, 'auth_user_id' => \Auth::user()->id, + 'shipping_country_id' => $homeparty->country_id, + 'billing_country_id' => $homeparty->country_id, + 'same_as_billing' => false, 'is_host' => true, ]); }else { $homeparty = $this->getHomparty($id); $homeparty->fill($data)->save(); + $step = 10; + } + } + if($data['action'] === 'homeparty-party-store-address'){ + $homeparty = $this->getHomparty($id); + $homeparty_user = $homeparty->homeparty_host; + $homeparty_user->fill($data)->save(); + if($homeparty->step === 2){ + $homeparty->step = 3; + $homeparty->save(); + $step = 3; + }else{ + $step = 12; } } - if($data['action'] === 'homeparty-user-store'){ + if($data['action'] === 'homeparty-party-store-host'){ $homeparty = $this->getHomparty($id); - $data['same_as_billing'] = isset($data['same_as_billing']) ? true : false; - $data['shipping_country_id'] = isset($data['shipping_country_id']) ? $data['shipping_country_id'] : $data['billing_country_id']; $homeparty_user = $homeparty->homeparty_host; $homeparty_user->fill($data)->save(); + if($homeparty->step === 3){ + $homeparty->step = 10; + $homeparty->save(); + $step = 10; + }else{ + $step = 13; + } } \Session()->flash('alert-save', '1'); - return redirect(route('user_homeparty_detail', $homeparty->id)); + return redirect(route('user_homeparty_detail', [$homeparty->id, $step])); } @@ -154,6 +192,8 @@ class HomepartyController extends Controller if($gid === 'new'){ $homeparty_user = new HomepartyUser(); $homeparty_user->same_as_billing = true; + $homeparty_user->billing_country_id = $homeparty->country_id; + $homeparty_user->shipping_country_id = $homeparty->country_id; }else{ $homeparty_user = HomepartyUser::findOrFail($gid); if($homeparty->id !== $homeparty_user->homeparty_id){ @@ -222,9 +262,20 @@ class HomepartyController extends Controller public function order($id = null) { $user = User::find(Auth::user()->id); - $homeparty = $this->getHomparty($id); + $shipping_country_id = $this->checkShoppingCountry($homeparty->country_id); + if(!$shipping_country_id){ + \Session()->flash('custom-error', __('validation.custom.shipping_not_found')); + return redirect(route('user_homepartys')); + } + UserService::checkUserTaxShippingCountry($user, $shipping_country_id); + if($this->userChangeCountry($homeparty)){ + \Session()->flash('custom-error', 'Das Rechnungsland wurde geändert und der Warenkrob zurückgesetzt.'); + return redirect(route('user_homeparty_order', [$homeparty->id])); + } HomepartyCart::calculateHomeparty($homeparty); + $homeparty->card_info = UserService::getYardInfo(); + $homeparty->save(); $userHistoryPaymentOrder = UserHistory::whereUserId($user->id)->whereAction('payment_homeparty')->where('referenz', $homeparty->id)->get()->last(); $data = [ 'homeparty' => $homeparty, @@ -232,10 +283,34 @@ class HomepartyController extends Controller ]; return view('user.homeparty.order', $data); } + + private function userChangeCountry($homeparty){ + if(isset($homeparty->card_info['user_country_id'])){ + if($homeparty->card_info['user_country_id'] !== UserService::$user_country->id){ + // es wurde schon eine order angelegt, aber das Rechungsland geändert + if($homeparty->homeparty_order_items->count()){ + foreach($homeparty->homeparty_order_items as $homeparty_order_item){ + $homeparty_order_item->delete(); + } + return true; + } + } + } + return false; + } + + private function checkShoppingCountry($country_id){ + if($country_id){ + if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){ + return $shipping_country->id; + } + } + return false; + } + //perform Request public function orderStore($id = null) { - $homeparty = $this->getHomparty($id); if(Request::ajax()) { @@ -257,20 +332,37 @@ class HomepartyController extends Controller $HomepartyUserOrderItem->qty = $HomepartyUserOrderItem->qty+1; $HomepartyUserOrderItem->save(); }else{ - $HomepartyUserOrderItem = HomepartyUserOrderItem::create([ - 'homeparty_id' => $homeparty->id, - 'homeparty_user_id' => $homeparty_user->id, - 'product_id' => $product->id, - 'qty' => 1, - 'price' => $product->price, - 'price_net' => $product->getPriceWith(true, false), - 'tax_rate' => $product->tax, - 'points' => $product->points, - 'margin' => $margin, - 'ek-price' => $product->getPriceWith(false, true), - 'ek-price_net' => $product->getPriceWith(true, true), - 'slug' => $product->slug - ]); + if($homeparty->getCardInfo('user_tax_free')){ + $HomepartyUserOrderItem = HomepartyUserOrderItem::create([ + 'homeparty_id' => $homeparty->id, + 'homeparty_user_id' => $homeparty_user->id, + 'product_id' => $product->id, + 'qty' => 1, + 'price' => $product->getPriceWith(true, false, $homeparty->getUserCountry()), + 'price_net' => $product->getPriceWith(true, false, $homeparty->getUserCountry()), + 'tax_rate' => 0, + 'points' => $product->points, + 'margin' => $margin, + 'ek-price' => $product->getPriceWith(true, true, $homeparty->getUserCountry()), + 'ek-price_net' => $product->getPriceWith(true, true, $homeparty->getUserCountry()), + 'slug' => $product->slug + ]); + }else{ + $HomepartyUserOrderItem = HomepartyUserOrderItem::create([ + 'homeparty_id' => $homeparty->id, + 'homeparty_user_id' => $homeparty_user->id, + 'product_id' => $product->id, + 'qty' => 1, + 'price' => $product->getPriceWith(false, false, $homeparty->getUserCountry()), + 'price_net' => $product->getPriceWith(true, false, $homeparty->getUserCountry()), + 'tax_rate' => $product->getTaxWith($homeparty->getUserCountry()), + 'points' => $product->points, + 'margin' => $margin, + 'ek-price' => $product->getPriceWith(false, true, $homeparty->getUserCountry()), + 'ek-price_net' => $product->getPriceWith(true, true, $homeparty->getUserCountry()), + 'slug' => $product->slug + ]); + } } } @@ -280,7 +372,7 @@ class HomepartyController extends Controller HomepartyCart::calculateHomeparty($homeparty); $html_user_cart = view("user.homeparty.show_products_order", ['homeparty' => $homeparty, 'homeparty_guest' => $homeparty_user])->render(); $html_bonus = view("user.homeparty.show_bonus", ['homeparty' => $homeparty])->render(); - $html_host_bonus = view("user.homeparty.show_calc_bonus_host")->render(); + $html_host_bonus = view("user.homeparty.show_calc_bonus_host", ['homeparty' => $homeparty])->render(); $html_total = view("user.homeparty.show_total_order", ['homeparty' => $homeparty])->render(); return response()->json(['response' => true, 'data'=>$data, 'html_user_cart'=>$html_user_cart, 'html_bonus'=>$html_bonus, 'html_host_bonus'=>$html_host_bonus, 'html_total'=>$html_total]); } @@ -458,18 +550,24 @@ class HomepartyController extends Controller return $homeparty; } - public function datatable(){ - $query = Product::select('products.*')->where('active', true)->where(function ($q) { - $q->where('show_at', '=', 0) - ->orWhere('show_at', '=', 1); - }); + public function datatable($homeparty_id){ + + $query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', '3'); + $homeparty = Homeparty::findOrFail($homeparty_id); return \DataTables::eloquent($query) - ->addColumn('add_card', function (Product $product) { - return ''; + ->addColumn('add_card', function (Product $product) use ($homeparty) { + if($homeparty->getCardInfo('user_tax_free')){ + return ''; + }else{ + return ''; + } + }) ->addColumn('picture', function (Product $product) { if(count($product->images)){ @@ -477,14 +575,28 @@ class HomepartyController extends Controller } return ""; }) - ->addColumn('price_net', function (Product $product) { - return $product->getFormattedPriceWith(true, true). " €"; + /*->addColumn('price_net', function (Product $product) use ($homeparty) { + return ''.$product->getFormattedPriceWith(true, true, $homeparty->getUserCountry()). " €". + ''.$product->getFormattedPriceCurrencyWith(true, true, $homeparty->getUserCountry()).''; }) - ->addColumn('price_gross', function (Product $product) { - return $product->getFormattedPriceWith(false, true). " €"; + */ + ->addColumn('price_gross', function (Product $product) use ($homeparty) { + if($homeparty->getCardInfo('user_tax_free')){ + return ''.$product->getFormattedPriceWith(true, true, $homeparty->getUserCountry()). " €". + ''.$product->getFormattedPriceCurrencyWith(true, true, $homeparty->getUserCountry()).''; + }else{ + return ''.$product->getFormattedPriceWith(false, true, $homeparty->getUserCountry()). " €". + ''.$product->getFormattedPriceCurrencyWith(false, true, $homeparty->getUserCountry()).''; + } }) - ->addColumn('price_vk_gross', function (Product $product) { - return $product->getFormattedPriceWith(false, false). " €"; + ->addColumn('price_vk_gross', function (Product $product) use ($homeparty) { + if($homeparty->getCardInfo('user_tax_free')){ + return ''.$product->getFormattedPriceWith(true, false, $homeparty->getUserCountry()). " €". + ''.$product->getFormattedPriceCurrencyWith(true, false, $homeparty->getUserCountry()).''; + }else{ + return ''.$product->getFormattedPriceWith(false, false, $homeparty->getUserCountry()). " €". + ''.$product->getFormattedPriceCurrencyWith(false, false, $homeparty->getUserCountry()).''; + } }) ->addColumn('action', function (Product $product) { return ' - - - - - - + return ''.$product->name.'
+
+
+ + + + + + + +
'; }) /* @@ -349,13 +329,13 @@ class OrderController extends Controller return ""; }) ->addColumn('price_net', function (Product $product) { - return $product->getFormattedPriceWith(true, true). " €"; + return ''.$product->getFormattedPriceWith(true, true, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(true, true, Yard::instance('shopping')->getUserCountry()).''; }) ->addColumn('price_gross', function (Product $product) { - return $product->getFormattedPriceWith(false, true). " €"; + return ''.$product->getFormattedPriceWith(false, true, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(false, true, Yard::instance('shopping')->getUserCountry()).''; }) ->addColumn('price_vk_gross', function (Product $product) { - return $product->getFormattedPriceWith(false, false). " €"; + return ''.$product->getFormattedPriceWith(false, false, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(false, false, Yard::instance('shopping')->getUserCountry()).''; }) ->addColumn('action', function (Product $product) { return ' @@ -83,12 +83,14 @@ - -
- - {{ Form::select('show_at', \App\Models\PaymentMethod::$showATs, 9, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }} +
+
+ + {{ Form::select('show_on[]', \App\Models\PaymentMethod::$showONs, 10, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }} +
+
- + {{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
@@ -41,6 +41,12 @@ {{ Form::text('pos', $product->pos, array('placeholder'=>__('1, 2, 3, etc'), 'class'=>'form-control', 'id'=>'pos')) }}
+
+
+ + {{ Form::select('show_on[]', $product->showONs, $product->show_on, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }} +
+
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }} @@ -80,7 +86,6 @@
-
{{ Form::text('weight', $product->weight, array('placeholder'=>__('Gewicht in g'), 'class'=>'form-control', 'id'=>'weight')) }} @@ -92,7 +97,15 @@
{{ Form::text('amount', $product->amount, array('placeholder'=>__('Anzahl/Verfügbarkeit'), 'class'=>'form-control', 'id'=>'amount')) }} - +
+
+
+
+ +
@@ -119,17 +132,17 @@
- {{ Form::text('c_price['.$country->id.']', formatNumber($product->getCPrice($country->id)), array('placeholder'=>__('Preis VK in EUR Brutto'), 'class'=>'form-control', 'id'=>'c_price_'.$country->id)) }} + {{ Form::text('c_price['.$country->id.']', formatNumber($product->getCPrice($country)), array('placeholder'=>__('Preis VK in EUR Brutto'), 'class'=>'form-control', 'id'=>'c_price_'.$country->id)) }}
- {{ Form::text('c_tax['.$country->id.']', formatNumber($product->getCTax($country->id)), array('placeholder'=>__('MwSt in %'), 'class'=>'form-control', 'id'=>'c_tax'.$country->id)) }} + {{ Form::text('c_tax['.$country->id.']', formatNumber($product->getCTax($country)), array('placeholder'=>__('MwSt in %'), 'class'=>'form-control', 'id'=>'c_tax'.$country->id)) }}
- {{ Form::text('c_price_old['.$country->id.']', formatNumber($product->getCPriceOld($country->id)), array('placeholder'=>__('Streichpreis'), 'class'=>'form-control', 'id'=>'c_price_old'.$country->id)) }} + {{ Form::text('c_price_old['.$country->id.']', formatNumber($product->getCPriceOld($country)), array('placeholder'=>__('Streichpreis'), 'class'=>'form-control', 'id'=>'c_price_old'.$country->id)) }}
@@ -142,9 +155,9 @@ angegeben @endif

- @if($country->currency_calc) - {{-- - NUR Anzeige vom automatisch berechneten Preis currency_faktor + + + {{-- NUR Anzeige vom automatisch berechneten Preis currency_faktor Auf Basis vom price Wenn own_eur auf basis vom own_eur price --}} @@ -153,19 +166,19 @@ {{ Form::text('c_currency['.$country->id.']', formatNumber($product->getRealPrice($country) * $country->currency_faktor), array('class'=>'form-control', 'readonly')) }} - @else - {{-- + {{--@if($country->currency_calc) + @else + Eingabe Währungs Namen aus currency_name currency_faktor als Hinweis ausgeben Auf Basis vom price Wenn own_eur auf basis vom own_eur price - --}}
{{ Form::text('c_currency['.$country->id.']', formatNumber($product->getCCurrency($country->id)), array('placeholder'=>__('Preis VK in ').$country->currency_unit, 'class'=>'form-control')) }}
- @endif + @endif --}}
diff --git a/resources/views/admin/product/index.blade.php b/resources/views/admin/product/index.blade.php index 008e9751..ced5b13c 100755 --- a/resources/views/admin/product/index.blade.php +++ b/resources/views/admin/product/index.blade.php @@ -28,6 +28,7 @@ {{__('Gewicht')}} {{__('sichbar')}} {{__('KP')}} + {{__('NoP.')}} {{__('Status')}} @@ -59,8 +60,9 @@ {{ $value->getUnitType() }} {{ $value->getBasePriceFormatted() }} {{ $value->weight }} - {{ $value->getShowAtType() }} + {!! implode($value->getShowOnTypes(), '
') !!} {!! get_active_badge($value->shipping_addon) !!} + {!! get_active_badge($value->no_commission) !!} {!! get_active_badge($value->active) !!}   diff --git a/resources/views/sys/admin/domain-ssl.blade.php b/resources/views/sys/admin/domain-ssl.blade.php index ae9e653d..b9ac5290 100644 --- a/resources/views/sys/admin/domain-ssl.blade.php +++ b/resources/views/sys/admin/domain-ssl.blade.php @@ -36,12 +36,59 @@ {!! Form::close() !!}
- @if(count($values)>0) + @if(count($values)>0)
- - @foreach($values as $value) -
{{$value}}
- @endforeach + +
+ + + + + + + + + + + + + + @foreach($values as $value) + + + + + + + + + + @endforeach + + +
IDUser-ID{{__('Name')}}{{__('seit')}}DatumErreichbar{{__('Status')}}
{{ $value->id }}{{ $value->user_id }}{{ $value->name }}.mivita.care{{ $value->getActiveDateFormatSmall() }} + @if($value->user && $value->user->payment_shop) + @if($value->user->isActiveShop()) + {{ $value->user->getPaymentShopDateFormat() }} + @else + {{ $value->user->getPaymentShopDateFormat() }} + @endif + @else + + @endif + + + @if($value->getSubdomainAvailable()) + {{ __('available') }} + @if($value->getSubdomainSslSin()) HTTPS @else HTTP @endif + + @else + {{ __('not available') }} HTTP + @endif + {!! get_active_badge($value->active) !!}
+ +
+
@endif diff --git a/resources/views/user/homeparty/_edit.blade.php b/resources/views/user/homeparty/_edit.blade.php index 2ddf253f..f5f7dfae 100644 --- a/resources/views/user/homeparty/_edit.blade.php +++ b/resources/views/user/homeparty/_edit.blade.php @@ -81,16 +81,10 @@
-
- - - @if ($errors->has('billing_country_id')) - - {{ $errors->first('billing_country_id') }} - - @endif +
+ {{ Form::hidden('billing_country_id', $homeparty_user->billing_country_id) }} + +
@if($homeparty_user->billing_country) {{ $homeparty_user->billing_country->getLocated() }} @endif (Das Land kann nicht mehr geändert werden.)
@@ -196,16 +190,10 @@
-
- - - @if ($errors->has('shipping_country_id')) - - {{ $errors->first('shipping_country_id') }} - - @endif +
+ {{ Form::hidden('shipping_country_id', $homeparty_user->shipping_country_id) }} + +
@if($homeparty_user->shipping_country) {{ $homeparty_user->shipping_country->getLocated() }} @endif (Das Land kann nicht mehr geändert werden.)
diff --git a/resources/views/user/homeparty/detail.blade.php b/resources/views/user/homeparty/detail.blade.php index 840eaf5b..e8c14642 100644 --- a/resources/views/user/homeparty/detail.blade.php +++ b/resources/views/user/homeparty/detail.blade.php @@ -12,116 +12,411 @@
zurück - {!! Form::open(['url' => route('user_homeparty_detail', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-party-form-validation']) !!} -
-
-
- @if(!$homeparty->id) -
- * {{trans('register.required_fields')}} - Neue Auszeitparty anlegen -
- @else -
-
-
Homeparty verwalten
- -
-
- @endif -
-
-
-
-
- - {{ Form::text('name', $homeparty->name, array('placeholder'=>__('Gastgeber / Veranstalter'), 'class'=>'form-control', 'required')) }} - @if ($errors->has('name')) - - {{ $errors->first('name') }} - - @endif -
-
- - {{ Form::text('date', $homeparty->date, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-base', 'required')) }} - @if ($errors->has('date')) - - {{ $errors->first('date') }} - - @endif -
-
- - {{ Form::text('place', $homeparty->place, array('placeholder'=>__('Veranstaltungsort'), 'class'=>'form-control', 'required')) }} - @if ($errors->has('place')) - - {{ $errors->first('place') }} - - @endif -
+ -
-
-   - zurück zur Übersicht -
- {!! Form::close() !!} - - - @if($homeparty->id) - - {!! Form::open(['url' => route('user_homeparty_detail', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-user-form-validation']) !!} -
+ -
-   - zurück zur Übersicht -
- {!! Form::close() !!} -
-
-
- - +
+
+
+ + {{ Form::text('name', $homeparty->name, array('placeholder'=>__('Gastgeber / Veranstalter'), 'class'=>'form-control', 'required')) }} + @if ($errors->has('name')) + + {{ $errors->first('name') }} + + @endif +
+
+ + {{ Form::text('date', $homeparty->date, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-base', 'required')) }} + @if ($errors->has('date')) + + {{ $errors->first('date') }} + + @endif +
+
+ + {{ Form::text('place', $homeparty->place, array('placeholder'=>__('Veranstaltungsort'), 'class'=>'form-control', 'required')) }} + @if ($errors->has('place')) + + {{ $errors->first('place') }} + + @endif +
+ + @if($homeparty->id) +
+ +
@if($homeparty->country) {{ $homeparty->country->getLocated() }} @endif
+
+ @else +
+ + {{ Form::select('country_id', \App\Models\ShippingCountry::getActiveShippingCountries(), $homeparty->country_id, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'country_id') ) }} + @if ($errors->has('country_id')) + + {{ $errors->first('country_id') }} + + @endif +
+
+ Das Lieferland kann nach dem Anlegen nicht mehr geändert werden. Alle Lieferadressen müssen in diesem Land sein. +
+ @endif + +
-
- - - - + + {{ Form::textarea('description', $homeparty->description , array('placeholder'=>__('Beschreibung'), 'class'=>'form-control', 'rows'=>5)) }} +
+
+   + zurück zur Übersicht +
+ @if($homeparty->id && $homeparty->step >= 10) +
+
+ +
+
+ + + + +
+
+

Teile diesen Link mit den Gästen (z.B. WhatsApp oder SMS), damit gelangt sie auf eine Zielseite wo sie ihre Daten selber ausfüllen können. Nutze das „Kopier-Symbol“, um den Link gleich in Deine Zwischenablage zu kopieren.

+
+ @endif +
+ {!! Form::close() !!} +
+ + @if($homeparty->id) + + + +
+
+ @endif +