Free Shipping, Business Levels correction, Products Buying, Fonts

This commit is contained in:
Kevin Adametz 2023-01-25 12:37:29 +01:00
parent 3f2fbd6d5b
commit 0341c9c189
197 changed files with 9161 additions and 329 deletions

View file

@ -288,7 +288,15 @@ class OrderController extends Controller
public function datatable(){
if(Request::get('shipping_is_for') === 'me'){
$query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', '2');
// $query = Product::with('product_buyings')->select('products.*')->where('active', true)->whereJsonContains('show_on', '2');
$query = Product::with('product_buyings')
->select('products.*')->where('products.active', true)
->whereJsonContains('products.show_on', '2')
->whereDoesntHave('product_buyings', function ($q){
$q->where('product_buyings.user_id', '=', \Auth::user()->id);
});
}else{
$query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', '3');
}