Next Member Shopping

This commit is contained in:
Kevin Adametz 2020-08-21 18:20:40 +02:00
parent fb27009339
commit 16fe2fa363
23 changed files with 619 additions and 334 deletions

4
.env
View file

@ -14,8 +14,8 @@ APP_URL_CRM=my.
#APP_CHECKOUT_MAIL=no-reply@mivita.care #APP_CHECKOUT_MAIL=no-reply@mivita.care
APP_CHECKOUT_MAIL=kevin.adametz@me.com APP_CHECKOUT_MAIL=kevin.adametz@me.com
APP_INFO_MAIL=info@adametz.media APP_INFO_MAIL=kevin.adametz@me.com
APP_DEFAULT_MAIL=info@mivita.care APP_DEFAULT_MAIL=kevin.adametz@me.com
APP_CHECKOUT_TEST_MAIL=kevin.adametz@me.com APP_CHECKOUT_TEST_MAIL=kevin.adametz@me.com
APP_INFO_TEST_MAIL=kevin.adametz@me.com APP_INFO_TEST_MAIL=kevin.adametz@me.com

55
.idea/workspace.xml generated
View file

@ -5,23 +5,28 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="2fbaac5f-25ba-4502-a970-cc14728d7d55" name="Default Changelist" comment=""> <list default="true" id="2fbaac5f-25ba-4502-a970-cc14728d7d55" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/User/CustomerController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/User/CustomerController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/Api/PayoneController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/PayoneController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/MembershipController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/MembershipController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Pay/PayoneController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Pay/PayoneController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/User/OrderController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/User/OrderController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/User/OrderController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/User/OrderController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Web/CardController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Web/CardController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Web/CheckoutController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Web/CheckoutController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/Web/CheckoutController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Web/CheckoutController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/WizardController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/WizardController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Middleware/Checkout.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/Checkout.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Middleware/Checkout.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Middleware/Checkout.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/ShoppingInstance.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingInstance.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/PaymentMethod.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/PaymentMethod.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/ShoppingUser.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingUser.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/ShoppingPayment.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingPayment.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/HTMLHelper.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/HTMLHelper.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Services/Payment.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Payment.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/Util.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Util.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Services/Shop.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Shop.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/Yard.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Yard.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/lang/de/email.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/lang/de/email.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2019_02_21_195012_create_shopping_instances_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_21_195012_create_shopping_instances_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/emails/checkout_status.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/checkout_status.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2019_02_23_161530_create_shopping_users_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_23_161530_create_shopping_users_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/user/order/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/user/order/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/customer/_edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/customer/_edit.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/user/shop/sales/order_detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/user/order/detail.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/templates/card.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/card.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/web/templates/checkout-final.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/checkout-final.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/templates/checkout.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/checkout.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/web/templates/checkout.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/checkout.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/user/layouts/application.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/user/layouts/application.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -267,6 +272,13 @@
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" /> <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/user/order" />
<recent name="$PROJECT_DIR$/resources/views/user/customer" />
<recent name="$PROJECT_DIR$/public/vendor/libs/dropzone" />
<recent name="$PROJECT_DIR$/public/vendor/libs" />
<recent name="$PROJECT_DIR$/resources/views/admin/user" />
</key>
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/user/order" /> <recent name="$PROJECT_DIR$/resources/views/user/order" />
<recent name="$PROJECT_DIR$/public/js" /> <recent name="$PROJECT_DIR$/public/js" />
@ -274,13 +286,6 @@
<recent name="$PROJECT_DIR$/resources/views/admin/modal" /> <recent name="$PROJECT_DIR$/resources/views/admin/modal" />
<recent name="$PROJECT_DIR$/app/Http/Controllers/SyS" /> <recent name="$PROJECT_DIR$/app/Http/Controllers/SyS" />
</key> </key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/user/customer" />
<recent name="$PROJECT_DIR$/public/vendor/libs/dropzone" />
<recent name="$PROJECT_DIR$/public/vendor/libs" />
<recent name="$PROJECT_DIR$/resources/views/admin/user" />
<recent name="$PROJECT_DIR$/resources/views/admin/lead" />
</key>
</component> </component>
<component name="RunManager" selected="Shell Script.composer-post-update.sh"> <component name="RunManager" selected="Shell Script.composer-post-update.sh">
<configuration name="de" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true"> <configuration name="de" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true">
@ -526,6 +531,9 @@
<workItem from="1597299830339" duration="2158000" /> <workItem from="1597299830339" duration="2158000" />
<workItem from="1597313688277" duration="5656000" /> <workItem from="1597313688277" duration="5656000" />
<workItem from="1597410738317" duration="11162000" /> <workItem from="1597410738317" duration="11162000" />
<workItem from="1597658985953" duration="2000" />
<workItem from="1597928402978" duration="7140000" />
<workItem from="1598016608485" duration="9648000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -562,10 +570,10 @@
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="688" y="23" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596113300502" /> <state x="688" y="23" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596113300502" />
<state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1596896828871"> <state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1598026016588">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596896828871" /> <state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1598026016588" />
<state width="2421" height="408" key="GridCell.Tab.0.bottom" timestamp="1595683782568"> <state width="2421" height="408" key="GridCell.Tab.0.bottom" timestamp="1595683782568">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
@ -614,12 +622,11 @@
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="951" y="549" key="com.jetbrains.php.test.PhpNewTestDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1591961096724" /> <state x="951" y="549" key="com.jetbrains.php.test.PhpNewTestDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1591961096724" />
<state x="531" y="536" width="1497" height="794" key="find.popup" timestamp="1597421601104"> <state x="531" y="536" width="1497" height="794" key="find.popup" timestamp="1598024943525">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="805" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1589024021327" />
<state x="-1755" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@-2560.23.2560.1417" timestamp="1589974580416" /> <state x="-1755" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@-2560.23.2560.1417" timestamp="1589974580416" />
<state x="531" y="536" width="1497" height="794" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1597421601104" /> <state x="531" y="536" width="1497" height="794" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1598024943525" />
<state x="863" y="438" width="1115" height="793" key="find.popup/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1597301750195" /> <state x="863" y="438" width="1115" height="793" key="find.popup/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1597301750195" />
<state width="600" height="428" key="javadoc.popup" timestamp="1594733832314"> <state width="600" height="428" key="javadoc.popup" timestamp="1594733832314">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />

View file

@ -8,6 +8,7 @@ use App\Mail\MailCheckout;
use App\Models\PaymentTransaction; use App\Models\PaymentTransaction;
use App\Models\ShoppingOrder; use App\Models\ShoppingOrder;
use App\Models\ShoppingPayment; use App\Models\ShoppingPayment;
use App\Services\Payment;
use App\Services\Shop; use App\Services\Shop;
use App\Services\Util; use App\Services\Util;
use App\User; use App\User;
@ -137,76 +138,10 @@ class PayoneController extends Controller
} }
if($data['txaction'] === 'paid'){ if($data['txaction'] === 'paid'){
$shopping_order->setUserHistoryValue(['status' => 8]); $send_link = Payment::paymentStatusPaidAction($shopping_order, true);
Shop::userOrders();
$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);
$user->save();
$send_link = true;
//new date
$date = \Carbon::now()->modify('1 year');
if($user->payment_account && $user->daysActiveAccount()>0){
$date = \Carbon::parse($user->payment_account)->modify('1 year');
} }
foreach ($shopping_order_item->product->action as $do){ $data['send_link'] = $send_link;
if($shopping_order_item->product->getActionName($do) === 'payment_for_account'){ Payment::paymentStatusSendMail($shopping_order, $shopping_payment, $data);
$user->payment_order_id = $shopping_order_item->product->id; //34
$user->payment_account = $date;
$user->wizard = 100;
$shopping_order->setUserHistoryValue(['status' => 9]);
}
if($shopping_order_item->product->getActionName($do) === 'payment_for_shop'){
$user->payment_order_id = $shopping_order_item->product->id; //35
$user->payment_shop = $date;
$user->wizard = 100;
$shopping_order->setUserHistoryValue(['status' => 9]);
}
if($shopping_order_item->product->getActionName($do) === 'payment_for_shop_upgrade'){
if($shopping_order_item->product->upgrade_to_id){
$user->payment_order_id = $shopping_order_item->product->upgrade_to_id;
}
$user->payment_shop = $user->payment_account; //same Date, is upgrade
$shopping_order->setUserHistoryValue(['status' => 9]);
}
if($shopping_order_item->product->getActionName($do) === 'payment_for_lead_upgrade'){
if($shopping_order_item->product->upgrade_to_id){
$user->m_level = $shopping_order_item->product->upgrade_to_id;
}
}
$user->save();
}
}
}
}
}
}
$bcc = [];
$billing_email = $shopping_order->shopping_user->billing_email;
if(!$billing_email){
if($data['mode'] === 'test'){
$billing_email = config('app.checkout_test_mail');
}else{
$billing_email = config('app.checkout_mail');
}
}
if($data['mode'] === 'test'){
$bcc[] = config('app.checkout_test_mail');
}else{
$bcc[] = config('app.checkout_mail');
}
if(!$shopping_order->shopping_user->is_like && $shopping_order->shopping_user->member){
$bcc[] = $shopping_order->shopping_user->member->email;
}
Mail::to($billing_email)->bcc($bcc)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $send_link, $data['mode']));
print("TSOK"); print("TSOK");
exit; exit;
} }

View file

@ -79,8 +79,6 @@ class DataTableController extends Controller
} }
return $link.'<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> '.$user->getPaymentMethodsShort().'</span></a>'; return $link.'<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> '.$user->getPaymentMethodsShort().'</span></a>';
}) })
->addColumn('action_delete', function (User $user) { ->addColumn('action_delete', function (User $user) {
return '<span class="no-line-break"><a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a> return '<span class="no-line-break"><a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>

View file

@ -97,6 +97,10 @@ class LeadController extends Controller
} }
} }
$next_account_id = UserAccount::max('m_account') +1; $next_account_id = UserAccount::max('m_account') +1;
if($user->account->m_account === null){
$user->account->m_account = $next_account_id;
}
$data = [ $data = [
'show' => 'check_lead', 'show' => 'check_lead',
'user' => $user, 'user' => $user,

View file

@ -103,6 +103,10 @@ class MembershipController extends Controller
$identifier = Util::getToken(); $identifier = Util::getToken();
} while( ShoppingInstance::where('identifier', $identifier)->count() ); } while( ShoppingInstance::where('identifier', $identifier)->count() );
$data = [];
$data['is_from'] = 'membership';
$data['is_for'] = 'me';
ShoppingInstance::create([ ShoppingInstance::create([
'identifier' => $identifier, 'identifier' => $identifier,
'user_shop_id' => 1, //is first faker shop for nuy intern 'user_shop_id' => 1, //is first faker shop for nuy intern
@ -110,6 +114,8 @@ class MembershipController extends Controller
'payment' => 3, //Berater Membership 'payment' => 3, //Berater Membership
'subdomain' => url('/'), 'subdomain' => url('/'),
'country_id' => Yard::instance('shopping')->getShippingCountryId(), 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
'shopping_data' => $data,
'back' => url()->previous(),
]); ]);
Yard::instance('shopping')->store($identifier); Yard::instance('shopping')->store($identifier);

View file

@ -166,8 +166,18 @@ class PayoneController extends Controller
} }
//Rechnungskauf //Rechnungskauf
/* if($payment_method[0]=== 'fnc'){ if($payment_method[0] === 'fnc'){
//MIVITA
if(isset($payment_method[1]) && $payment_method[1] === 'MIV'){
$this->method = [ $this->method = [
"clearingtype" => "fnc",
"wallettype" => "",
'onlinebanktransfertype' => "MIV",
"request" => "authorization",
];
}
//PAYONE
/* $this->method = [
"clearingtype" => "fnc", "clearingtype" => "fnc",
"wallettype" => "", "wallettype" => "",
'onlinebanktransfertype' => "", 'onlinebanktransfertype' => "",
@ -175,9 +185,9 @@ class PayoneController extends Controller
"request" => "genericpayment", "request" => "genericpayment",
"add_paydata[action]" => "pre_check", "add_paydata[action]" => "pre_check",
"add_paydata[payment_type]" => "Payolution-Invoicing", "add_paydata[payment_type]" => "Payolution-Invoicing",
]; ];*/
} }
*/
} }
//vorkasse //vorkasse
if($payment_method === 'elv'){ if($payment_method === 'elv'){
@ -223,6 +233,24 @@ class PayoneController extends Controller
$request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->urls); $request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->urls);
//RECHNUNG MIV
if($this->shopping_payment->clearingtype === 'fnc' && $this->shopping_payment->onlinebanktransfertype === 'MIV'){
$payt = PaymentTransaction::create([
'shopping_payment_id' => $this->shopping_payment->id,
'request' => $this->method['request'],
'txid' => 0,
'userid' => 0,
'status' => 'FNCMIV',
'transmitted_data' => $request,
'txaction' => 'invoice_open',
'mode' => $this->shopping_payment->mode,
]);
Util::setUserHistoryValue(['status'=>5]);
return redirect(route('checkout.transaction_approved', [$payt->id, $this->reference]));
exit;
}
$response = Payone::sendRequest($request); $response = Payone::sendRequest($request);
/* /*
* status APPROVED / REDIRECT / ERROR / PENDING * status APPROVED / REDIRECT / ERROR / PENDING
@ -273,6 +301,7 @@ class PayoneController extends Controller
]); ]);
Util::setUserHistoryValue(['status'=>5]); Util::setUserHistoryValue(['status'=>5]);
if($payt->shopping_payment->clearingtype === "vor"){ if($payt->shopping_payment->clearingtype === "vor"){
//vorkasse //vorkasse
return redirect(route('checkout.transaction_approved', [$payt->id, $this->reference])); return redirect(route('checkout.transaction_approved', [$payt->id, $this->reference]));

View file

@ -9,6 +9,8 @@ use App\Models\ShoppingInstance;
use App\Models\ShoppingOrder; use App\Models\ShoppingOrder;
use App\Models\ShoppingUser; use App\Models\ShoppingUser;
use App\Models\UserHistory; use App\Models\UserHistory;
use App\Models\UserShop;
use App\Services\Payment;
use App\Services\Util; use App\Services\Util;
use App\User; use App\User;
use Auth; use Auth;
@ -36,14 +38,46 @@ class OrderController extends Controller
{ {
$user = User::find(\Auth::user()->id); $user = User::find(\Auth::user()->id);
$shopping_order = ShoppingOrder::findOrFail($id); $shopping_order = ShoppingOrder::findOrFail($id);
if($shopping_order->member_id !== $user->id){ if($shopping_order->auth_user_id !== $user->id){
abort(404); abort(404);
} }
$data = [ $data = [
'shopping_order' => $shopping_order, 'shopping_order' => $shopping_order,
'isAdmin' => false, 'isAdmin' => false,
]; ];
return view('user.shop.sales.order_detail', $data); return view('user.order.detail', $data);
}
public function ordersDatatable(){
$user = User::find(\Auth::user()->id);
$query = ShoppingOrder::with('shopping_user')->select('shopping_orders.*')->where('auth_user_id', '=', $user->id)->where('txaction', '!=', NULL);
return \DataTables::eloquent($query)
->addColumn('id', function (ShoppingOrder $ShoppingOrder) {
return '<a href="' . route('user_order_detail', [$ShoppingOrder->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
})
->addColumn('created_at', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->created_at->format("d.m.Y");
})
->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) {
return Payment::getShoppingOrderBadge($ShoppingOrder);
})
->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->getFormattedTotalShipping();
})
->addColumn('orders', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->orders : '';
})
->addColumn('user_shop_id', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->user_shop ? '<a href="'.$ShoppingOrder->user_shop->getSubdomain(false).'" target="_blank">'.$ShoppingOrder->user_shop->getSubdomain(false).'</span>' : '';
})
->orderColumn('id', 'id $1')
->orderColumn('txaction', 'txaction $1')
->orderColumn('user_shop_id', 'user_shop_id $1')
->rawColumns(['id', 'txaction', 'user_shop_id'])
->make(true);
} }

View file

@ -5,12 +5,16 @@ namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Controllers\Pay\PayoneController; use App\Http\Controllers\Pay\PayoneController;
use App\Models\PaymentMethod;
use App\Models\PaymentTransaction; use App\Models\PaymentTransaction;
use App\Models\ShippingCountry;
use App\Models\ShoppingOrder; use App\Models\ShoppingOrder;
use App\Models\ShoppingOrderItem; use App\Models\ShoppingOrderItem;
use App\Models\ShoppingPayment; use App\Models\ShoppingPayment;
use App\Models\ShoppingUser; use App\Models\ShoppingUser;
use App\Services\CustomerPriority; use App\Services\CustomerPriority;
use App\Services\Payment;
use App\Services\Shop;
use App\User; use App\User;
use Illuminate\Session\SessionManager; use Illuminate\Session\SessionManager;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
@ -37,6 +41,9 @@ class CheckoutController extends Controller
public function checkout(){ public function checkout(){
//TODO ZAHLDIENSTE FORM USER !!!
// dump(Request::all());
// dd("back"); // dd("back");
// $user_shop = Util::getUserShop(); // $user_shop = Util::getUserShop();
$shopping_data = Yard::instance('shopping')->getYardExtra('shopping_data'); $shopping_data = Yard::instance('shopping')->getYardExtra('shopping_data');
@ -45,35 +52,50 @@ class CheckoutController extends Controller
$is_for = isset($shopping_data['is_for']) ? $shopping_data['is_for'] : false; $is_for = isset($shopping_data['is_for']) ? $shopping_data['is_for'] : false;
$shopping_user = null; $shopping_user = null;
/*if(!$this->getPayments('shopping_user_id') && Util::getAuthUser()){//$is_from !== 'shopping' && ){ //
$shopping_user = $this->shoppingUserAuthData($is_from, $is_for, $shopping_data);
// $shopping_user->save();
// $this->putPayments('shopping_user_id', $shopping_user->id);
}else{
$shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id'));
}*/
if(\Session::has('new_session')){
$this->destroy();
\Session::forget('new_session');
}
if(!$this->getPayments('shopping_user_id')){
if($shopping_data && $is_from !== 'shopping'){ if($shopping_data && $is_from !== 'shopping'){
//can wizard membership user_order
//$shopping_user_id = isset($shopping_data['shopping_user_id']) ? $shopping_data['shopping_user_id'] : false; //$shopping_user_id = isset($shopping_data['shopping_user_id']) ? $shopping_data['shopping_user_id'] : false;
$shopping_user = $this->shoppingUserAuthData($is_from, $is_for, $shopping_data); $shopping_user = $this->shoppingUserAuthData($is_from, $is_for, $shopping_data);
$shopping_user->save();
$this->putPayments('shopping_user_id', $shopping_user->id);
}elseif($is_from === 'shopping') { }elseif($is_from === 'shopping') {
$shopping_user = new ShoppingUser(); $shopping_user = new ShoppingUser();
$shopping_user->is_for = $is_for; $shopping_user->is_for = $is_for;
$shopping_user->is_from = $is_from; $shopping_user->is_from = $is_from;
$shopping_user->mode = 'prev';
}
}else{
$shopping_user = ShoppingUser::findOrFail($this->getPayments('shopping_user_id'));
$shopping_user->billing_state = Shop::getCountryShippingCountryId($shopping_user->billing_country_id);
$shopping_user->shipping_state = Shop::getCountryShippingCountryId($shopping_user->shipping_country_id);
} }
if(Request::get('selected_country')){ if(old('selected_country') && old('selected_country') === 'change'){
//Yard::instance('shopping')->setShippingCountryWithPrice(Request::get('selected_country'), $is_for); \Session::forget('_old_input.selected_country');
$shopping_user->billing_state = old('billing_state');
$shopping_user->shipping_state = old('shipping_state');
}else{ }else{
$shopping_user->billing_state = Yard::instance('shopping')->getShippingCountryId(); $shopping_user->billing_state = Yard::instance('shopping')->getShippingCountryId();
$shopping_user->shipping_state = Yard::instance('shopping')->getShippingCountryId(); $shopping_user->shipping_state = Yard::instance('shopping')->getShippingCountryId();
// $ShippingCountry = ShippingCountry::where('country_id', 1)->first();
// $selected_country = $ShippingCountry->id;
}
if(!$this->getPayments('shopping_user_id') && Util::getAuthUser()){
//$user->email;
// $shopping_user->save();
// $this->putPayments('shopping_user_id', $shopping_user->id);
}else{
//$shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id'));
} }
if(Util::getAuthUser()){ if(Util::getAuthUser()){
@ -84,12 +106,24 @@ class CheckoutController extends Controller
if($shopping_user->same_as_billing === NULL){ if($shopping_user->same_as_billing === NULL){
$shopping_user->same_as_billing = true; $shopping_user->same_as_billing = true;
} }
if($is_from !== 'shopping' && Util::getAuthUser()){
$user = Util::getAuthUser();
$payment_methods = $user->payment_methods;
}else{
$payment_methods = PaymentMethod::getDefaultAsArray();
}
$payment_methods_active = \App\Models\PaymentMethod::where('active', true)->get()->pluck( 'id', 'short')->toArray();
$data = [ $data = [
'is_from' => $is_from, 'is_from' => $is_from,
'is_for' => $is_for, 'is_for' => $is_for,
'user_shop' => Util::getUserShop(), 'user_shop' => Util::getUserShop(),
'shopping_user' => $shopping_user, 'shopping_user' => $shopping_user,
'shopping_mode' => Util::getUserShoppingMode(), 'shopping_mode' => Util::getUserShoppingMode(),
'payment_methods' => $payment_methods,
'payment_methods_active' => $payment_methods_active,
]; ];
return view('web.templates.checkout', $data); return view('web.templates.checkout', $data);
} }
@ -99,6 +133,7 @@ class CheckoutController extends Controller
$user = Util::getAuthUser(); $user = Util::getAuthUser();
$shopping_user = new ShoppingUser(); $shopping_user = new ShoppingUser();
$shopping_user->auth_user_id = $user->id; $shopping_user->auth_user_id = $user->id;
$shopping_user->mode = 'prev';
$shopping_user->billing_salutation = $user->account->salutation; $shopping_user->billing_salutation = $user->account->salutation;
$shopping_user->billing_company = $user->account->company; $shopping_user->billing_company = $user->account->company;
@ -168,9 +203,8 @@ class CheckoutController extends Controller
$data = Request::all(); $data = Request::all();
//change selected Country
if(isset($data['selected_country']) && $data['selected_country'] === 'change'){ if(isset($data['selected_country']) && $data['selected_country'] === 'change'){
if(Request::get('same_as_billing')){ if(Request::get('same_as_billing')){
Yard::instance('shopping')->setShippingCountryWithPrice($data['billing_state'], $data['is_for']); Yard::instance('shopping')->setShippingCountryWithPrice($data['billing_state'], $data['is_for']);
}else{ }else{
@ -180,7 +214,6 @@ class CheckoutController extends Controller
} }
dd('ads');
$rules = array( $rules = array(
'billing_salutation' => 'required', 'billing_salutation' => 'required',
'billing_firstname'=>'required', 'billing_firstname'=>'required',
@ -214,13 +247,19 @@ class CheckoutController extends Controller
//make Order and Items //make Order and Items
$shopping_order = $this->makeShoppingOrder($shopping_user); $shopping_order = $this->makeShoppingOrder($shopping_user);
//CustomerPriority //CustomerPriority
if($shopping_user->is_from === 'shopping'){
CustomerPriority::checkOne(ShoppingUser::find($shopping_user->id), true); CustomerPriority::checkOne(ShoppingUser::find($shopping_user->id), true);
}
Util::setUserHistoryValue(['status'=>2, 'shopping_order_id'=>$shopping_order->id]); Util::setUserHistoryValue(['status'=>2, 'shopping_order_id'=>$shopping_order->id]);
//check credit Card //check credit Card
if(Request::get('payment_method')){ if(Request::get('payment_method')){
$ret = []; $ret = [];
//Rechnungskauf ohne PAYONE
if(Request::get('payment_method') === 'fnc#MIV'){
}
//need precheck the card //need precheck the card
if(Request::get('payment_method') === 'cc'){ if(Request::get('payment_method') === 'cc'){
$pay = new PayoneController(); $pay = new PayoneController();
@ -249,7 +288,7 @@ class CheckoutController extends Controller
} }
} }
//need precheck the card //need precheck the SEPA
if(Request::get('payment_method') === 'elv' && is_null(Request::get('mandate_identification'))){ if(Request::get('payment_method') === 'elv' && is_null(Request::get('mandate_identification'))){
$pay = new PayoneController(); $pay = new PayoneController();
$pay->init($shopping_user, $shopping_order); $pay->init($shopping_user, $shopping_order);
@ -270,6 +309,7 @@ class CheckoutController extends Controller
\Session::flash('customermessage', $ret['elv']['customermessage']); \Session::flash('customermessage', $ret['elv']['customermessage']);
return redirect(route('checkout.checkout_card'))->withInput(Request::all()); return redirect(route('checkout.checkout_card'))->withInput(Request::all());
} }
// mandate_status active
if($ret['elv']['status'] === 'APPROVED' && $ret['elv']['mandate_status'] !== "active"){ if($ret['elv']['status'] === 'APPROVED' && $ret['elv']['mandate_status'] !== "active"){
\Session::flash('elv-managemandate', 1); \Session::flash('elv-managemandate', 1);
\Session::flash('elv-mandate_identification', $ret['elv']['mandate_identification']); \Session::flash('elv-mandate_identification', $ret['elv']['mandate_identification']);
@ -294,7 +334,6 @@ class CheckoutController extends Controller
$ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder']; $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder'];
//check abo and save the mandate //check abo and save the mandate
$this->storeUserPaymentsData($shopping_user, $ret); $this->storeUserPaymentsData($shopping_user, $ret);
} }
//other //other
$pay = new PayoneController(); $pay = new PayoneController();
@ -359,9 +398,15 @@ class CheckoutController extends Controller
if($payt->shopping_payment->reference != $reference){ if($payt->shopping_payment->reference != $reference){
abort(404); abort(404);
} }
Yard::instance('shopping')->destroy(); Yard::instance('shopping')->destroy();
$this->destroy(); $this->destroy();
//vor
//Rechnung MIV
if($payt->status === 'FNCMIV'){
$this->directPaymentStatus($payt);
}
$data = [ $data = [
'user_shop' => Util::getUserShop(), 'user_shop' => Util::getUserShop(),
'order_reference' => $payt->shopping_payment->reference, 'order_reference' => $payt->shopping_payment->reference,
@ -392,6 +437,7 @@ class CheckoutController extends Controller
$shopping_user = ShoppingUser::find($this->getPayments('shopping_user_id')); $shopping_user = ShoppingUser::find($this->getPayments('shopping_user_id'));
if($shopping_user){ if($shopping_user){
$shopping_user->fill($data); $shopping_user->fill($data);
$shopping_user->mode = null;
$shopping_user->save(); $shopping_user->save();
} }
} }
@ -420,6 +466,7 @@ class CheckoutController extends Controller
'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''), 'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''),
'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
'weight' => Yard::instance('shopping')->weight(), 'weight' => Yard::instance('shopping')->weight(),
'txaction' => 'prev',
'mode' => Util::getUserShoppingMode(), 'mode' => Util::getUserShoppingMode(),
]; ];
$shopping_order= false; $shopping_order= false;
@ -500,4 +547,24 @@ class CheckoutController extends Controller
$this->session->remove($this->instance); $this->session->remove($this->instance);
} }
private function directPaymentStatus(PaymentTransaction $payt){
if(isset($payt->transmitted_data['param'])){
$shopping_order = ShoppingOrder::find($payt->transmitted_data['param']);
$shopping_order->txaction = 'invoice_open';
$shopping_order->save();
$shopping_payment = ShoppingPayment::where('reference', $payt->transmitted_data['reference'])->first();
$shopping_payment->txaction = 'invoice_open';
$shopping_payment->save();
$send_link = Payment::paymentStatusPaidAction($shopping_order, false);
$data = [
'mode' => $payt->transmitted_data['mode'],
'txaction' => $payt->txaction,
'send_link' => $send_link,
];
Payment::paymentStatusSendMail($shopping_order, $shopping_payment, $data);
}
}
} }

