Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 1703 Revision 1704
Zeile 5... Zeile 5...
5
    use PHPHtmlParser\Exceptions\CircularException;
5
    use PHPHtmlParser\Exceptions\CircularException;
6
    use PHPHtmlParser\Exceptions\CurlException;
6
    use PHPHtmlParser\Exceptions\CurlException;
7
    use PHPHtmlParser\Exceptions\NotLoadedException;
7
    use PHPHtmlParser\Exceptions\NotLoadedException;
8
    use PHPHtmlParser\Exceptions\StrictException;
8
    use PHPHtmlParser\Exceptions\StrictException;
Zeile -... Zeile 9...
-
 
9
 
-
 
10
    $GLOBALS["zahlsysteme"] = [
-
 
11
        "kreditkarte",
-
 
12
        "paypal",
-
 
13
        "sofortueberweisung",
-
 
14
        "frei",
-
 
15
        "finanzierung",
-
 
16
        "billsafe",
-
 
17
        "billsafe_hire",
-
 
18
        "amazon",
-
 
19
        "PayPalExpress",
-
 
20
        "Ratenzahlung",
-
 
21
        "PayPalPlus",
-
 
22
        "paymill",
-
 
23
        "klarna",
-
 
24
        "paydirekt",
-
 
25
        "payever",
-
 
26
        "billie",
-
 
27
        "easycredit",
-
 
28
        "crefopay",
-
 
29
        "crefopayKK",
-
 
30
        "PayPalCheckout",
-
 
31
    ];
9
 
32
 
10
    function getConfig()
33
    function getConfig()
11
    {
34
    {
12
        if ( !defined( "__SITE__" ) )
35
        if ( !defined( "__SITE__" ) )
13
        {
36
        {
Zeile 96... Zeile 119...
96
        {
119
        {
97
        }
120
        }
98
        return array( "menu" => $menu, "content" => $content, );
121
        return array( "menu" => $menu, "content" => $content, );
99
    }
122
    }
Zeile -... Zeile 123...
-
 
123
 
-
 
124
    if ( isset( $_GET["killSession"] ) )
-
 
125
    {
-
 
126
        unset( $_SESSION );
-
 
127
        $_SESSION["SHOP"]["BASKET"] = new BasketController();
-
 
128
    }
-
 
129
    $GLOBALS["steuern"] = array();
-
 
130
    //default LandID für Deutschland
-
 
131
    $landID = 47;
-
 
132
    //Wenn das Flag gesetzt ist, dann nimm diesen wert, damit auch "ausländische Shops" den richtigen MwSt angezeigt bekommen
-
 
133
    if ( isset( $GLOBALS["INI"]["steuern"]["default_countryID"] ) )
-
 
134
    {
-
 
135
        $landID = $GLOBALS["INI"]["steuern"]["default_countryID"];
-
 
136
    }
-
 
137
 
-
 
138
    $countryIDs = ( isset( $GLOBALS['INI']['steuern']['use_countries_tax'] ) ) ? $GLOBALS['INI']['steuern']['use_countries_tax'] : $landID;
-
 
139
 
-
 
140
    $sql = "SELECT 
-
 
141
            *
-
 
142
        FROM
-
 
143
            content_management.countries_tax
-
 
144
        WHERE
-
 
145
            country_id IN (" . $countryIDs . ")
-
 
146
    ";
-
 
147
    $rows = DB::connection( "cms" )->select( $sql );
-
 
148
    foreach ( $rows as $r )
-
 
149
    {
-
 
150
        $GLOBALS["steuern"][$r->country_id][$r->taxes_id] = $r->tax_percent;
-
 
151
        $GLOBALS["steuern"][$r->country_id][null] = $GLOBALS["steuern"][$r->country_id][0];
-
 
152
    }
-
 
153
 
-
 
154
    $sql = "
-
 
155
        SELECT
-
 
156
            *
-
 
157
        FROM
-
 
158
            i18n_de
-
 
159
    ";
-
 
160
    if ( Schema::hasTable( 'i18n_de' ) )
-
 
161
    {
-
 
162
        $langstrings = DB::select( $sql );
-
 
163
    }
-
 
164
    else
-
 
165
    {
-
 
166
        $langstrings = DB::connection( "old" )->select( $sql );
-
 
167
    }
-
 
168
    foreach ( $langstrings as $langstring )
-
 
169
    {
-
 
170
        $GLOBALS["langstrings"][$langstring->page_id][$langstring->id] = $langstring->string;
-
 
171
    }
-
 
172
 
-
 
173
    function getRechnungsLaender(): array
-
 
174
    {
-
 
175
        $arr = array();
-
 
176
        $laender = DB::connection( 'cms' )->select( 'SELECT id,name_de FROM content_management.countries WHERE `rank` > 0 ORDER BY `rank`' );
-
 
177
        foreach ( $laender as $land )
-
 
178
        {
-
 
179
            $arr[$land->id] = $land->name_de;
-
 
180
        }
-
 
181
        return $arr;
100
 
182
    }