Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

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