Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

My Account Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-21-2008, 07:14 PM
 
yuichi yuichi is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 42
 

Default My Account Page

Hi all.
I am trying to make a "my account" page and found few pages that describes how to do it, but had no success.
I have 4.1.9 and for some reason, the codes that I tried does not work.
Does anyone know where I can find some examples that works with 4.1.9?
Basically what I tried was to create a page with:

/help.php?section=login

If anyone could redirect me to a page, I would much appreciate!
Thanks in advance.
__________________
X-Cart Ver: 4.1.9 Gold
X-Cart Ver: 4.1.10 Gold
Reply With Quote
  #2  
Old 05-22-2008, 12:25 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: My Account Page

Quote:
Originally Posted by yuichi
Hi all.
I am trying to make a "my account" page and found few pages that describes how to do it, but had no success.
I have 4.1.9 and for some reason, the codes that I tried does not work.
Does anyone know where I can find some examples that works with 4.1.9?
Basically what I tried was to create a page with:

/help.php?section=login

If anyone could redirect me to a page, I would much appreciate!
Thanks in advance.

During processing actually meet the two files:
-- Help.php
-- Skin1/help/index.tpl

To add a new section (pages), you need to add a new condition in "Skin1/help/index.tpl".

Example, add until last "{else}" next code (will turn out something so):
PHP Code:
..........
{elseif 
$section eq "test"}
xo-xo-xo

{else}
{include 
file="help/general.tpl"}
{/if} 


You will have a new page, which will be called at the following url:
help.php?section=test
Reply With Quote
  #3  
Old 05-24-2008, 07:54 AM
 
yuichi yuichi is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 42
 

Default Re: My Account Page

Thanks Yurij! and sorry for the late post.
You always help me out!! I really appreciate for your kindness!
I will def. try the method and will post how it went.
__________________
X-Cart Ver: 4.1.9 Gold
X-Cart Ver: 4.1.10 Gold
Reply With Quote
  #4  
Old 05-26-2008, 05:06 PM
 
yuichi yuichi is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 42
 

Default Re: My Account Page

This is what I did so far..

I added this code to the skin1/help/index.tpl

Code:
{if $section eq "login"} {include file="help/login.tpl"} {elseif $section eq "Login_message"} {include file="help/Login_message.tpl"} {elseif $section eq "Login_error"} {include file="help/Login.tpl"}

Next, I added the login.tpl

Code:
{* $Id: Login.tpl,v 1.0 2004/11/14 16:03:50 mclap Exp $ *} {$lng.txt_login_header_1} {capture name=dialog} {if $login eq "" } <TABLE width="100%" cellpadding="0" cellspacing="0" border="0"> <TR><TD>{$lng.txt_login_header_2}</TD></TR> <TR> <TD>{ include file="auth_mod.tpl" }</TD> </TR> </TABLE> {else} <TABLE width="100%" cellpadding="0" cellspacing="0" border="0"> <TR> <TD width="50%">{ include file="menu_profile_mod.tpl" }</TD> <TD width="50%">{ include file="authbox_mod.tpl" }</TD> </TR></TABLE> {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_login_account content=$smarty.capture.dialog extra="width=100%"}

Here is the code for menu_profile_mod.tpl
Code:
{* $Id: menu_profile_mod.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} <TABLE width="85%" align="center" border="0"> <TR><TD> {include file="buttons/button_vunc.tpl" button_title=$lng.lbl_modify_details href="register.php?mode=update"} {$lng.txt_menu_profile_option1} {include file="buttons/button_vunc.tpl" button_title=$lng.lbl_delete_profile href="register.php?mode=delete"} {$lng.txt_menu_profile_option2} {if ($usertype eq 'A' || ($usertype eq 'P' && $active_modules.Simple_Mode)) && $is_merchant_password eq 'Y'} {$lng.lbl_change_mpassword} {/if} {if $usertype eq "C"} {include file="buttons/button_vunc.tpl" button_title=$lng.lbl_orders_history href="orders.php"} {$lng.txt_menu_profile_option3} {if $user_subscription ne ""} {include file="modules/Subscriptions/subscriptions_menu.tpl"}</A> {/if} {/if} </TD></TR></TABLE> {/capture} { include file="menu_mod.tpl" menu_title=$lng.lbl_your_profile menu_content=$smarty.capture.menu }

authbox_mod.tpl
Code:
{* $Id: authbox_mod.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} <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 valign="top"> <h1>{$login}{$lng.txt_logged_in}</h1> {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 colspan="2" align="right"> {if $js_enabled} {$lng.txt_javascript_disabled} {else} {$lng.txt_javascript_enabled} {/if} </TD> </TR> {/if} <INPUT type="hidden" name="mode" value="logout"> <INPUT type="hidden" name="redirect" value="{$redirect}"> </FORM> </TABLE> {/capture} {include file="menu_mod.tpl" menu_title=$lng.lbl_authentication menu_content=$smarty.capture.menu}

I was successful on calling the page, but when I go to the /help.php?section=login I basically get a blank page...
__________________
X-Cart Ver: 4.1.9 Gold
X-Cart Ver: 4.1.10 Gold
Reply With Quote
  #5  
Old 05-27-2008, 12:28 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: My Account Page

Quote:
Originally Posted by yuichi
This is what I did so far..

.................

I was successful on calling the page, but when I go to the /help.php?section=login I basically get a blank page...


I have it works. The truth is not correct, but it works.

The only change that had "menu_mod.tpl -> menu.tpl".

Click image for larger version

Name:	aaaaaaaaaaaaaaa.JPG
Views:	227
Size:	36.6 KB
ID:	962
Reply With Quote
  #6  
Old 05-27-2008, 04:17 AM
 
yuichi yuichi is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 42
 

Default Re: My Account Page

Thank you Yurij,

I changed the menu_mod.tpl to menu.tpl and it worked.
I appreciate for your kind help, and thanks for helping every time!

You ROCK!
__________________
X-Cart Ver: 4.1.9 Gold
X-Cart Ver: 4.1.10 Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 03:05 PM.

   

 
X-Cart forums © 2001-2020