X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to modify register.php (https://forum.x-cart.com/showthread.php?t=11910)

jdedba 02-02-2005 08:18 PM

How to modify register.php
 
I do not like the fact the x-cart takes the user back to the Modify Profile page each time a user creates a new profile or modify the profile. It is totally not necessary to let user to play with profile so easy, and let it show up again.

How can we direct users to home.php or place Feature Products box there after they submit a profile or modify their profile? I think this will be a very good mod.

Thanks a lot.

Jeff

balinor 02-03-2005 03:18 AM

Hey Jeff, really need to know your X-Cart version number. Please post it in your signature. This will help pepole not only in this thread, but any other threads you post in Thanks! :)

jdedba 02-03-2005 04:11 AM

Sorry. I am working on version 4.0.11

Thanks.

Jeff

balinor 02-03-2005 09:32 AM

Well that certainly helps in this thread, but it won't in others. Edit your profile, and put the version number in your signature. Where you have 'Beginner' now. I'll get back to you with an answer to your question a little later....

jdedba 02-05-2005 06:48 PM

I believe version 4.0.9 does the same. When users register and Submit the profile form, the page will be directed to "Modify Profile" immediately. This is an annoying. Why do not start to sell products, instead of giving them the profile again?

In addition, each click on the Submit button on the Profile page, the user and the store owner will get an email - wasting your time.

I think the modifications should be in /include/register.php, around lines:
Code:

$script = $xcart_catalogs['partner']."/home.php?mode=profile_created";
if (empty($av_error)) {
func_header_location($script);
}


But, it's just over my head.

Thanks,
Jeff

~~~~~~~
Version 4.0.11 (and 4.0.9)

cotc2001 02-05-2005 10:55 PM

Quote:

Originally Posted by jdedba
In addition, each click on the Submit button on the Profile page, the user and the store owner will get an email - wasting your time.


You can turn that off in admin/General settings/Email notification options

balinor 02-24-2005 11:52 AM

Anyone successfully redirect a newly registered client yet?

jdedba 02-25-2005 05:22 AM

Thank you for checking back.

I did the following in include/register.php

Replace
Code:

  $script = $xcart_catalogs['partner']."/home.php?mode=profile_created";
        }
    if (empty($av_error)) {
        func_header_location($script);
    }



with

Code:

  $script = $xcart_catalogs['partner']."/home.php?mode=profile_created";
        }
    if (empty($av_error)) {
          if( $reg_error ) {
                func_header_location($script);
            }
          else {
        header("LOCATION: myfile.php");  # can be any x-cart file
          }
    }


It seems it works ok for me. I am not very good at x-cart and so I am not sure it will cause problem or not. If you see any, please post back.

Regards,

Jeff

jignacio 04-13-2005 09:40 AM

Thanks Jeff for this code.

Now I understand why I have customer registered 2 or 3 times in the same day. :?

This code works OK in 4.0.13

All the best.

More-Japan 04-13-2005 10:11 AM

Yes, this is good. I have noticed that somtimes a user will create a profile and then delete it only a few minutes later :oops:


All times are GMT -8. The time now is 02:55 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.