Free Shipping, Business Levels correction, Products Buying, Fonts
This commit is contained in:
parent
3f2fbd6d5b
commit
0341c9c189
197 changed files with 9161 additions and 329 deletions
80
app/Services/SyS/BuyingsProducts.php
Normal file
80
app/Services/SyS/BuyingsProducts.php
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
namespace App\Services\SyS;
|
||||
|
||||
use Carbon;
|
||||
use Request;
|
||||
use App\Models\SySetting;
|
||||
use App\Models\ProductBuying;
|
||||
use App\Cron\BusinessUsersStore;
|
||||
use App\Models\ShoppingOrderItem;
|
||||
|
||||
class BuyingsProducts
|
||||
{
|
||||
|
||||
public static function show()
|
||||
{
|
||||
|
||||
$data = [
|
||||
];
|
||||
|
||||
return view('sys.tools.buyings_products', $data);
|
||||
}
|
||||
|
||||
|
||||
public static function store()
|
||||
{
|
||||
|
||||
$ShoppingOrderItems = ShoppingOrderItem::where('product_id', 37)->get();
|
||||
$count = 0;
|
||||
foreach($ShoppingOrderItems as $ShoppingOrderItem){
|
||||
if(!ProductBuying::where('user_id', $ShoppingOrderItem->shopping_order->auth_user_id)->where('product_id', $ShoppingOrderItem->product_id)->count()){
|
||||
ProductBuying::create([
|
||||
'user_id' => $ShoppingOrderItem->shopping_order->auth_user_id,
|
||||
'product_id' => 37,
|
||||
'amount' => 1
|
||||
]);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
}
|
||||
dump("ADD ".$count." product_id 37");
|
||||
|
||||
$ShoppingOrderItems = ShoppingOrderItem::where('product_id', 100)->get();
|
||||
$count = 0;
|
||||
foreach($ShoppingOrderItems as $ShoppingOrderItem){
|
||||
if(!ProductBuying::where('user_id', $ShoppingOrderItem->shopping_order->auth_user_id)->where('product_id', $ShoppingOrderItem->product_id)->count()){
|
||||
ProductBuying::create([
|
||||
'user_id' => $ShoppingOrderItem->shopping_order->auth_user_id,
|
||||
'product_id' => 118,
|
||||
'amount' => 1
|
||||
]);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
}
|
||||
dump("ADD ".$count." product_id 100 to 118");
|
||||
|
||||
|
||||
$ShoppingOrderItems = ShoppingOrderItem::where('product_id', 118)->get();
|
||||
$count = 0;
|
||||
foreach($ShoppingOrderItems as $ShoppingOrderItem){
|
||||
if(!ProductBuying::where('user_id', $ShoppingOrderItem->shopping_order->auth_user_id)->where('product_id', $ShoppingOrderItem->product_id)->count()){
|
||||
ProductBuying::create([
|
||||
'user_id' => $ShoppingOrderItem->shopping_order->auth_user_id,
|
||||
'product_id' => 118,
|
||||
'amount' => 1
|
||||
]);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
}
|
||||
dump("ADD ".$count." product_id 118");
|
||||
|
||||
|
||||
die();
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('sysadmin_tool', ['buyings_products']));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -97,6 +97,20 @@ class DomainSSL
|
|||
|
||||
}
|
||||
|
||||
if(isset($data['update_ssl'])){
|
||||
$user_shop = UserShop::findOrFail($data['update_ssl']);
|
||||
$subdomain_name = $user_shop->slug.'.mivita.care';
|
||||
$kas = new KasController();
|
||||
$ssl = KasSLLController::getApiSSLParameter();
|
||||
$pra = array(
|
||||
'hostname' => $subdomain_name
|
||||
);
|
||||
$pra = array_merge($pra, $ssl);
|
||||
$value = $kas->action('update_ssl', $pra);
|
||||
\Session()->flash('alert-success', 'update SSL: '.$value.'');
|
||||
|
||||
}
|
||||
|
||||
|
||||
return back();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue