Custom Price / Land / User Order Homeparty

This commit is contained in:
Kevin Adametz 2021-08-20 18:22:21 +02:00
parent d46824a4ac
commit 51d81d8ec6
55 changed files with 1951 additions and 681 deletions

View file

@ -29,8 +29,8 @@ class SiteController extends Controller
$set_products = ['aloe-vera-koerper-set', 'baby-set', 'aloe-vera-gel-set'];
$data = [
'products' => Product::whereIn('slug', $products)->where('active', true)->where('show_at', '<=', 1)->get(),
'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->where('show_at', '<=', 1)->get(),
'products' => Product::whereIn('slug', $products)->where('active', true)->whereJsonContains('show_on', '1')->get(),
'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->whereJsonContains('show_on', '1')->get(),
'user_shop' => Util::getUserShop(),
'site' => IqSite::find(1),
];
@ -47,7 +47,7 @@ class SiteController extends Controller
if($product_slug){
$category = Category::where('slug', $subsite)->where('active', true)->first();
$product = Product::where('slug', $product_slug)->where('active', true)->where('show_at', '<=', 1)->first();
$product = Product::where('slug', $product_slug)->where('active', true)->whereJsonContains('show_on', '1')->first();
if ($category && $product) {
$data = [
@ -55,7 +55,7 @@ class SiteController extends Controller
'subsite' => $subsite,
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
'product' => $product,
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(),
];
return view('web.templates.produkte-show', $data);
@ -74,7 +74,7 @@ class SiteController extends Controller
$product_categories = ProductCategory::where('category_id', $category->id)->whereHas('product', function ($query) use ($category) {
$query->where('active', true)->where('show_at', '<=', 1);
$query->where('active', true)->whereJsonContains('show_on', '1');
})->orderBy('pos', 'DESC')->get();
$data = [
@ -83,7 +83,7 @@ class SiteController extends Controller
'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
'products' => false,
'product_categories' => $product_categories,
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(),
'headline' => $category->getLang('headline'),
'headline_image' => $headline_image,
];
@ -95,9 +95,9 @@ class SiteController extends Controller
'user_shop' => Util::getUserShop(),
'subsite' => 'alle-produkte',
'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
'products' => Product::where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'DESC')->get(),
'products' => Product::where('active', true)->whereJsonContains('show_on', '1')->orderBy('pos', 'DESC')->get(),
'product_categories' => false,
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(),
'headline' => 'Produktwelt',
'headline_image' => false,
];