Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove create_account_success.php


wizardsandwars

Recommended Posts

Ok, I've been tossing this around for a little bit.

 

I'd like to remove the create_account-success.php page altogether. when the customer has succsessfully completed creating an account, I would like it to redirect to the page that it normally redirects to when you click hte continue button on the success page.

 

I thought this would be pretty easy, but I'm having some trouble getting it to work. Here's what I've done so far.

 

In the create_account_process.php, I added

 

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

} else {

$origin_href = tep_href_link(FILENAME_DEFAULT);

}

 

right after the breadcrumb.

 

Then, at the bottom of the page, I replaced

tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

 

with

tep_redirect(tep_href_link($origin_href, '', 'SSL'));

 

 

I thought that this would have done the trick, but I only receive "page link not determined"

 

anyone have better insight into how this might properly work?

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

One of your variables that you are passing the tep_href_link is empty.

 

Do an echo of them and find out which is causing you the problem.

 

Your code looks correct but your visitors might get a warning message that they are being redirected to a non-secure page. Just something to think about.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

   $origin_href = tep_href_link(FILENAME_DEFAULT);

    tep_redirect(tep_href_link($origin_href, '', 'SSL'));

Assuming the second $origin_href definition (same issue with the first, but easier for me to understand in the second), wouldn't the third snippet then form https://http://www.domain.com/catalog/index.php? Or am I missing something? It seems like you have nested hrefs to me.

 

I would start diagnostics by changing the third line to

//tep_redirect

die(tep_href_link($origin_href, '', 'SSL'));

Obviously, this won't work but hopefully it will give you debuggable output. If not, then I'd do a die $origin_href.

 

Hth,

Matt

Link to comment
Share on other sites

I think Matt is correct about nested hrefs, I would try:

if (sizeof($navigation->snapshot) > 0) { 

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); 

$navigation->clear_snapshot(); 

} else { 

$origin_href = tep_href_link(FILENAME_DEFAULT, '', 'SSL');  

} 



and



tep_redirect($origin_href);

Ivan

Link to comment
Share on other sites

Yup, you are right, hte double href thing was getting me.

 

Anyway, I might post this mod in the tips and tricks section, because I think that the success page is just an extra click for hte customers to have to go thorugh.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Anyway, I might post this mod in the tips and tricks section, because I think that the success page is just an extra click for hte customers to have to go thorugh.

I agree and think that it would be an excellent addition in Tips and Tricks.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...