Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 704 Revision 710
Zeile 29... Zeile 29...
29
    if ( php_sapi_name() == "cli" )
29
    if ( php_sapi_name() == "cli" )
30
    {
30
    {
31
        return;
31
        return;
32
    }
32
    }
33
    session_start();
33
    session_start();
-
 
34
    $GLOBALS["steuern"] = array();
-
 
35
    //default LandID für Deutschland
-
 
36
    $landID = 47;
-
 
37
    //Wenn das Flag gesetzt ist, dann nimm diesen wert, damit auch "ausländische Shops" den richtigen MwSt angezeigt bekommen
-
 
38
    if ( isset( $GLOBALS["INI"]["steuern"]["default_countryID"] ) )
-
 
39
    {
-
 
40
        $landID = $GLOBALS["INI"]["steuern"]["default_countryID"];
-
 
41
    }
-
 
42
 
-
 
43
    $countryIDs = ( isset( $GLOBALS['INI']['steuern']['use_countries_tax'] ) ) ? $GLOBALS['INI']['steuern']['use_countries_tax'] : $landID;
-
 
44
 
-
 
45
    $sql = "SELECT *
-
 
46
                FROM content_management.countries_tax
-
 
47
                WHERE country_id IN (" . $countryIDs . ")
-
 
48
        ";
-
 
49
    $rows = DB::connection("cms")->select( $sql );
-
 
50
    foreach ( $rows as $r )
-
 
51
    {
-
 
52
        $GLOBALS["steuern"][$r['countries_id']][$r['taxes_id']] = $r['tax_percent'];
-
 
53
        $GLOBALS["steuern"][$r['countries_id']][null] = $GLOBALS["steuern"][$r['countries_id']][0];
-
 
54
    }
34
    if ( !isset( $_SESSION["SHOP"]["BASKET"] ) )
55
    if ( !isset( $_SESSION["SHOP"]["BASKET"] ) )
35
    {
56
    {
36
        $_SESSION["SHOP"]["BASKET"] = new Basket();
57
        $_SESSION["SHOP"]["BASKET"] = new Basket();
37
    }
58
    }
38
    elseif ( is_array( $_SESSION["SHOP"]["BASKET"] ) )
59
    elseif ( is_array( $_SESSION["SHOP"]["BASKET"] ) )