![]() |
Login Link
How would I create a link to the login page instead of using the auth box form?
|
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? |
edit [skin1]/common_templates.tpl and add something similar:
Code:
{elseif $main eq "mainlogin"} Now just create the login.php file, with something like: Code:
<? Should do the trick ;) |
AWESOME
Thnx Boomer :twisted: |
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 |
Re: Sorry Boomer you totally lost me in the middle somewhere
Quote:
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 |
Ahh! Got it!
Thanks
|
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 |
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:
<? 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" |
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 |
Can we take it a bit further..?
Does the link change if the customer logs in? For ex. if you put the link that says Sign In, does is say Sign Out once they have signed in?
If not, can we make it so that it does? The one good thing about the auth box is that it lets the customer know that they have successfully signed in by saying logoff. I know the customer can see on the login page that they have signed in but once you go to another page the customer may see the Sign in link and think that they are not signed in. Also, does any one know of a "my account" mod where the wish list, profiles and the orders history links from the shopping cart have been moved onto a "my account" page? Thanks, elab |
can anyone please tell me how I can make this work for version 3.5.3 ?
i get a 'parse error' on 'line 3' anyone, please? |
i figured it out myself...
login.php Code:
<? |
I tried this but placing changes in common_templates.tpl file disables webmaster mode functionality. ANy ideas?
I tried different approach and created login.php with this in it: <?php require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "mainlogin"); $smarty->display("main/login.tpl"); ?> I copied login_incorrect code and created tpl file called login.tpl. Now I get what I want: http://216.93.188.234/shopping/customer/login.php But how do I get that to display within the regular page with header, footer etc...? Thanks, Predrag |
Getting the following error with this mod...
Warning: Smarty error: unable to read template resource: "shop/home.tpl" in /home/httpd/vhosts/shopgspot.com/httpdocs/Smarty-2.5.0/Smarty.class.php on line 1042 Can anyone help me out??? version: 3.5.4 |
I just get a blank page of nothingness!
Here is what my code looks like for my custom login.php Code:
<?php help! 8O |
Are you on v3.5.5 by any chance?
Try this: <? require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "mainlogin"); $smarty->display("customer/home.tpl"); ?> You will need to have something like this in your 'common_templates' file: {elseif $main eq "mainlogin"} {include file="customer/main/mainlogin.tpl"} hope this helps |
Hiya!
i am somewhere between 3.5.4 & 3.5.5 - xcart is doing funky mods. i did exactly as you said: results are here: http://shop.mpartworks.com/login2.php Code:
<? http://shop.mpartworks.com/login.php Code:
<?php *grumble* :) |
I will post full code and instructions shortly.
|
Hi,
Creating a seperate 'Login' page: Step 1 - Create a file named 'myaccount.php' in the folder '[xcart]/customer' in the root x-cart directory. i.e. NOT [skin1]/customer. In the file 'myaccount.php' paste the following code, ensuring you leave no 'white spaces' at the bottom of the file. Code:
<? Step 2 - Creating a page to inform Smarty of which template to use: In [skin1]/common_templates.tpl add the following after the first if statement: Code:
{elseif $main eq "myaccount"} Step 3 - Creating the 'login' page Create a new template 'myaccount.tpl' in [skin1]/customer/main. Then simply copy the login code from: '[skin1]/auth.tpl, inbetween the '{capture} and {/capture} tags as we don't want smarty to base the login page on the 'menu.tpl' template place it between the tags ' Code:
{include file="location.tpl"} Code:
{include file="dialog.tpl" title="My Account" content=$smarty.capture.dialog extra="width=100%"} Code:
{assign var="last_location" value="My Account"} You will need to create a link to call 'myaccount.php' and that is pretty much it. This has been tested on v3.5.5. You can of course change modify the template to your liking and should form the basis of a 'seperate' login page. Any comments appreciated! |
A much easier approach is to copy paste the <FORM>...</FORM> of the login source on your site and make small minor adjustments to images, and the action location of the form if need be, and paste it into a static page and just call it via pages.php?pageid=1 or such. :)
But this looks groovy :D |
BOOMER, if you try my code, the navigation trail only shows the 'site name' and not 'sitename > My Account'. Am I missing something somewhere?
Cheers BOOMER |
Code:
{assign var="last_location" value="My Account"} :wink: |
Thanks BOOMER - your code worked a treat!
|
I got this code here from x-cart - hopefully it can help someone else!
(amazing, they did something fast & free!!) Code:
code for login.php |
FYI - i'd use the script by laureon
x-cart's version left much to be desired after i implemented laureon's version. just an FYI for everyone! :) |
this is all good stuff, but is there anyway to have a button that says login if the user isnt logged in and logout if the user is logged in, kinda like the way it works on the real auth box.
this would make the mod perfect. any information would be greatly appreciated. |
If you insert this code: {if $login eq "" } before the table tags as below:
{capture name=dialog} {if $login eq "" } <TABLE border=0 cellPadding=0 cellSpacing=0 width=100%> {if $config.General.use_https_login eq "Y"} then paste this code after the closing </table> tag and just above '{/capture} {include file="dialog.tpl" title="My Account" content=$smarty.capture.dialog extra="width=100%"}' Code:
{else} Hope this helps. P.S - Tested and working on 3.5.6 |
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 B00mer! 8)
wish i woulda known that earlier :lol: |
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 |
Secure_login.php
Quote:
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" |
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 |
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 |
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
|
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 ;) |
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? |
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. secure_login.php in 4.0.x is in the root / |
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 $ *} Then I made a myaccount.php file and copied some code from the home.php file Code:
<?php 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] |
Has someone made Leon's mod work with 4.013?
I got openning failed errors... |
All times are GMT -8. The time now is 08:18 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.