Page 1 of 1

Header redirect not working correctly after order placed

Posted: Sat Mar 20, 2010 5:40 pm
by dannowatts
i'm using 1.4.3.

when a customer has ordered something and receives a link to view the order, they receive a link to the following:
if they are logged out of the site at the time, they are presented with the login screen. and here's where 2 issues arise.

1) when the person logs in, they are redirected to the following url address:
with an error saying that the order invoice could not be found ( obviously ). when manually changing the '&' to just '&' it goes to the order invoice online just fine. but somewhere along the road it's not converting the '&' into '&' for the redirect. how do i find the correct place to make sure that the redirect works properly? i've narrowed it down to
catalog/controller/common/header.php, somewhere between lines 119-138, but don't know if that's the final place it goes before conversion.


issue 2) when someone who doesn't have an order accessible to their account, but modifies the url address from
to
to try and just view another invoice, there is an error that says :
"undefined index: order_id in catalog/controller/account/invoice.php on line 41"
when looking at that file, it looks to assume that there is already a valid order_id and doesn't verify that there really is one in the breadcrumbs, hence the error. where should i correct this at?

thanks for taking the time to help out guys, i appreciate it!

rocksteady,
danno~

Re: Header redirect not working correctly after order placed

Posted: Mon Mar 22, 2010 1:16 pm
by dannowatts
bump!
( now been 24 hours )

Re: Header redirect not working correctly after order placed

Posted: Mon Mar 22, 2010 4:31 pm
by rph
This is a bug.

/catalog/controller/account/login.php
Line 31

Code: Select all

$this->redirect($this->request->post['redirect']);
fix

Code: Select all

$this->redirect(str_replace('&', '&', $this->request->post['redirect']));

Re: Header redirect not working correctly after order placed

Posted: Tue Mar 23, 2010 3:57 am
by dannowatts
awesome, thanks for the fix, i appreciate it!