4 replies [Last post]
PaulW's picture
Offline
Joined: 05/23/2008
Juice: 148
Was this information Helpful?

Somewhere, somehow, it appears that the value for <front> is getting overwritten in uc_cart.module...

In uc_cart.module (around line 1167) there is the following use of <front>:

$link = l($text, variable_get('uc_cart_breadcrumb_url', '<front>'));

Also (around line 498 or so) there is the following definition of $message:

$messages['continue_shopping'] = l(t('Click to return to the front page.'), '<front>', array(), NULL, NULL, TRUE);

In line 1167, the <front> link for "Home" returns "http://www.sandlotsociety.com/dev/", as it should.
(This is my development site where I am incorporating Ubercart.)

However, in line 498, after checking out, <front> returns "http://localhost/dev/".
(This is the front page on my local Xampp sandbox.)

Apparently, perhaps in the checkout process, the value for <front> changes, but I haven't a clue as to where this might be occurring.

Another piece of info...
I've changed <front> in line 498 from
...page.'), '<front>', array()...
to the following with similar results:
...page.'), url(), array()...
...page.'), $s_front, array()...
...page.'), $GLOBALS['base_url'], array()...

Anyone have ideas on where this change might be happening?

Thanks!!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: <front> changes value in uc_cart.module

The problem here (if my quick diagnosis is right) looks to be like you saved on a local dev site a form so that <front> was turned into an actual URL instead of just being <front>. Then when it was migrated, the old value is still being used. This is really an unfortunate usage on our part... a token for the front page would have been better. You can look at your checkout messages and update the URL most likely.

PaulW's picture
Offline
Joined: 05/23/2008
Juice: 148
Ryan, Your diagnosis was

Ryan,

Your diagnosis was absolutely correct! Thanks so much.

When I move my development system from www.sandlotsociety.com/dev to www.sandlotsociety.com/community, I'll be sure to make the change in the Checkout Messages. Are there any other places that come to mind that I will need to make a similar change?

Thanks again,

-Paul

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Awesome. I think the

Awesome. Cool I think the checkout messages are really the major culprits here, though you might just doublecheck your notifications if you're using them. I'll try to review these for token usage for the 1.7 release.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Awesome. I think the

I'm committing some changes to the tokens to use [site-url] instead of l() or url(). Should've done that a while ago. Sticking out tongue