Broken link on Order Complete page

Posts: 4
Joined: 05/13/2008

First: Great work with the software!

I've found an error on /cart/checkout/complete

After completing a sale, the user is sent to this page, which contains the following text. "Thank you for shopping at XXX. While logged in, you may continue shopping or click here to view your current order status and order history." The "click here" link does not seem to be getting the correct user ID and instead links to /user/1/orders which causes an Access Denied error.

Thanks!

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Yikes... can you tell me under what circumstances this goof occurs? It doesn't happen all the time, as I've been testing checkout heavily on the Livetest today and haven't run into it.

Posts: 4
Joined: 05/13/2008

This is happening after purchasing a file download, using PayPal Standard and clicking the link on PayPal that says "return to merchant".

Posts: 1
Joined: 06/03/2008

Hi!

I have the same problem here.

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Honestly... I don't know how this is possible. After reviewing the code that generates this message, I see that it pulls the user ID straight from the logged in user. I'm not sure how it would turn up with a 1 if that's not the current user's ID. Puzzled

Posts: 13
Joined: 04/11/2008

I get this error too using the Check payment method. (haven't checked any other methods)

I've looked at the code and it is a little strange that it gets user id of 1, as the 'my account' link i have in a menu works fine with the correct user id.

Posts: 13
Joined: 04/11/2008

I think the issue is that the variable uc_msg_order_logged_in get set to something like the following:

Thank you for shopping at [store-name]. While logged in, you may continue shopping or click here to view your current order status and order history.

It seems when this variable is set you aren't using a token, and it is just set for the admin user.

I emptied the variable in admin/store/settings/checkout/edit/messages and seems to do the trick as code in the uc_messages hook is fine.

Ben

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Thanks so much for tracking this down! Looks like a silly mistake on my part. Bookmarking this post so I can work a fix into the next minor release.

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I've replaced this for now w/ the [order-url] token. This will go to the order view page for the order that was just placed, which is more intuitive. I left the message text the same for now but can change it later if need be.

Posts: 1
Joined: 09/10/2008

Hi, are your changes in a patch or in 1.3? Or perhaps you can just tell us the file and code replacement right here. I assume it's uc_cart.module right?