www
/
wwwroot
/
magazinmiorita.be
➕ New
📤 Upload
✎ Editing:
order_recived.php
← Back
<?php ob_start(); include('includes/inc.config.php'); include('header.php'); //if(isset($_GET['id']) && $_GET['id'] != '' && $_COOKIE['user_id'] == $data->order_data($_GET['id'],'user_id')){ $last_order_results = array(); $last_order = $database->execute("SELECT * FROM `orders` WHERE `id` = '".$_GET['id']."'"); while($row = $database->fetch($last_order)){ $row['price'] = money_format('%.2n',$row['price']); $row['amount'] = money_format('%.2n',$row['amount']); $shipp_amount = money_format('%.2n',$row['shipp_amount']); $row['products'] = unserialize($row['history']); foreach ($row['products'] as $key => $item){ $itemdata = explode('|',$item); $ch['qt'] = $itemdata[4]; $ch['price'] = $itemdata[3]; $ch['price_tax'] = money_format('%.2n',$data->tax($ch['price'],$data->settings('tax'))); $ch['type'] = $itemdata[2]; $ch['weight'] = $itemdata[1]; $ch['item_id'] = $itemdata[0]; $ch['code'] = $itemdata[6]; $ch['amount'] = $itemdata[5]; $ch['calc_total'] += $itemdata[5]; $ch['chsubtotal'] = money_format('%.2n',$ch['calc_total']); $ch['chtotal'] = money_format('%.2n',$data->vat($ch['calc_total'],$data->settings('tax'))); $ch['ord_chtotal'] = money_format('%.2n',$data->vat($ch['calc_total'],$data->settings('tax')) + $row['shipp_amount']); $ch['tax'] = money_format('%.2n',$data->tax($ch['calc_total'],$data->settings('tax'))); $ch['key'] = $key; $cart_ch[] = $ch; } $row['history'] = $cart_ch; $last_order_results[] = $row; } $smarty->assign("chsubtotal", $ch['chsubtotal']); $smarty->assign("ord_chtotal", $ch['ord_chtotal']); $smarty->assign("tax", $ch['tax']); $smarty->assign("order", $last_order_results); $smarty->assign("shipp", $shipp_amount); $smarty->assign("ok", 'yes'); /* } else { $_SESSION['message'] = 'You don\'t have permissions to access this page.'; $smarty->assign("message", $_SESSION['message']); $smarty->assign("ok", 'no'); } */ $smarty->display('order_recived.tpl'); ?>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel