Updates.
git-svn-id: http://svn.cleancode.org/svn/pickles@118 4d10bc64-7434-11dc-a737-d2d0f8310089
This commit is contained in:
parent
56d4f60a6c
commit
1b7442aa3c
4 changed files with 31 additions and 21 deletions
|
@ -25,7 +25,6 @@ class store_admin_orders_edit extends store_admin {
|
|||
o.cc_last4,
|
||||
o.cc_expiration,
|
||||
o.shipping_amount,
|
||||
o.shipping_note,
|
||||
o.tracking_number,
|
||||
|
||||
e.email,
|
||||
|
@ -87,20 +86,19 @@ class store_admin_orders_edit extends store_admin {
|
|||
$order = $this->db->getRow($sql);
|
||||
|
||||
$sql = '
|
||||
SELECT
|
||||
op.quantity,
|
||||
p.*
|
||||
|
||||
SELECT op.quantity, p.*
|
||||
FROM order_products AS op
|
||||
|
||||
INNER JOIN products AS p
|
||||
ON p.id = op.product_id
|
||||
|
||||
INNER JOIN products AS p ON p.id = op.product_id
|
||||
WHERE op.order_id = "' . $_REQUEST['id'] . '"
|
||||
';
|
||||
|
||||
$order['products'] = $this->db->getArray($sql);
|
||||
|
||||
$sql = '
|
||||
SELECT * FROM order_status_updates WHERE order_id = "' . $_REQUEST['id'] . '" ORDER BY update_time DESC;';
|
||||
|
||||
$order['updates'] = $this->db->getArray($sql);
|
||||
|
||||
$this->setPublic('order', $order);
|
||||
|
||||
foreach ($this->db->getArray('SELECT * FROM order_statuses;') as $status) {
|
||||
|
|
|
@ -10,7 +10,6 @@ class store_admin_orders_save extends store_admin {
|
|||
UPDATE orders
|
||||
SET
|
||||
shipping_id = "' . $_REQUEST['shipping_method'] . '",
|
||||
shipping_note = "' . $_REQUEST['shipping_note'] . '",
|
||||
tracking_number = "' . $_REQUEST['tracking_number'] . '"
|
||||
WHERE id = "' . $_REQUEST['id'] . '";
|
||||
');
|
||||
|
@ -18,11 +17,12 @@ class store_admin_orders_save extends store_admin {
|
|||
// Insert a record into the order status updates table
|
||||
$this->db->execute('
|
||||
INSERT INTO order_status_updates (
|
||||
order_id, user_id, status_id, update_time
|
||||
order_id, user_id, status_id, note, update_time
|
||||
) VALUES (
|
||||
"' . $_REQUEST['id'] . '",
|
||||
"' . $_SESSION['user_id'] . '",
|
||||
"' . $_REQUEST['status'] . '",
|
||||
"' . $_REQUEST['shipping_note'] . '",
|
||||
NOW()
|
||||
);
|
||||
');
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<th nowrap="nowrap">Last Update</th>
|
||||
<th nowrap="nowrap">Shipping Method</th>
|
||||
<th>Weight</th>
|
||||
<th>Transaction #</th>
|
||||
<th nowrap="nowrap">Transaction #</th>
|
||||
</tr>
|
||||
{foreach from=$module.orders item=order}
|
||||
<tr class="center">
|
||||
|
@ -21,7 +21,7 @@
|
|||
</td>
|
||||
<td class="left">{$order.order_time}</td>
|
||||
<td class="left">${$order.total_amount}</td>
|
||||
<td>{if $order.status != ''}{$order.status}{else}<em>Unknown</em>{/if}</td>
|
||||
<td nowrap="nowrap">{if $order.status != ''}{$order.status}{else}<em>Unknown</em>{/if}</td>
|
||||
<td>{if $order.last_update != ''}{$order.last_update|date_format:'%m/%d/%Y'}{else}<em>Unknown</em>{/if}</td>
|
||||
<td>{$order.shipping_method}</td>
|
||||
<td>{$order.weight|number_format:2} lbs</td>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<b>Email:</b> {mailto address=$order.email}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="float-left" style="padding-left: 50px">
|
||||
<div class="float-left" {if $order.total_amount > 0}style="padding-left: 50px"{/if}>
|
||||
<b>Ship To:</b><br />
|
||||
{if $order.shipping_company}{$order.shipping_company}<br />{/if}
|
||||
{$order.shipping_first_name} {$order.shipping_last_name}<br />
|
||||
|
@ -126,17 +126,29 @@
|
|||
<dt>Tracking Number:</dt>
|
||||
<dd><input type="text" name="tracking_number" id="tracking_number" value="{$order.tracking_number}" /></dd>
|
||||
<dt>Note:</dt>
|
||||
<dd><textarea id="shipping_note" name="shipping_note" style="width: 350px">{$order.shipping_note}</textarea></dd>
|
||||
<dd><textarea id="shipping_note" name="shipping_note" style="width: 350px"></textarea></dd>
|
||||
</dl>
|
||||
<br class="clear-left" />
|
||||
<br class="clear-right" />
|
||||
<div class="center" style="width: 500px">
|
||||
<input type="hidden" name="id" value="{$order.order_id}" />
|
||||
<input type="button" value="Save & Return to List" onclick="ajaxRequest(this.parentNode.parentNode, 'returnToList'); return false;" />
|
||||
<input type="button" value="Save & Print Packing Slip" onclick="alert('almost'); return false; ajaxRequest(this.parentNode.parentNode); /*, 'print');*/ return false;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<b>Resend Receipt to:</b> <input type="text" name="email" id="email" value="{$order.email}" /> <input type="button" value="Send" onclick="alert('not yet');"/><br /><br /><br />
|
||||
<b>Resend Receipt to:</b> <input type="text" name="email" id="email" value="{$order.email}" /> <input type="button" value="Send" onclick="alert('not yet');"/><br /><br />
|
||||
<b>Updates:</b>
|
||||
<table>
|
||||
{foreach from=$order.updates item="update"}
|
||||
<tr>
|
||||
<td>{$module.statuses[$update.status_id]}</td>
|
||||
<td>{$update.note}</td>
|
||||
<td>{$update.update_time|date_format:'%m/%d/%Y'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
<br class="clear-left" />
|
||||
<br class="clear-right" />
|
||||
<div class="center" style="width: 500px">
|
||||
<input type="hidden" name="id" value="{$order.order_id}" />
|
||||
<input type="button" value="Save & Return to List" onclick="ajaxRequest(this.parentNode.parentNode, 'returnToList'); return false;" />
|
||||
<input type="button" value="Save & Print Packing Slip" onclick="alert('almost'); return false; ajaxRequest(this.parentNode.parentNode); /*, 'print');*/ return false;" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue