checkout, register, payment,
checkout correction, register wizard, payment packege,
This commit is contained in:
parent
6e3adac4d7
commit
446bc4561b
48 changed files with 2580 additions and 1493 deletions
|
|
@ -26,8 +26,8 @@ class SiteController extends Controller
|
|||
$products = ['aloe-vera-gel-99', 'aloe-vera-saft-500-ml', 'aloe-vera-lippenbalsam'];
|
||||
$set_products = ['aloe-vera-cleaner-set', 'aloe-vera-koerper-set', 'aloe-vera-repair-set'];
|
||||
$data = [
|
||||
'products' => Product::whereIn('slug', $products)->get(),
|
||||
'set_products' => Product::whereIn('slug', $set_products)->get(),
|
||||
'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(),
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
return view('web.index', $data);
|
||||
|
|
@ -36,12 +36,12 @@ class SiteController extends Controller
|
|||
public function site($site, $subsite = false, $product_slug = false)
|
||||
{
|
||||
|
||||
$subsite = trim($subsite, '/');
|
||||
$product_slug = trim($product_slug, '/');
|
||||
$subsite = trim($subsite, '/');
|
||||
$product_slug = trim($product_slug, '/');
|
||||
if($product_slug){
|
||||
|
||||
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
||||
$product = Product::where('slug', $product_slug)->where('active', true)->first();
|
||||
$product = Product::where('slug', $product_slug)->where('active', true)->where('show_at', '<=', 1)->first();
|
||||
if ($category && $product) {
|
||||
|
||||
$data = [
|
||||
|
|
@ -49,7 +49,7 @@ class SiteController extends Controller
|
|||
'subsite' => $subsite,
|
||||
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
||||
'product' => $product,
|
||||
'p_count' => Product::where('active', true)->count(),
|
||||
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||
|
||||
];
|
||||
return view('web.templates.produkte-show', $data);
|
||||
|
|
@ -57,7 +57,6 @@ class SiteController extends Controller
|
|||
}
|
||||
|
||||
if($site == 'produkte'){
|
||||
|
||||
if($subsite || $subsite != 'alle-produkte') {
|
||||
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
||||
if ($category) {
|
||||
|
|
@ -68,8 +67,8 @@ class SiteController extends Controller
|
|||
'products' => Product::whereHas('categories', function ($query) use ($category) {
|
||||
$query->where('category_id', '=', $category->id);
|
||||
|
||||
})->where('active', true)->orderBy('pos', 'DESC')->get(),
|
||||
'p_count' => Product::where('active', true)->count(),
|
||||
})->where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'DESC')->get(),
|
||||
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||
|
||||
];
|
||||
return view('web.templates.' . $site, $data);
|
||||
|
|
@ -80,8 +79,8 @@ class SiteController extends Controller
|
|||
'user_shop' => Util::getUserShop(),
|
||||
'subsite' => 'alle-produkte',
|
||||
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->orderBy('pos', 'ASC')->get(),
|
||||
'p_count' => Product::where('active', true)->count(),
|
||||
'products' => Product::where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'ASC')->get(),
|
||||
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||
];
|
||||
return view('web.templates.'.$site, $data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue