Hi, somehow i got confused half way thru the codes...
here is what i wanted it to work (include/history_order.php)
Code:
if ($mode == "invoice" or $mode == "invoice_no_cc" or $mode == "label") {
header("Content-Type: text/html");
header("Content-Disposition: inline; filename=invoice.txt");
$orders = explode(",", $orderid);
if ($orders) {
$orders_data = array();
foreach ($orders as $orderid) {
$order_data = func_order_data($orderid);
#
# Security check if order owned by another customer
#
if ($current_area == 'C' && $order_data["userinfo"]["login"] != $login) {
func_header_location("error_message.php?access_denied&id=34");
}
$order = $order_data["order"];
$customer = $order_data["userinfo"];
$products = func_translate_products($order_data["products"], ($userinfo['language']?$userinfo['language']:$config['default_customer_language']));
$giftcerts = $order_data["giftcerts"];
$orders_data[] = array ("order" => $order, "customer" => $customer, "products" => $products, "giftcerts" => $giftcerts);
}
$smarty->assign("orders_data", $orders_data);
$_tmp_smarty_debug = $smarty->debugging;
$smarty->debugging = false;
if ($mode == "invoice") {
if ($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"])))
$smarty->assign("show_order_details", "Y");
func_display("main/order_invoice_print.tpl",$smarty);
} elseif ($mode == "invoice_no_cc")
($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"])))
$smarty->assign("show_order_details", "Y");
func_display("main/order_invoice_no_cc_print.tpl",$smarty);
} elseif ($mode == "label")
func_display("main/order_labels_print.tpl",$smarty);
$smarty->debugging = $_tmp_smarty_debug;
}
exit;
This is the area i stuffed up:
if ($mode == "invoice") {
if ($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"])))
$smarty->assign("show_order_details", "Y");
func_display("main/order_invoice_print.tpl",$smarty);
} elseif ($mode == "invoice_no_cc")
($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"])))
$smarty->assign("show_order_details", "Y");
func_display("main/order_invoice_no_cc_print.tpl",$smarty);
} elseif ($mode == "label")
func_display("main/order_labels_print.tpl",$smarty);
I can't make it works... right now my code is only this:
Code:
if ($mode == "invoice") {
if ($current_area == "A" || ($current_area == "P" && !empty($active_modules["Simple_Mode"])))
$smarty->assign("show_order_details", "Y");
func_display("main/order_invoice_print.tpl",$smarty);
} elseif ($mode == "invoice_no_cc")
func_display("main/order_invoice_no_cc_print.tpl",$smarty);
Any idea please?