Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

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