View file

@ -457,6 +457,12 @@ class WizardController extends Controller
$identifier = Util::getToken(); $identifier = Util::getToken();
} while( ShoppingInstance::where('identifier', $identifier)->count() ); } while( ShoppingInstance::where('identifier', $identifier)->count() );
$data = [];
$data['is_from'] = 'wizard';
$data['is_for'] = 'me';
ShoppingInstance::create([ ShoppingInstance::create([
'identifier' => $identifier, 'identifier' => $identifier,
'user_shop_id' => 1, //is first faker shop for buy intern 'user_shop_id' => 1, //is first faker shop for buy intern
@ -464,6 +470,8 @@ class WizardController extends Controller
'payment' => 4, //Berater Wizard 'payment' => 4, //Berater Wizard
'subdomain' => url('/'), 'subdomain' => url('/'),
'country_id' => Yard::instance('shopping')->getShippingCountryId(), 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
'shopping_data' => $data,
'back' => url()->previous(),
]); ]);
Yard::instance('shopping')->store($identifier); Yard::instance('shopping')->store($identifier);

View file

@ -38,7 +38,10 @@ class Checkout
} }
if($shopping_instance->back){ if($shopping_instance->back){
\Session::put('back_link', $shopping_instance->back); \Session::put('back_link', $shopping_instance->back);
} }
\Session::put('new_session', true);
Yard::instance('shopping')->destroy(); Yard::instance('shopping')->destroy();
//restore yard //restore yard
Yard::instance('shopping')->restore($request->route('identifier')); Yard::instance('shopping')->restore($request->route('identifier'));

