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
  #11  
Old 07-28-2003, 05:43 AM
 
elabdesigns elabdesigns is offline
 

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

Default 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
Reply With Quote
  #12  
Old 01-29-2004, 07:56 AM
 
sarahnk sarahnk is offline
 

Advanced Member
  
Join Date: Jan 2004
Location: New York, NY
Posts: 58
 

Default

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?
__________________
3rd site: 4.1.0 (currently working on)

2nd site: Version 4.0.12

X-Cart version 3.5.14
PHP 4.3.3 details
MySQL server 4.0.15
Reply With Quote
  #13  
Old 01-29-2004, 08:38 AM
 
sarahnk sarahnk is offline
 

Advanced Member
  
Join Date: Jan 2004
Location: New York, NY
Posts: 58
 

Default

i figured it out myself...

login.php
Code:
<? require "./auth.php"; $smarty->assign("main", "mainlogin"); $smarty->display("customer/home.tpl"); ?>
__________________
3rd site: 4.1.0 (currently working on)

2nd site: Version 4.0.12

X-Cart version 3.5.14
PHP 4.3.3 details
MySQL server 4.0.15
Reply With Quote
  #14  
Old 02-25-2004, 03:19 PM
 
oziris oziris is offline
 

Advanced Member
  
Join Date: Jun 2003
Posts: 94
 

Default

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
__________________
X-Cart version 4.0.12 Gold
PHP 4.3.8
MySQL 3.23.58
Reply With Quote
  #15  
Old 03-24-2004, 01:42 PM
 
SMDStudios SMDStudios is offline
 

eXpert
  
Join Date: Dec 2003
Location: Orlando, FL
Posts: 207
 

Default

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
Reply With Quote
  #16  
Old 03-29-2004, 12:51 PM
  domspe's Avatar 
domspe domspe is offline
 

Advanced Member
  
Join Date: Mar 2004
Location: Sarasota, FL
Posts: 79
 

Default

I just get a blank page of nothingness!

Here is what my code looks like for my custom login.php
Code:
<?php require "./auth.php"; require "./smarty.php"; require "./config.php"; @include "./https.php"; require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "mainlogin"); $smarty->display("main/login.tpl"); ?>

help!
__________________
~jaime*
shop.mpartworks.com
~~~~~~~~~~~~~~
xcart pro 3.5.5
heavily modified
freeBSD 4.8
php 4.3.3
Reply With Quote
  #17  
Old 03-29-2004, 01:11 PM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

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
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #18  
Old 03-29-2004, 01:56 PM
  domspe's Avatar 
domspe domspe is offline
 

Advanced Member
  
Join Date: Mar 2004
Location: Sarasota, FL
Posts: 79
 

Default

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:
<? require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "mainlogin"); $smarty->display("customer/home.tpl"); ?>
and here is my blank page of nothingness:
http://shop.mpartworks.com/login.php
Code:
<?php require "./auth.php"; require "./smarty.php"; require "./config.php"; @include "./https.php"; require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "mainlogin"); $smarty->display("main/login.tpl"); ?>

*grumble*
__________________
~jaime*
shop.mpartworks.com
~~~~~~~~~~~~~~
xcart pro 3.5.5
heavily modified
freeBSD 4.8
php 4.3.3
Reply With Quote
  #19  
Old 03-29-2004, 02:04 PM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

I will post full code and instructions shortly.
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #20  
Old 03-29-2004, 02:40 PM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

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:
<? require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "myaccount"); $smarty->assign("location",$location); $smarty->display("customer/home.tpl"); ?>

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"} {include file="customer/main/myaccount.tpl"}

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"} {capture name=dialog}
and
Code:
{include file="dialog.tpl" title="My Account" content=$smarty.capture.dialog extra="width=100%"}
which should give you something that looks like:

Code:
{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%> {if $config.General.use_https_login eq "Y"} {assign var="form_url" value=$https_location} {else} {assign var="form_url" value=$current_location} {/if} <FORM action="{$form_url}/include/login.php" method=post name=authform> {if $config.General.use_secure_login_page eq "Y"} {* use_secure_login_page *} <tr> <td> {if $usertype eq "C"} {assign var="slogin_url" value=$catalogs_secure.customer} {elseif $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"} {assign var="slogin_url" value=$catalogs_secure.admin} {elseif $usertype eq "P"} {assign var="slogin_url" value=$catalogs_secure.provider} {elseif $usertype eq "B"} {assign var="slogin_url" value=$catalogs_secure.partner} {/if} {include file="buttons/secure_login.tpl"} </td> </tr> {else} {* use_secure_login_page *} <tr> <td class=VertMenuItems> <font class=VertMenuItems>{$lng.lbl_username}</font> <input type=text name=username size=16> <font class=VertMenuItems>{$lng.lbl_password}</font> <input type=password name=password size=16> <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> <tr> <td height=24 class=VertMenuItems> {if $js_enabled} {include file="buttons/login_menu.tpl"} {else} {include file="buttons/login_menu.tpl"} {/if} </td> </tr> {/if} {* use_secure_login_page *} {if $usertype eq "C" or ($usertype eq "B" and $config.Modules.partner_register eq "Y")} <tr> <td height=24 nowrap class=VertMenuItems> {include file="buttons/create_profile_menu.tpl"} </td> </tr> {/if} {if $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"} <tr> <td class=VertMenuItems> <div align=left>{$lng.lbl_insecure_login} </div> </td> </tr> {/if} {if $usertype eq "C"} <tr> <td class=VertMenuItems> <div align=right> {if $js_enabled} {$lng.txt_javascript_disabled} {else} {$lng.txt_javascript_enabled} {/if} </div> </td> </tr> {/if} </form> </table> {/capture} {include file="dialog.tpl" title="My Account" content=$smarty.capture.dialog extra="width=100%"}

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!
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
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 05:11 AM.

   

 
X-Cart forums © 2001-2020