Subversion-Projekte lars-tiefland.ci

Revision

Revision 462 | Revision 464 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

/**
 * @author Lars Tiefland
 * @copyright 2016
 */

class Versand_uebersicht extends CI_Controller
{
        public function __construct()
        {
                parent::__construct();
                $GLOBALS['order_db'] = $this->load->database('order_db', TRUE);
                $GLOBALS['db_red'] = $this->load->database('db_red', TRUE);
                $versand_laender = getVersandLaender();
                $zahlarten = getZahlarten();
                $this->smarty->assign('zahlarten', $zahlarten);
                $this->smarty->assign('Laender', $versand_laender);
        }

        function index()
        {
                $versand_uebersicht['basketVersand'] = $this->get_versandkosten();
                $this->smarty->view('versand_uebersicht.tpl');
        }

        private function get_versandkosten($land = null)
        {
                if (is_null($land))
                {
                        $land = 47;
                        $lCode = getWebanLCode($land);
                        $sql = "SELECT
                                        ID,
                                        kurzbezeichnung,
                                        preis1,
                                        preis_neu1,
                                        preis_neu2,
                                        preis_neu3,
                                        preis_neu4
                                FROM
                                        artikel
                                WHERE
                                        father=-3
                                AND
                                        language='".$GLOBALS['INI']['language']."'
                                AND
                                        lieferstatus & ".$lCode."=".$lCode."
                                ORDER BY
                                        short_line_1
                        ";
                        $res = $this->db->query($sql);
                        $items = $res->result_array();
                        return $items;
                }
        }
}

?>