View file

@ -71,7 +71,7 @@ class PaymentMethod extends Model
return isset(self::$showATs[$this->show_at]) ? self::$showATs[$this->show_at] : '-'; return isset(self::$showATs[$this->show_at]) ? self::$showATs[$this->show_at] : '-';
} }
public static function getDefaultAsArray(){ public static function getDefaultAsArray($short=false){
return PaymentMethod::where('active', true)->where('default', true)->pluck('id'); return PaymentMethod::where('active', true)->where('default', true)->pluck('id');
} }
} }

View file

@ -89,6 +89,11 @@ class ShoppingPayment extends Model
return 'Sofort Überweisung'; return 'Sofort Überweisung';
} }
} }
if($this->clearingtype === 'fnc') {
if ($this->onlinebanktransfertype === 'MIV') {
return 'Rechnung';
}
}
} }
public function getPaymentAmount(){ public function getPaymentAmount(){

View file

@ -2,9 +2,11 @@
namespace App\Services; namespace App\Services;
use App\Mail\MailCheckout;
use App\Models\ShoppingOrder; use App\Models\ShoppingOrder;
use App\Models\ShoppingPayment; use App\Models\ShoppingPayment;
use App\User; use App\User;
use Illuminate\Support\Facades\Mail;
class Payment class Payment
{ {
@ -14,6 +16,7 @@ class Payment
'appointed' => "offen", 'appointed' => "offen",
'failed' => "abbruch", 'failed' => "abbruch",
'extern' => "extern", 'extern' => "extern",
'invoice_open' => "Re. offen",
'NULL' => 'keine Zahlung', 'NULL' => 'keine Zahlung',
]; ];
@ -22,6 +25,7 @@ class Payment
'appointed' => "warning", 'appointed' => "warning",
'failed' => "danger", 'failed' => "danger",
'extern' => "success", 'extern' => "success",
'invoice_open' => "warning",
]; ];
@ -44,7 +48,7 @@ class Payment
return '<span class="badge badge-pill badge-default">'.strtoupper($shopping_order->mode).' - '.self::getFormattedTxaction($shopping_order->txaction).'</span>'; return '<span class="badge badge-pill badge-default">'.strtoupper($shopping_order->mode).' - '.self::getFormattedTxaction($shopping_order->txaction).'</span>';
} }
if($shopping_order->mode === 'dev'){ if($shopping_order->mode === 'dev'){
return '<span class="badge badge-pill badge-default">'.strtoupper($shopping_order->mode).' - '.self::getFormattedTxaction($shopping_order->txaction).'</span>'; return '<span class="badge badge-pill badge-info">'.strtoupper($shopping_order->mode).' - '.self::getFormattedTxaction($shopping_order->txaction).'</span>';
} }
return '<span class="badge badge-pill badge-'.self::getFormattedTxactionColor($shopping_order->txaction).'">'.self::getFormattedTxaction($shopping_order->txaction).'</span>'; return '<span class="badge badge-pill badge-'.self::getFormattedTxactionColor($shopping_order->txaction).'">'.self::getFormattedTxaction($shopping_order->txaction).'</span>';
} }
@ -57,4 +61,79 @@ class Payment
} }
public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){
$send_link = false;
$shopping_order->setUserHistoryValue(['status' => 8]);
Shop::userOrders();
$shopping_order->paid = $paid;
$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);
$user->save();
$send_link = true;
//new date
$date = \Carbon::now()->modify('1 year');
if($user->payment_account && $user->daysActiveAccount()>0){
$date = \Carbon::parse($user->payment_account)->modify('1 year');
}
foreach ($shopping_order_item->product->action as $do){
if($shopping_order_item->product->getActionName($do) === 'payment_for_account'){
$user->payment_order_id = $shopping_order_item->product->id; //34
$user->payment_account = $date;
$user->wizard = 100;
$shopping_order->setUserHistoryValue(['status' => 9]);
}
if($shopping_order_item->product->getActionName($do) === 'payment_for_shop'){
$user->payment_order_id = $shopping_order_item->product->id; //35
$user->payment_shop = $date;
$user->wizard = 100;
$shopping_order->setUserHistoryValue(['status' => 9]);
}
if($shopping_order_item->product->getActionName($do) === 'payment_for_shop_upgrade'){
if($shopping_order_item->product->upgrade_to_id){
$user->payment_order_id = $shopping_order_item->product->upgrade_to_id;
}
$user->payment_shop = $user->payment_account; //same Date, is upgrade
$shopping_order->setUserHistoryValue(['status' => 9]);
}
if($shopping_order_item->product->getActionName($do) === 'payment_for_lead_upgrade'){
if($shopping_order_item->product->upgrade_to_id){
$user->m_level = $shopping_order_item->product->upgrade_to_id;
}
}
$user->save();
}
}
}
}
}
return $send_link;
}
public static function paymentStatusSendMail(ShoppingOrder $shopping_order, $shopping_payment, $data){
$bcc = [];
$billing_email = $shopping_order->shopping_user->billing_email;
if(!$billing_email){
if($data['mode'] === 'test'){
$billing_email = config('app.checkout_test_mail');
}else{
$billing_email = config('app.checkout_mail');
}
}
if($data['mode'] === 'test'){
$bcc[] = config('app.checkout_test_mail');
}else{
$bcc[] = config('app.checkout_mail');
}
if(!$shopping_order->shopping_user->is_like && $shopping_order->shopping_user->member){
$bcc[] = $shopping_order->shopping_user->member->email;
}
Mail::to($billing_email)->bcc($bcc)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $data['send_link'], $data['mode']));
}
} }

View file

@ -2,6 +2,8 @@
namespace App\Services; namespace App\Services;
use App\Models\Country;
use App\Models\ShippingCountry;
use App\Models\ShoppingUser; use App\Models\ShoppingUser;
use Gloudemans\Shoppingcart\CartItem; use Gloudemans\Shoppingcart\CartItem;
@ -40,4 +42,22 @@ class Shop
} }
} }
} }
public static function getShippingCountryCountryId($shipping_country_id){
$shippingCountry = ShippingCountry::find($shipping_country_id);
if($shippingCountry && $shippingCountry->country){
return $shippingCountry->country->id;
}
return 1; //default DE
}
public static function getCountryShippingCountryId($country_id){
$shippingCountry = ShippingCountry::whereCountryId($country_id)->first();
if($shippingCountry){
return $shippingCountry->id;
}
return ShippingCountry::all()->first()->id;
}
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View file

@ -70,5 +70,6 @@
'checkout_mail_bank_total' => 'Gesamtbetrag', 'checkout_mail_bank_total' => 'Gesamtbetrag',
'checkout_mail_bank_code' => 'Verwendungszweck', 'checkout_mail_bank_code' => 'Verwendungszweck',
'checkout_mail_pay_approved' => 'Deine Zahlung wurde genehmigt, eine Bestätigung der Zahlung wird automatisch erstellt.', 'checkout_mail_pay_approved' => 'Deine Zahlung wurde genehmigt, eine Bestätigung der Zahlung wird automatisch erstellt.',
'checkout_mail_pay_invoice_open' => 'Deine Zahlung per Rechnung wurde genehmigt.',
'checkout_mail_system_status' => 'SystemStatus:', 'checkout_mail_system_status' => 'SystemStatus:',
); );

View file

@ -156,11 +156,11 @@
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%"> <table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%">
<tr> <tr>
<td style="line-height:1.6em;"> <td style="line-height:1.6em;">
@if($txaction == 'failed') @if($txaction === 'failed')
<b>{{__('email.checkout_mail_pay_error')}}</b><br> <b>{{__('email.checkout_mail_pay_error')}}</b><br>
@elseif($txaction == 'appointed') @elseif($txaction === 'appointed')
@if($shopping_payment->clearingtype == "vor") @if($shopping_payment->clearingtype === "vor")
<b>{{__('email.checkout_mail_pay_pre')}}</b><br> <b>{{__('email.checkout_mail_pay_pre')}}</b><br>
{{__('email.checkout_mail_pay_pre_c1')}} {{ number_format( floatval($shopping_payment->amount/100), 2, ",", ".") }} {{__('email.checkout_mail_pay_pre_c2')}}<br> {{__('email.checkout_mail_pay_pre_c1')}} {{ number_format( floatval($shopping_payment->amount/100), 2, ",", ".") }} {{__('email.checkout_mail_pay_pre_c2')}}<br>
<p> <p>
@ -176,6 +176,8 @@
@else @else
<b>{{__('email.checkout_mail_pay_approved')}}</b><br> <b>{{__('email.checkout_mail_pay_approved')}}</b><br>
@endif @endif
@elseif($txaction === 'invoice_open')
<b>{{__('email.checkout_mail_pay_invoice_open')}}</b><br>
@else @else
<b>{{__('email.checkout_mail_system_status')}} {{$txaction}}</b><br> <b>{{__('email.checkout_mail_system_status')}} {{$txaction}}</b><br>

View file

