Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 1650 Revision 1651
Zeile 32... Zeile 32...
32
            @mkdir( public_path( "preisagentur" ), 0755, true );
32
            @mkdir( public_path( "preisagentur" ), 0755, true );
33
            $items = Item::with( 'price', 'medium.medium', "manufacturer" )->where( 'status', 0 )->get();
33
            $items = Item::with( 'price', 'medium.medium', "manufacturer" )->where( 'status', 0 )->get();
34
            $agencies = PriceAgency::where( 'shop_id', $GLOBALS["INI"]["shops_ID"] )->where( "status", "1" )->get();
34
            $agencies = PriceAgency::where( 'shop_id', $GLOBALS["INI"]["shops_ID"] )->where( "status", "1" )->get();
35
            foreach ( $agencies as $agency )
35
            foreach ( $agencies as $agency )
36
            {
36
            {
-
 
37
                $locked_manufacturers = json_decode( $agency->locked_manufacturers, true );
37
                $records = 0;
38
                $records = 0;
38
                $content = array();
39
                $content = array();
39
                $prefix = "";
40
                $prefix = "";
40
                $suffix = "";
41
                $suffix = "";
41
                $this->info( $agency["name"] );
42
                $this->info( $agency["name"] );
Zeile 66... Zeile 67...
66
                    $item->itemLink = "https://www." . env( 'shop' ) . "/" . $item->slug;
67
                    $item->itemLink = "https://www." . env( 'shop' ) . "/" . $item->slug;
67
                    $item->herstellerName = "";
68
                    $item->herstellerName = "";
68
                    $item->hersteller_kurzbezeichnung = $item->name;
69
                    $item->hersteller_kurzbezeichnung = $item->name;
69
                    if ( $item->manufacturer )
70
                    if ( $item->manufacturer )
70
                    {
71
                    {
-
 
72
                        if ( !in_array( $item->manufacturer->id, $locked_manufacturers ) )
-
 
73
                        {
-
 
74
                            continue;
-
 
75
                        }
71
                        $item->herstellerName = $item->manufacturer->name;
76
                        $item->herstellerName = $item->manufacturer->name;
72
                        $item->hersteller_kurzbezeichnung = $item->herstellerName . " " . $item->hersteller_kurzbezeichnung;
77
                        $item->hersteller_kurzbezeichnung = $item->herstellerName . " " . $item->hersteller_kurzbezeichnung;
73
                    }
78
                    }
74
                    if ( !isset( $item->price[0] ) )
79
                    if ( !isset( $item->price[0] ) || $item->price[0]->preis < $agency->min_price )
75
                    {
80
                    {
76
                        continue;
81
                        continue;
77
                    }
82
                    }
78
                    $item->preis = number_format( $item->price[0]->preis, 2, ',', '.' );
83
                    $item->preis = number_format( $item->price[0]->preis, 2, ',', '.' );
79
                    $buffer = array();
84
                    $buffer = array();