www
/
wwwroot
/
magazinmiorita.be
/
clientarea
➕ New
📤 Upload
✎ Editing:
order_details.php
← Back
<?php include('../includes/inc.config.php'); include('check_session.php'); $get_orders_results = array(); $get_orders = $database->execute(" SELECT * FROM `orders` WHERE `id` = '".$_GET['id']."' and user_id = '$user_id' "); while($row = $database->fetch($get_orders)){ $row['price'] = money_format('%.2n',$row['price']); $row['amount'] = money_format('%.2n',$row['amount']); $row['products'] = unserialize($row['history']); $txx = array(); $get_taxes = $database->execute("SELECT * FROM `taxes`"); $totals = 0; $total_tax = 0; $tt_tax1 = 0; $tt_tax2 = 0; $shipp_amount = money_format('%.2n',$row['shipp_amount']); foreach ($row['products'] as $key => $item){ $itemdata = explode('|',$item); $ch['qt'] = $itemdata[4]; $ch['price'] = $itemdata[3]; $ch['price_tax'] = ((int)($data->tax_data($data->item_data($itemdata[0],'tax')) ? $data->tax_data($data->item_data($itemdata[0],'tax')) : '6')/100)*$itemdata[3]; $ch['type'] = $itemdata[2]; $ch['weight'] = $itemdata[1]; $ch['item_id'] = $itemdata[0]; $ch['amount'] = $itemdata[3]*$itemdata[4]; $ch['calc_total'] += $ch['amount']; $ch['chsubtotal'] = $ch['calc_total']; $ch['chtotal'] = money_format('%.2n',$data->vat($ch['calc_total'],$data->settings('tax')) + $row['shipp_amount']); $ch['ord_chtotal'] = $data->vat($ch['calc_total'],$data->settings('tax')); $ch['tax'] = ($data->tax_data($data->item_data($itemdata[0],'tax')) ? $data->tax_data($data->item_data($itemdata[0],'tax')) : '6'); if($data->item_data($itemdata[0],'tax') == 'tax_1'){ $part = $ch['tax']*$itemdata[3]; $tt_tax1 += $ch['price_tax']; }else if($data->item_data($itemdata[0],'tax') == 'tax_2'){ $part = $ch['tax']*$itemdata[3]; $tt_tax2 += $ch['price_tax']; }else{ $part = $ch['tax']*$itemdata[3]; $tt_tax1 += $ch['price_tax']; } $ch['key'] = $key; $cart_ch[] = $ch; } $total_tax1 = money_format('%.2n',$tt_tax1); $total_tax2 = money_format('%.2n',$tt_tax2); $row['tax'] = $txx; $row['history'] = $cart_ch; $get_orders_results[] = $row; } $smarty->assign("shipp", $shipp_amount); $smarty->assign("chtotal", $ch['chtotal']); $smarty->assign("tax1", $total_tax1); $smarty->assign("tax2", $total_tax2); $smarty->assign("chsubtotal", $ch['chsubtotal']); $smarty->assign("orders", $get_orders_results); $smarty->display(CLIENT_PATH.'order_details.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