@ -2,10 +2,10 @@
@section('content') @section('content')
<h4 class="font-weight-bold py-2 mb-2"> <h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('user_shop_orders')}}" class="btn btn-sm btn-default float-right">zurück</a> <a href="{{route('user_orders')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Bestellung Kunde') }} <span class="text-muted">#{{$shopping_order->id}}</span> {{ __('Bestellung Kunde') }} <span class="text-muted">#{{$shopping_order->id}}</span>
</h4> </h4>
@include('admin.sales._detail') @include('admin.sales._detail')
<a href="{{route('user_shop_orders')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a> <a href="{{route('user_orders')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
@endsection @endsection

View file

@ -7,83 +7,47 @@
<div class="card"> <div class="card">
<div class="card-datatable table-responsive"> <div class="card-datatable table-responsive">
<div class="ml-4"> <table class="datatable-users table table-striped table-bordered">
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
<thead> <thead>
<tr> <tr>
<th>#</th> <th>#</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th> <th>{{__('E-Mail')}}</th>
<th>{{__('Anrede')}}</th> <th>{{__('Datum')}}</th>
<th>{{__('Firma')}}</th> <th>{{__('Status')}}</th>
<th>{{__('Vorname')}}</th> <th>{{__('Betrag')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('PLZ')}}</th>
<th>{{__('Stadt')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Käufe')}}</th> <th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
</tr> </tr>
</thead> </thead>
<tbody>
</tbody>
</table> </table>
<div class="mt-4 ml-4">
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div> </div>
</div> </div>
</div>
<script> <script>
$( document ).ready(function() { $( document ).ready(function() {
$('.datatable-users').dataTable({
var oTable = $('#datatables-customers').DataTable({
"processing": true, "processing": true,
"serverSide": true, "serverSide": true,
ajax: { "ajax": '{!! route('user_orders_datatable') !!}',
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[0, "desc" ]], "order": [[0, "desc" ]],
"columns": [ "columns": [
{ data: 'id', searchable: false}, { data: 'id', searchable: false },
{ data: 'billing_email', name: 'billing_email' }, { data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'billing_salutation', name: 'billing_salutation' }, { data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'billing_company', name: 'billing_company' }, { data: 'shopping_user.billing_email', name: 'shopping_user.billing_email' },
{ data: 'billing_firstname', name: 'billing_firstname' }, { data: 'created_at', name: 'shopping_orders.created_at' },
{ data: 'billing_lastname', name: 'billing_lastname' }, { data: 'txaction', name: 'txaction' },
{ data: 'billing_zipcode', name: 'billing_zipcode' }, { data: 'total_shipping', name: 'total_shipping' },
{ data: 'billing_city', name: 'billing_city' }, { data: 'shopping_user.orders', name: 'shopping_user.orders' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
], ],
"bLengthChange": false, "bLengthChange": false,
"iDisplayLength": 50, "iDisplayLength": 100,
"language": { "language": {
"url": "/js/German.json" "url": "/js/German.json"
} }
}); });
/* $('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_customer_member').on('change', function(){
oTable.draw();
});
*/
}); });
</script> </script>
@endsection @endsection

View file

@ -126,6 +126,12 @@
<p>Deine Zahlung wird bearbeitet, eine Bestätigung zur Zahlungsabwicklung wird automatisch erstellt.</p> <p>Deine Zahlung wird bearbeitet, eine Bestätigung zur Zahlungsabwicklung wird automatisch erstellt.</p>
<hr /> <hr />
@endif @endif
@if($pay_trans->shopping_payment->clearingtype === "fnc" && $pay_trans->shopping_payment->onlinebanktransfertype === 'MIV')
<h4>Bezahlung per Rechnung:</h4>
<p>Deine Bestellung wird bearbeitet, eine Bestätigung zur Bestellungsabwicklung wird automatisch erstellt.</p>
<hr />
@endif
@endif @endif
<p> <p>
<strong>Dein Team von mivita.care</strong> <strong>Dein Team von mivita.care</strong>

View file

@ -148,7 +148,7 @@
<div class="m-checkout"> <div class="m-checkout">
{!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'checkout_card_final']) !!} {!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'checkout_card_final']) !!}
{!! Form::hidden('selected_country') !!} {!! Form::hidden('selected_country', '') !!}
{!! Form::hidden('is_for', $shopping_user->is_for) !!} {!! Form::hidden('is_for', $shopping_user->is_for) !!}
{!! Form::hidden('is_from', $shopping_user->is_from) !!} {!! Form::hidden('is_from', $shopping_user->is_from) !!}
@ -177,6 +177,8 @@
<fieldset class="mb-0 box-border-shadow p-20"> <fieldset class="mb-0 box-border-shadow p-20">
<h4>Rechnung &amp; Versand</h4> <h4>Rechnung &amp; Versand</h4>
<hr /> <hr />
@if($is_from === 'shopping')
<div class="is_from_shopping">
<div class="row"> <div class="row">
<div class="col-md-12 col-sm-12"> <div class="col-md-12 col-sm-12">
<div class="form-group"> <div class="form-group">
@ -258,11 +260,11 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12 col-sm-12"> <div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="billing_state">Land * {{$shopping_user->billing_state}}</label> <label class="mt-0 fs-14 fw-400" for="billing_state">Land *</label>
<select id="billing_state" name="billing_state" class="form-control required"> <select id="billing_state" name="billing_state" class="form-control required">
{!! HTMLHelper::getCountriesForShipping($shopping_user->billing_state) !!} {!! HTMLHelper::getCountriesForShipping($shopping_user->billing_state) !!}
</select> </select>
<input type="hidden" name="billing_country_id" value="{{Yard::instance('shopping')->getShippingCountryCountryId()}}"> <input type="hidden" name="billing_country_id" value="{{ \App\Services\Shop::getShippingCountryCountryId($shopping_user->billing_state)}}">
<span class="info-small" id="show_shipping_country_info">Bei der Änderung des Versandlandes werden die Versandkosten neu berechnet.</span> <span class="info-small" id="show_shipping_country_info">Bei der Änderung des Versandlandes werden die Versandkosten neu berechnet.</span>
</div> </div>
</div> </div>
@ -303,8 +305,94 @@
@endif @endif
</div> </div>
</div> </div>
</div>
@else
<div class="is_from_user">
{!! Form::hidden('billing_company', $shopping_user->billing_company) !!}
{!! Form::hidden('billing_salutation', $shopping_user->billing_salutation) !!}
{!! Form::hidden('billing_firstname', $shopping_user->billing_firstname) !!}
{!! Form::hidden('billing_lastname', $shopping_user->billing_lastname) !!}
{!! Form::hidden('billing_address', $shopping_user->billing_address) !!}
{!! Form::hidden('billing_address_2', $shopping_user->billing_address_2) !!}
{!! Form::hidden('billing_zipcode', $shopping_user->billing_zipcode) !!}
{!! Form::hidden('billing_city', $shopping_user->billing_city) !!}
{!! Form::hidden('billing_phone', $shopping_user->billing_phone) !!}
{!! Form::hidden('billing_email', $shopping_user->billing_email) !!}
{!! Form::hidden('billing_state', $shopping_user->billing_state) !!}
{!! Form::hidden('billing_country_id', \App\Services\Shop::getShippingCountryCountryId($shopping_user->billing_state)) !!}
<div class="row">
@if($shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->billing_country->getLocated() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->billing_phone }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">E-Mail</div>
{{ $shopping_user->billing_email }}
</div>
</div>
<p class="text-muted small mb-0">Hinterlegte Rechnungsdaten von Beratern können nur im Salescenter geändert werden.</p>
</div>
@endif
<div class="row">
<div class="col-md-12 col-sm-12">
<hr>
<label class="checkbox {{ ($errors->has('accepted_data_checkbox') ? 'error' : '') }}" for="accepted_data_checkbox" style="font-size: 14px;line-height: 22px; font-weight: 400">
{!! Form::checkbox('accepted_data_checkbox', 1, $shopping_user->accepted_data_checkbox, ['id'=>'accepted_data_checkbox', 'class' => 'form-control '.($errors->has('accepted_data_checkbox') ? 'error' : '')]) !!}
@if($shopping_user->auth_user_id)
<i></i> Mit Klick auf "Jetzt kaufen" akzeptiere ich die Allgemeinen Geschäftsbedingungen und die Datenschutzbelehrung, damit für die Bestellung meine Daten verarbeitet werden können.
@else
<i></i> Mit Klick auf "Jetzt kaufen" akzeptiere ich die <a href="{{ url('/agb') }}">Allgemeinen Geschäftsbedingungen</a>, die <a target="_blank" href="{{ asset('download/mivita_widerruf_formular.pdf') }}">Widerrufsbelehrung</a> und die <a href="{{ url('/datenschutz') }}">Datenschutzerklärung</a>, damit für die Bestellung meine Daten verarbeitet werden können.
@endif
</label>
@if ($errors->has('accepted_data_checkbox'))
<label for="accepted_data_checkbox" class="error text-danger small" style="display: block;">{{ $errors->first('accepted_data_checkbox') }}</label>
@endif
</div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
@ -414,11 +502,11 @@
<div class="row"> <div class="row">
<div class="col-md-12 col-sm-12"> <div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="shipping_state">Land * {{$shopping_user->shipping_state}}</label> <label class="mt-0 fs-14 fw-400" for="shipping_state">Land *</label>
<select id="shipping_state" name="shipping_state" class="form-control required"> <select id="shipping_state" name="shipping_state" class="form-control required">
{!! HTMLHelper::getCountriesForShipping($shopping_user->shipping_state) !!} {!! HTMLHelper::getCountriesForShipping($shopping_user->shipping_state) !!}
</select> </select>
<input type="hidden" name="shipping_country_id" value="{{Yard::instance('shopping')->getShippingCountryCountryId()}}"> <input type="hidden" name="shipping_country_id" value="{{ \App\Services\Shop::getShippingCountryCountryId($shopping_user->shipping_state) }}">
<span class="info-small">Bei der Änderung des Landes werden die Versandkosten neu berechnet.</span> <span class="info-small">Bei der Änderung des Landes werden die Versandkosten neu berechnet.</span>
</div> </div>
</div> </div>
@ -437,11 +525,11 @@
<!-- /SHIPPING --> <!-- /SHIPPING -->
@if(isset($order_reference)) @if(isset($order_reference))
<a href="{{ Util::getUserShopBackUrl($order_reference) }}" class="btn btn-default btn-sm btn- size-15 mt-4"> <a href="{{ Util::getUserShopBackUrl($order_reference) }}" class="btn btn-default btn-sm btn- size-15 mt-4 mb-4">
<i class="fa fa-chevron-left"></i> zurück zum Shop <i class="fa fa-chevron-left"></i> zurück zum Shop
</a> </a>
@else @else
<a href="{{ Util::getUserCardBackUrl('/card/show') }}" class="btn btn-default btn-sm btn- size-15 mt-4"> <a href="{{ Util::getUserCardBackUrl('/card/show') }}" class="btn btn-default btn-sm btn- size-15 mt-4 mb-4">
@if(Util::getUserPaymentFor() > 1) @if(Util::getUserPaymentFor() > 1)
<i class="fa fa-chevron-left"></i> zurück {{ Util::getMyMivitaUrl(false) }} <i class="fa fa-chevron-left"></i> zurück {{ Util::getMyMivitaUrl(false) }}
@else @else
@ -463,7 +551,11 @@
<div class="toggle active"> <div class="toggle active">
<div class="toggle-content"> <div class="toggle-content">
<div class="row nomargin-bottom"> <div class="row nomargin-bottom">
@if(($shopping_user->abo_options === 1) && (Util::getUserPaymentFor() >= 3)) @if(($shopping_user->abo_options === 1) && (Util::getUserPaymentFor() >= 3))
@if(array_key_exists('SEPA', $payment_methods_active) && in_array($payment_methods_active['SEPA'], $payment_methods))
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%"> <label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
{!! Form::radio('payment_method', 'elv', '1') !!} {!! Form::radio('payment_method', 'elv', '1') !!}
@ -472,14 +564,19 @@
</label> </label>
</div> </div>
@else @else
<p>Zahlungsmethode nicht freigeschaltet, bitte wende dich an {{ config('app.default_mail') }}</p>
@endif
@else
@if(array_key_exists('PP', $payment_methods_active) && in_array($payment_methods_active['PP'], $payment_methods))
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left nomargin-top" style="width: 100%"> <label class="mt-0 fs-14 fw-400 radio pull-left nomargin-top" style="width: 100%">
{!! Form::radio('payment_method', 'wlt#PPE', (!old('payment_method') ? '1' : '')) !!} {!! Form::radio('payment_method', 'wlt#PPE', (!old('payment_method') ? '1' : '')) !!}
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> PayPal</span> <i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> PayPal</span>
<img class="float-right" width="90" src="{{asset('images/payments-assets/paypal.png')}}" alt="PayPal"> <img class="float-right" width="90" src="{{asset('images/payments-assets/paypal.png')}}" alt="PayPal">
</label> </label>
</div> </div>
@endif
@if(array_key_exists('CC', $payment_methods_active) && in_array($payment_methods_active['CC'], $payment_methods))
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
<label class="mt-4 fs-14 fw-400 radio pull-left nomargin-top" style="width: 100%"> <label class="mt-4 fs-14 fw-400 radio pull-left nomargin-top" style="width: 100%">
{!! Form::radio('payment_method', 'cc', '') !!} {!! Form::radio('payment_method', 'cc', '') !!}
@ -487,6 +584,8 @@
<img class="float-right" width="90" src="{{asset('images/payments-assets/creditcard.png')}}" alt="Mastercard + Visa"> <img class="float-right" width="90" src="{{asset('images/payments-assets/creditcard.png')}}" alt="Mastercard + Visa">
</label> </label>
</div> </div>
@endif
@if(array_key_exists('SB', $payment_methods_active) && in_array($payment_methods_active['SB'], $payment_methods))
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%"> <label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
{!! Form::radio('payment_method', 'sb#PNT', '') !!} {!! Form::radio('payment_method', 'sb#PNT', '') !!}
@ -494,6 +593,8 @@
<img class="float-right" width="90" src="{{asset('images/payments-assets/sofort.png')}}" alt="Sofort"> <img class="float-right" width="90" src="{{asset('images/payments-assets/sofort.png')}}" alt="Sofort">
</label> </label>
</div> </div>
@endif
@if(array_key_exists('SEPA', $payment_methods_active) && in_array($payment_methods_active['SEPA'], $payment_methods))
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%"> <label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
{!! Form::radio('payment_method', 'elv', '') !!} {!! Form::radio('payment_method', 'elv', '') !!}
@ -501,17 +602,29 @@
<img class="float-right" width="90" src="{{asset('images/payments-assets/sepa.png')}}" alt="SEPA Lastschrift"> <img class="float-right" width="90" src="{{asset('images/payments-assets/sepa.png')}}" alt="SEPA Lastschrift">
</label> </label>
</div> </div>
@endif
@if(array_key_exists('VOR', $payment_methods_active) && in_array($payment_methods_active['VOR'], $payment_methods))
<div class="col-lg-12 nomargin clearfix"> <div class="col-lg-12 nomargin clearfix">
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%"> <label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
{!! Form::radio('payment_method', 'vor', '') !!} {!! Form::radio('payment_method', 'vor', '') !!}
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Vorkasse</span> <i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Vorkasse</span>
<img class="float-right" width="90" src="{{asset('images/payments-assets/vor.png')}}" alt="Vorkasse"> <img class="float-right" width="90" src="{{asset('images/payments-assets/vor.png')}}" alt="Vorkasse">
</label> </label>
</div> </div>
@endif @endif
@if(array_key_exists('FNC', $payment_methods_active) && in_array($payment_methods_active['FNC'], $payment_methods))
<div class="col-lg-12 nomargin clearfix">
<label class="mt-4 fs-14 fw-400 radio pull-left" style="width: 100%">
<input name="payment_method" type="radio" value="fnc#MIV" />
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> Rechnungskauf</span>
<img class="float-right" width="90" src="{{asset('images/payments-assets/fnc.png')}}" alt="Vorkasse">
</label>
</div>
@endif
@endif
{{-- <div class="col-lg-12 nomargin clearfix"> {{--
<div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left" style="width: 100%"> <label class="mt-0 fs-14 fw-400 radio pull-left" style="width: 100%">
<input name="payment_method" type="radio" value="sb#GPY" /> <input name="payment_method" type="radio" value="sb#GPY" />
<i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> giropay - Online-Überweisung</span> <i></i> <span class="weight-400"><span class="fa fa-check text-primary"></span> giropay - Online-Überweisung</span>
@ -744,6 +857,10 @@
jQuery("#shipswitch").bind("click", function() { jQuery("#shipswitch").bind("click", function() {
jQuery('#shipping').slideToggle(200, function() { jQuery('#shipping').slideToggle(200, function() {
// scroll down to shipping area. // scroll down to shipping area.
if($('#billing_state').val() !== $('#shipping_state').val()){
$('input[name="selected_country"]').val('change');
$('form#checkout_card_final').submit();
}
if(jQuery('#shipping').is(":visible")) { if(jQuery('#shipping').is(":visible")) {
_scrollTo('#shipping', 150); _scrollTo('#shipping', 150);
showShippingCountryFor('shipping'); showShippingCountryFor('shipping');

View file

@ -247,6 +247,8 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
//user order & do order //user order & do order
Route::get('/user/orders', 'User\OrderController@index')->name('user_orders'); Route::get('/user/orders', 'User\OrderController@index')->name('user_orders');
Route::get('/user/orders/datatable', 'User\OrderController@ordersDatatable')->name('user_orders_datatable');
Route::get('/user/order/detail/{id}', 'User\OrderController@detail')->name('user_order_detail'); Route::get('/user/order/detail/{id}', 'User\OrderController@detail')->name('user_order_detail');
Route::get('/user/order/my/delivery/{for}/{id?}', 'User\OrderController@delivery')->name('user_order_my_delivery'); Route::get('/user/order/my/delivery/{for}/{id?}', 'User\OrderController@delivery')->name('user_order_my_delivery');
@ -256,9 +258,7 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
Route::post('/user/order/my/list/{for}/{id?}', 'User\OrderController@list')->name('user_order_my_list'); Route::post('/user/order/my/list/{for}/{id?}', 'User\OrderController@list')->name('user_order_my_list');
Route::post('/user/order/my/payment/{for}/{id?}', 'User\OrderController@payment')->name('user_order_my_payment'); Route::post('/user/order/my/payment/{for}/{id?}', 'User\OrderController@payment')->name('user_order_my_payment');
Route::get('/user/order/my/datatable', 'User\OrderController@datatable')->name('user_order_my_datatable'); Route::get('/user/order/my/datatable', 'User\OrderController@datatable')->name('user_order_my_datatable');
Route::post('/user/order/my/perform/request/', 'User\OrderController@performRequest')->name('user_order_my_perform_request'); Route::post('/user/order/my/perform/request/', 'User\OrderController@performRequest')->name('user_order_my_perform_request');
//products images //products images