Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1610 | Revision 1612 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1610 Revision 1611
Zeile 361... Zeile 361...
361
        {
361
        {
362
            $template = substr( $subdir->template[0]->template->template_value, strpos( $subdir->template[0]->template->template_value, "=" ) + 1 );
362
            $template = substr( $subdir->template[0]->template->template_value, strpos( $subdir->template[0]->template->template_value, "=" ) + 1 );
363
        }
363
        }
364
        foreach ( $dirs as $dir )
364
        foreach ( $dirs as $dir )
365
        {
365
        {
-
 
366
            $preise = array();
366
            if ( $dir->articlemaster == 1 )
367
            if ( $dir->articlemaster == 1 )
367
            {
368
            {
-
 
369
                $items = Item::with( 'price' )->where( "directory_id", $dir->id )->whereIn( "status", [ 0, 2 ] )->get();
368
                $subdir["items"] = $dirs->filter( function ( $value, $key )
370
                foreach ( $items as $item )
369
                {
371
                {
370
                    return $value->articlemaster == 1;
372
                    $preise[] = $item->price[0]->preis;
371
                } );
373
                }
-
 
374
                $startPrice = min( $preise );
-
 
375
                $dir->startpreis_tpl = $startPrice;
-
 
376
                $subdir["itemTable"][] = $dir;
372
                /*$artstaemmeItems[$dir->id] = $dir;
377
                /*$artstaemmeItems[$dir->id] = $dir;
373
                $artstaemmeItems[$dir->id]["items"] = Item::with( 'medium.medium', 'price', 'manufacturer' )->where( 'directory_id', '=', $dir->id )->where( 'status', '=', 0 )->get();*/
378
                $artstaemmeItems[$dir->id]["items"] = Item::with( 'medium.medium', 'price', 'manufacturer' )->where( 'directory_id', '=', $dir->id )->where( 'status', '=', 0 )->get();*/
374
            }
379
            }
375
        }
380
        }
376
        return view( $template, [
381
        return view( $template, [