Beispiel #1
0
    $itemid = $_POST[$reqIdKey];
} elseif (isset($_POST['op_gc_load'])) {
    $ACTION = OP_GC_LOAD;
    $itemid = $_POST['tok'];
} else {
    $SHOWFORM = false;
}
/** **/
if (isset($_GET['op_csv'])) {
    $res = $order->fetch_all_for_export();
    $filename = strtolower('orders.csv');
    if ($res->numRows()) {
        $table = new CSV_Table();
        $table->print_csv_headers(SITE_DOMAIN_NAME . ".{$filename}.csv");
        #
        print $table->show($res);
        exit;
    } else {
        $msg = "No orders found for export.";
        header("Location: {$_SERVER['PHP_SELF']}?info=" . base64_encode($msg));
        exit;
    }
}
/** hook up smarty with the currency_format function from cmCart */
$c = CSHOP_CLASSES_CART;
$cart = new $c($pdb);
$smarty->register_modifier('currency_format', array(&$cart, 'currency_format'));
/* update the backordered amount for a certain line item */
if ($ACTION == OP_EDIT_LINEITEM) {
    $order->set_id_by_token($itemid);
    $count = 0;