Jump to content

Display all orders in order-detail


Recommended Posts

I want to show the details of the order, a list of the state and the id of the customer orders. A historic.
Ps I use 1.3.1 and I took the code and have stuck AdminCustomer in AdminOrders.
/* Display orders anadido jonatan 
		$orders = Order::getCustomerOrders($customer->id);
		echo '
		<div style="float:left; margin-left:40px; margin-top:10px;" id="misorders">
			<fieldset style="width: 400px;">
				<legend><img src="../img/admin/delivery.gif" alt="'.$this->l('Orders').'" />'.$this->l('Orders').'</legend>
				<div style="float: left">';
						echo '
						<table cellspacing="0" cellpadding="0" class="table">
								<th class="center">'.$this->l('ID').'</th>
								<th class="center">'.$this->l('Date').'</th>
								<th class="center">'.$this->l('State').'</th>
								<th class="center">'.$this->l('Actions').'</th>
						$tokenOrders = Tools::getAdminToken('AdminOrders'.intval(Tab::getIdFromClassName('AdminOrders')).intval($cookie->id_employee));
						foreach ($orders AS $order)
							echo '
							<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'\'">
								<td class="center">'.sprintf('%06d', $order['id_order']).'</td>
								<td>'.Tools::displayDate($order['date_add'], intval($cookie->id_lang), true).'</td>
								<td align="center"><a href="?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
						echo '

With this code I do not load the details of the order, if I add this code to display returns

Validate::isLoadedObject($order = new Order($id_order));

But after all this leaves me or write messages or see the default messages


Can someone help me?




Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...