X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   My Account Page (https://forum.x-cart.com/showthread.php?t=39957)

yuichi 05-21-2008 07:14 PM

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.

Yurij 05-22-2008 12:25 AM

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

yuichi 05-24-2008 07:54 AM

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.

yuichi 05-26-2008 05:06 PM

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...

Yurij 05-27-2008 12:28 AM

Re: My Account Page
 
1 Attachment(s)
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".

Attachment 962

yuichi 05-27-2008 04:17 AM

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!


All times are GMT -8. The time now is 02:44 PM.

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