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
  #31  
Old 05-12-2004, 06:34 PM
 
ronp ronp is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: SE US
Posts: 30
 

Default Separate Login Page help please

I would love to have a separate login page as well but I get a Runtime Error when I try to login from the new page. Login from old method which still is using auth.tpl works fine. I know this looks very simple but I can't figure it out. Any help appreciated.

New PHP file customer_login.php in my Customer folder (not skin1/customer):

<?
require "./auth.php";
require $xcart_dir."/include/categories.php";
$smarty->assign("main", "customer_login");
$smarty->assign("location",$location);
$smarty->display("customer/home.tpl");
?>

**************************************************

New .tpl file customer_login.tpl in my skin1/customer/main folder:

{* $Id: customer_login.tpl Exp $ *}

{assign var="last_location" value="My Account"}
{ include file="location.tpl" last_location=$last_location }
{capture name=dialog}

<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<FORM action="{$xcart_web_dir}/include/login.php" method=post name=authform>

<tr>
<td class=VertMenuItems colspan=2>
<font class=VertMenuItems>{$lng.lbl_username}</font>

<input type=text name=username size="14" style="font-family: Verdana; font-size: 9px; border: 1px solid #0099CC; background-color: #FFFFFF; color:#000000">

<font class=VertMenuItems>{$lng.lbl_password}</font>

<input type=password name=password size="14" style="font-family: Verdana; font-size: 9px; border: 1px solid #0099CC; background-color: #FFFFFF; color:#000000">
{if $js_enabled}
{include file="buttons/go.tpl" style="button" type="input"}
{else}
{include file="buttons/go.tpl" style="button" type="input" align="middle"}
{/if}
<input type=hidden name=mode value=login>
{if $active_modules.Simple_Mode ne "" and $usertype ne "C" and $usertype ne "B"}
<input type=hidden name=usertype value="P">
{else}
<input type=hidden name=usertype value="{$usertype}">
{/if}
<input type=hidden name=redirect value="{$redirect}">

</td></tr>

{if $usertype eq "C" or ($usertype eq "B" and $config.Modules.partner_register eq "Y")}
<td height=24 align=left nowrap class=VertMenuItems><font size="0">Register

{$lng.lbl_recover_password}</font></td>
</tr>
{/if}

</td>
</form>
</table>

{/capture}
{include file="dialog.tpl" title="Returning Customer Login" content=$smarty.capture.dialog extra="width=100%"}

************************************************** ****

Change made to common_templates.tpl:
{elseif $main eq "customer_login"}
{include file="customer/main/customer_login.tpl"}

*************************************
The error I get is A Runtime Error Has Occurred...
Line: 0
Error: Object doesn't support this property or method

Running x-cart 3.5.1
__________________
----------------------------------------------------
X-Cart 3.5.1
\"Heavily Modified\"
Win2000 Advanced Server/Apache 2.0.54 w/OpenSSL 0.9.7g
PHP 4.4.0/MySQL 4.1.14-nt
Reply With Quote
  #32  
Old 09-02-2004, 12:55 PM
 
pungu pungu is offline
 

Newbie
  
Join Date: Jul 2004
Posts: 6
 

Default Secure_login.php

Quote:
Originally Posted by B00MER
Just wanted to add those running 3.5.5+ can just use the link customer/secure_login.php if they have a secure HTTPS server, its secure and a seperate login from customer/home.tpl.

Kudos.

Thanks for this "shortcut"

Problem is I after I log in, the page still displays the "secure login form"

How do I get rid of that.

My site: https://www.hrpolicyanswers.com/xstore/home.php

Click on "Your Account"
__________________
Policies R Us
Reply With Quote
  #33  
Old 11-01-2004, 01:25 PM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default Help, I get an error

I am using x-cart 4.0.6 GOLD and when I follow the steps that laureon has given I get the following error:

ERROR: Can not initiate application! Please check configuration.

Can anyone explain, or fix the script to run with my version?

Thank you
Reply With Quote
  #34  
Old 11-01-2004, 05:42 PM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

Hello,

I believe that my walk-through may need to be adjusted to work on v4.x.x. I am currently using v4.x.x so might have a look at this myself at somepoint in the near future.

Cheers,
Leon
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #35  
Old 11-02-2004, 06:14 AM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default

You anyone be interested in getting this to work? Or if it could be purchased? I need this asap. Someone on here must be able to get this to work
Reply With Quote
  #36  
Old 11-02-2004, 06:32 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

Why not use customer/secure_login.php or customer/error_message.php?login_incorrect

Either that or just copy the form into a static page. vwhalla
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #37  
Old 11-02-2004, 06:39 AM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default

