X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Login Link (https://forum.x-cart.com/showthread.php?t=2355)

jgkiefer 04-18-2003 06:20 AM

Login Link
 
How would I create a link to the login page instead of using the auth box form?

ETInteractive.com 04-24-2003 07:07 AM

I have the same issue.

I tried creating a login.php, which calls Auth.tpl and it works, its just the page doesnt include the rest of the site...

it loses the header, footer, etc

what do i need to do to get this working?

B00MER 04-24-2003 07:10 AM

edit [skin1]/common_templates.tpl and add something similar:

Code:

{elseif $main eq "mainlogin"}
{include file="customer/main/login.tpl"}

Note, place your login form from, auth.tpl in customer/main/login.tpl

Now just create the login.php file, with something like:

Code:

<?

require "../smarty.php";
require "../config.php";
@include "./https.php";
require "./auth.php";

$smarty->assign("main","mainlogin");
$smarty->display("customer/home.tpl");

?>


Should do the trick ;)

ETInteractive.com 04-24-2003 04:45 PM

AWESOME

Thnx Boomer :twisted:

Tye 04-30-2003 12:01 AM

Sorry Boomer you totally lost me in the middle somewhere!
 
I have done the following:

Added

{elseif $main eq "mainlogin"}
{include file="customer/main/login.tpl"}

to the [skin1]/common_templates.tpl file


I have cut the login form from auth.tpl and pasted it onto the customer/main/login.tpl

I have the php file you kindly supplied, but where do I put this and how do I call it?

Tye

groovico 05-04-2003 05:49 PM

Re: Sorry Boomer you totally lost me in the middle somewhere
 
Quote:

Originally Posted by Tye

I have the php file you kindly supplied, but where do I put this and how do I call it?

Tye



Php file goes in your /customer/ folder the one with the .php files in it (not the customer in skin folder) you just call it by going direct to mainlogin.php

eg http://www.youdomain.com/xcart/customer/mainlogin.php

Tye 05-05-2003 11:31 PM

Ahh! Got it!
 
Thanks

hzellers 06-06-2003 06:05 AM

Hi there! I added the code and it works fine, but all of my categories disappear when the login.php page loads. Any ideas where they went? They appear on all other pages, just not login.php.

Thanks!

Heather

blagarde 06-24-2003 07:34 AM

I see that you posted this question about 2 weeks back or so. If you didn't find the answer for this, it is suprisingly easy.

Your login.php file should read like this:
Code:

<?

require "../smarty.php";
require "../config.php";
@include "./https.php";
require "./auth.php";

$smarty->assign("main","mainlogin");
                       
require "../include/categories.php";

$smarty->display("customer/home.tpl");

?>


It was the ../include/categories.php that was missing. Also, now that we're at this point, don't forget to remove the if/else code in skin1/customer/home.tpl that calls "auth.tpl".

It might also be noted that by doing all of this, I had to change the paths in the original auth.tpl form to reflect a slightly different directory location, and then pasted into my new login.tpl page. at first the form action used "../../../include/login.php" and I had to change it to "../include/login.php"

hzellers 06-24-2003 08:38 AM

Thank you! The client didn't seem to care so I kept it on the hush-hush. :) But, I'll fix it with this lil' snippet. Thanks again!

Heather


All times are GMT -8. The time now is 02:53 PM.

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