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
  #21  
Old 03-29-2004, 02:54 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

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
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #22  
Old 03-29-2004, 04:21 PM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

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
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #23  
Old 03-30-2004, 07:02 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

Code:
{assign var="last_location" value="My Account"} { include file="location.tpl" last_location=$last_location }

__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #24  
Old 03-30-2004, 07:15 AM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

Thanks BOOMER - your code worked a treat!
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #25  
Old 03-30-2004, 08:46 AM
  domspe's Avatar 
domspe domspe is offline
 

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

Default

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 <?php require_once "./auth.php"; $smarty->display("custom_login.tpl"); ?> Template (skin1/custom_login.tpl) {* Smarty *} {assign var="form_url" value=$current_location} <TABLE border=0 cellPadding=0 cellSpacing=0 width=100%> <FORM action="{$form_url}/include/login.php" method=post name=authform> <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> <input type=hidden name=usertype value="C"> <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> </form> </table>
__________________
~jaime*
shop.mpartworks.com
~~~~~~~~~~~~~~
xcart pro 3.5.5
heavily modified
freeBSD 4.8
php 4.3.3
Reply With Quote
  #26  
Old 03-31-2004, 10:51 AM
  domspe's Avatar 
domspe domspe is offline
 

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

Default

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!
__________________
~jaime*
shop.mpartworks.com
~~~~~~~~~~~~~~
xcart pro 3.5.5
heavily modified
freeBSD 4.8
php 4.3.3
Reply With Quote
  #27  
Old 04-07-2004, 07:17 AM
 
jburdi jburdi is offline
 

Newbie
  
Join Date: Mar 2004
Posts: 5
 

Default

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.
Reply With Quote
  #28  
Old 04-07-2004, 07:53 AM
 
laureon laureon is offline
 

Senior Member
  
Join Date: Oct 2003
Posts: 171
 

Default

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} <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <form action="{$xcart_web_dir}/include/login.php" method=post name=loginform> <tr> <td></td> <td class=VertMenuItems valign="top"> {$login} {$lng.txt_logged_in} {if $js_enabled} {include file="buttons/logout_menu.tpl"} {else} {include file="buttons/logout_menu.tpl"} {/if} </td> </tr> {if $usertype eq "C"} <tr> <td class=VertMenuItems colspan=2> <div align=right> {if $js_enabled} {$lng.txt_javascript_disabled} {else} {$lng.txt_javascript_enabled} {/if} </div> </td> </tr> {/if} <input type=hidden name=mode value=logout> <input type=hidden name=redirect value="{$redirect}"> </form> </table> {/if}

Hope this helps.

P.S - Tested and working on 3.5.6
__________________
X-Cart Gold Version: 4.0.17
X-Configurator
X-AOM
X-FancyCategories
X-RMA
X-Offers
Reply With Quote
  #29  
Old 04-07-2004, 08:57 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #30  
Old 04-10-2004, 11:36 AM
  domspe's Avatar 
domspe domspe is offline
 

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

Default

Thanks B00mer!
wish i woulda known that earlier
__________________
~jaime*
shop.mpartworks.com
~~~~~~~~~~~~~~
xcart pro 3.5.5
heavily modified
freeBSD 4.8
php 4.3.3
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 12:00 AM.

   

 
X-Cart forums © 2001-2020