If use the customer/secure_login.php... how can I make it so that its not secure, or both?

Can you post the code that I would need to place into a page? Can I make a myaccount.php page and past the code from the login form?


*note: I don't have a customer/secure_login.php page?
Reply With Quote
  #38  
Old 11-02-2004, 07:19 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

Here is mine from cart-lab [3.5.5]

Code:
If you already have an account, you can authenticate yourself by filling in the form below. The fields marked with <font class="TableCenterCustomerFormOrange">*</font> are mandatory. <table border=0> <form action="/lab/include/login.php" method=post name=errorform> <tr> <td height="10" width="78" class=FormButton>Login</td> <td width="10" height="10"><font class=Star>*</font></td> <td width="282" height="10"> <input type="text" name="username" size="30"> </td> </tr> <tr> <td height="10" width="78" class=FormButton>Password</td> <td width="10" height="10"><font class=Star>*</font></td> <td width="282" height="10"> <input type="password" name="password" size="30"> <input type="hidden" name="usertype" value="C"> <input type="hidden" name="redirect" value="customer"> <input type=hidden name=mode value=login> </td> </tr> <tr> <td height="10" width="78" class=FormButton></td> <td width="10" height="10"></td> <td width="282" height="10" class=ErrorMessage> </td> </tr> <tr> <td height="10" width="78" class=FormButton></td> <td width="10" height="10" class=FormButton></td> <td width="282" height="10"> [img]/lab/skin1/images/buttons/submit.gif[/img] </td> </tr> </form> </table> If you do not have an account, you can easily <font class=TableCenterCustomerform>register here</font>

secure_login.php in 4.0.x is in the root /
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #39  
Old 11-02-2004, 08:06 AM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default

My hair is starting to fall out. Maybe, I'm just being stupid, but I am running out of time here.

This is what I am trying to do.

I copied the code from the home.tpl and made a myaccount.tpl:

Code:
{* $Id: home.tpl,v 1.15 2004/07/13 13:35:42 svowl Exp $ *} { config_load file="$skin_config" } <HTML> <HEAD> <TITLE> {if $config.SEO.page_title_format eq "A"} {section name=position loop=$location} {$location[position].0|escape} {if not %position.last%} :: {/if} {/section} {else} {section name=position loop=$location step=-1} {$location[position].0|escape} {if not %position.last%} :: {/if} {/section} {/if} </TITLE> { include file="meta.tpl" } <LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"></HEAD> <BODY leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> { include file="rectangle_top.tpl" } { include file="head.tpl" } <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td></td> <td width="657"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="http://www.pariscape.com/images/border_left_bg.gif">[img]http://www.pariscape.com/images/spacer.gif[/img]</td> <td height="10" align="left" valign="top" bgcolor="#FFFFFF">[img]http://www.pariscape.com/images/spacer.gif[/img]</td> <td background="http://www.pariscape.com/images/border_right_bg.gif">[img]http://www.pariscape.com/images/spacer.gif[/img]</td> </tr> <tr> <td width="10" background="http://www.pariscape.com/images/border_left_bg.gif">[img]http://www.pariscape.com/images/spacer.gif[/img]</td> <td align="left" valign="top" bgcolor="#FFFFFF"> <TABLE border="0" width="100%" cellpadding="0" cellspacing="0" align="center"> <TR> <TD width="150" valign="top">{include file="customer/side_menu.tpl"} <TD width="20"></TD> <TD valign="top"> {include file="location.tpl"} {include file="dialog_message.tpl"} {include file="customer/login_form.tpl"} </TD> <TD width="20"></TD> </TR> </TABLE> </td> <td width="10" background="http://www.pariscape.com/images/border_right_bg.gif">[img]http://www.pariscape.com/images/spacer.gif[/img]</td> </tr> </table></td> <td></td> </tr> </table> { include file="bottom_customer.tpl" } </BODY> </HTML>

Then I made a myaccount.php file and copied some code from the home.php file

Code:
<?php require "./auth.php"; func_display("customer/myaccount.tpl",$smarty); ?>

I made a login_form.tpl to include the login form.

I when I do this I can't get the location to display or the categories, why?

Its this to intense? Can I just make a myaccount.php page, copy the code
from the home.tpl and change some stuff?

[/code]
Reply With Quote
  #40  
Old 05-13-2005, 10:08 PM
 
pengrus pengrus is offline
 

eXpert
  
Join Date: Feb 2004
Posts: 359
 

Default

Has someone made Leon's mod work with 4.013?

I got openning failed errors...
__________________
x-cart 4.1.8 Gold
Linux
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 11:05 PM.

   

 
X-Cart forums © 2001-2020