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)
-   -   Link to Login Page (https://forum.x-cart.com/showthread.php?t=41813)

sparrowdog 08-17-2008 11:03 PM

Link to Login Page
 
I want to remove the Login box from the template and just have a link to a login page. I have done some searching and I know there are threads out there on the topic. Most of them are quite old and I'm not sure if they will work on 4.1.10

The page in x-cart with the URL "error_message.php?login_incorrect" that you get by clicking on the LOGIN link in the Auth box wiht no data pretty much says what I need it to except for the error messages.

Surely there's a pretty quick/easy way to link to a login page or someone has a decent mod out there I can use/buy.

Can someone point me in the right direction?

Piotr M. 08-18-2008 03:04 AM

Re: Link to Login Page
 
The secure login page is located at example.com/xcart/secure_login.php
But pay attention to the fact this page will take you to login page over https.
If you need login page with over http, add
PHP Code:

define('HTTPS_CHECK_SKIP',1); 

at the beginning of secure_login.php before line
PHP Code:

include "./auth.php"

And modify /skin1/customer/main/secure_login_form.tpl
Replace
Code:

<form action="{$https_location}/include/login.php" method="post" name=secureform>
with
Code:

<form action="{$http_location}/include/login.php" method="post" name=secureform>

But that's quick dirty trick. The first way with secure login is better than this.
One more way is creating separate page for insecure login, if you need one.

sparrowdog 08-18-2008 04:04 AM

Re: Link to Login Page
 
That looks a bit shorter than the other ways I was reading about. I will give that a try.

Thanks.

(Probably better than my cheat solution of using the error page and removing the error message!)

WhiteDoveGifts 08-18-2008 05:19 AM

Re: Link to Login Page
 
If you are looking for a more elagant solution with more flexibility try the mod in this thread:

http://forum.x-cart.com/showthread.php?t=10141&page=8

In post nr. 75 there's a zip with all the files needed. But to make this work for version 4.1.1o you need to modify the last section in the readme file about register.php with this:
PHP Code:

# My Account Mod Redirect Begin    
    
if (empty($av_error)) {
        if (
$reg_error) {
            
func_header_location($script);
        }
        else {
            
header("LOCATION: help.php?section=Login");
        }
    }
}
# My Account Mod Redirect End 


The nice thing about this mod is that you can include several different templates to suit yout needs :)


All times are GMT -8. The time now is 01:00 AM.

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