X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   My Account Login (https://forum.x-cart.com/showthread.php?t=10141)

mpj 02-16-2005 09:18 AM

Is there a way to display customer profile ?

mffowler 02-16-2005 10:17 AM

mpj,

Once the customer logs in then the profile comes up as an option ...

- Mike

mpj 02-16-2005 10:26 AM

thanks for the reply.

I didn't state my question correctly. :)

Once a customer logins, they have the options of :

-------------------
Update your profile

Delete profile

Orders history
-------------------


I was wondering is there is a way to display the current customer profile

-------------------
Name
Last Name
Address

Click here to edit your existing profile
-------------------

Thanks

mffowler 02-16-2005 11:17 AM

Sure, just call the content in the same way it is called where it is shown. I would explian exactly how, but it helps to look at it and figure it out. Then you'll be able to do a lot more ...

- Mike

pwd88 02-26-2005 11:47 AM

Hi Mike:
Thanks for the mod you shared, I got the login part done, a link called my account, then user enters, click login, after login, it goes to file Login.tpl
Code:

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

I am wondering if I can change it to dispalying the home page, home.php which has featured products page, and also to diaplay a message Welcome JohnDoe and a logout link, How do I change the code ? Thanks

mffowler 03-10-2005 04:43 AM

In your case, I would probably not have only a "My Login" scenario, but also the equivalent on the home/main page. That way a user could log in there and have what you desire without the added step to log in.

I wanted to have an option to create more account content in a unique place outside of the home.tpl, as it is already littered with too many menu boxes. Once users use a remote login area (Speed Bar perhaps?), they can easily know where and how to log in.

Prior to loggin in or registering, they can shop and explore and register during first time checkout. I neever understood a "Register" at a store option prior to shopping. That's like leaving your wallet (or details) at the checkout stand before hitting the aisles. Unless there is added value, I never thought it necessary to encourage registration without shopping or joining a community.

There are other ways to create a login page as mentioned by some of the posts in this thread, but creating a unique tpl file allows to integrate unique content for customers and make other things accessible when logged in.

I know that doesn't answer your question. Yes, you can do what you desire, but it is redundant and not very useful to a customer. They might as well have stayed at the home page to begin with ...

- Mike

spence88mph 07-06-2005 08:44 PM

great mod but can someone help me with the login button
 
everything works except the login button, it logs in if you just press enter but the button no longer works. I've spent most of today trying to work out why!

any help will be much appreciated thanks!

mffowler 07-06-2005 10:08 PM

PM me a URL and I'll take a look... Mike

shan 07-07-2005 03:38 AM

a simple way to create a log in page is.

add a link

Code:

<table  border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
{if $login}
<FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform">
<td>
Log Out - {$login}
<INPUT type="hidden" name="mode" value="logout">
<INPUT type="hidden" name="redirect" value="{$redirect}">
</td>
</FORM>
{else}
<td>
Log In
</td>
{/if}
</tr>
</table>


edit checkout.tpl. get the bit of code at the top and wrap it with the following to remove the cart part showing if the page is being used for log in

add to top

Code:

{if $smarty.get.mode ne "auth"}

original code

Code:

{capture name=checkout_dialog}

<FORM action="cart.php" method="POST" name="cartform">

<INPUT type="hidden" name="cart_operation" value="cart_operation">

{if $config.Appearance.show_cart_details eq "Y" or ($config.Appearance.show_cart_details eq "L" and $smarty.get.paymentid ne "" and $smarty.get.mode eq "checkout")}
{include file="customer/main/cart_details.tpl"}
{else}
{include file="customer/main/cart_contents.tpl"}
{/if}

<HR noshade size="1">

{include file="customer/main/cart_totals.tpl"}




{if $js_enabled}
{include file="buttons/update.tpl" href="javascript: document.cartform.submit()" js_to_href="Y"}
{else}
{include file="submit_wo_js.tpl" value=$lng.lbl_update}
{/if}

</FORM>

{/capture}
{include file="dialog.tpl" title="`$lng.lbl_checkout`: `$lng.lbl_step` `$checkout_step` `$lng.lbl_of` `$total_checkout_steps`" content=$smarty.capture.checkout_dialog extra="width=100%"}



add beneath

Code:

{/if}

hudge 07-19-2005 09:28 AM

sorry to be a pain.

ok I made the following files: Login.tpl, Login_message.tpl, index.tpl, auth_mod.tpl, menu_profile_mod.tpl, and authbox_mod.tpl

I have alos updated them all so they dont point to menu_mod.tpl but to menu.tpl

I also switched button_vunc.tpl to button.tpl

so when this is all done I get an error on the index.tpl :
no closing if bracket

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"}


so i added a {/if}

the error is fixed but when my page loads I get nothing.

Any ideas.

I should be getting a login form. Thanks for any help.

Here is my link:

http://dejaun.com/store/help.php?section=Login


All times are GMT -8. The time now is 11:47 AM.

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