Post by RobertKramers » Thu Jun 18, 2009 6:58 pm

I have an issue at the moment where the subtotal and total are in reverse order on both the admin > Order pages and the invoices.

For Example


Total: $700.00
STAFF: -$225.00 (discount)
Subtotal: $925.00

This is the way its laid out on the page, any ideas as to why, or how this can be changed? I just need to have the 2 totals switched around. The error comes up in the following pages after entering the admin area of your store.

/admin/index.php?route=customer/order/update&order_id=43
/admin/index.php?route=customer/order/invoice&order_id=43

Cheers in advance. :)

Rob

New member

Posts

Joined
Fri Jun 06, 2008 1:54 pm


Post by RobertKramers » Sat Jun 20, 2009 9:44 pm

I can't believe no-one knows anything about this....

Any help... Please!?

New member

Posts

Joined
Fri Jun 06, 2008 1:54 pm


Post by Daniel » Sat Jun 20, 2009 9:45 pm

total need to be at the bottom to the page! set the sort order to the hieghest number.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by RobertKramers » Sat Jun 20, 2009 9:54 pm

Order totals are definitely set right. with Total = sort order 100 and all the other > 10.

I really have no idea why this is happening, is there another place where i need to change this order?

New member

Posts

Joined
Fri Jun 06, 2008 1:54 pm


Post by Daniel » Sat Jun 20, 2009 10:22 pm

sort order will not affect orders already made.

if that was the case it would cause problems with old orders when you add somthign new in.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by RobertKramers » Sat Jun 20, 2009 10:44 pm

Yep - it doesn't seem to work, i have created new orders and total is still above the subtotal when i go to orders in admin.. this is mega frustrating.

Any other ideas?

New member

Posts

Joined
Fri Jun 06, 2008 1:54 pm


Post by Daniel » Sun Jun 21, 2009 1:22 am

pm me your admin details. i want to see this for myself.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Mon Jun 22, 2009 3:32 am

I've just looked at your totals and they look fine.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by RobertKramers » Mon Jun 22, 2009 5:44 am

Thanks Daniel!

But did you place a test order to see what was happening?

Dosen't make any sense.

Cheers
Robert

New member

Posts

Joined
Fri Jun 06, 2008 1:54 pm


Post by Daniel » Mon Jun 22, 2009 8:25 am

looks like i forgot to add ORDER BY sort_order at the end of the get totals query.

public function getOrderTotals($order_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$order_id . "'");

return $query->rows;
}

it should be this:

public function getOrderTotals($order_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$order_id . "' ORDER BY sort_order");

return $query->rows;
}

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 15 guests