Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Login Link

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-18-2003, 06:20 AM
 
jgkiefer jgkiefer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 85
 

Default Login Link

How would I create a link to the login page instead of using the auth box form?
Reply With Quote
  #2  
Old 04-24-2003, 07:07 AM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

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?
Reply With Quote
  #3  
Old 04-24-2003, 07:10 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #4  
Old 04-24-2003, 04:45 PM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

AWESOME

Thnx Boomer
Reply With Quote
  #5  
Old 04-30-2003, 12:01 AM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

Default 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
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
Reply With Quote
  #6  
Old 05-04-2003, 05:49 PM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default 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
Reply With Quote
  #7  
Old 05-05-2003, 11:31 PM
 
Tye Tye is offline
 

eXpert
  
Join Date: Nov 2002
Location: Australia
Posts: 284
 

Default Ahh! Got it!

Thanks
__________________
Today is a beautiful day, grab it while you can and live it to the full

Version 4.2.3 UNIX
Reply With Quote
  #8  
Old 06-06-2003, 06:05 AM
  hzellers's Avatar 
hzellers hzellers is offline
 

Senior Member
  
Join Date: Mar 2003
Location: Cortland, New York
Posts: 106
 

Default

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
__________________
Thank you!
Reply With Quote
  #9  
Old 06-24-2003, 07:34 AM
 
blagarde blagarde is offline
 

Member
  
Join Date: Jun 2003
Posts: 28
 

Default

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"
Reply With Quote
  #10  
Old 06-24-2003, 08:38 AM
  hzellers's Avatar 
hzellers hzellers is offline
 

Senior Member
  
Join Date: Mar 2003
Location: Cortland, New York
Posts: 106
 

Default

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
__________________
Thank you!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020