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)

ronp 05-12-2004 06:34 PM

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

pungu 09-02-2004 12:55 PM

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"

elabdesigns 11-01-2004 01:25 PM

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

laureon 11-01-2004 05:42 PM

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

elabdesigns 11-02-2004 06:14 AM

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

B00MER 11-02-2004 06:32 AM

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 ;)

elabdesigns 11-02-2004 06:39 AM

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?

B00MER 11-02-2004 07:19 AM

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 /

elabdesigns 11-02-2004 08:06 AM

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]

pengrus 05-13-2005 10:08 PM

Has someone made Leon's mod work with 4.013?

I got openning failed errors...


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

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