Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Add loginlogout toggle to horizontal menu bar
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

go4gold
VP-CART New User

151 Posts

Posted - December 24 2006 :  01:10:12  Show Profile  Visit go4gold's Homepage  Reply with Quote
Hi,

I have added Login as a new top menu item using langcommonlogin. However, instead of just showing "login", I would like the button to have the login/logout toggle that appears as standard elsewhere. Can anyone tell me how I do this please?

Thanks in advance for any help.

Go4Gold

Edited by - go4gold on December 25 2006 01:39:17

elammers
VP-CART Super User

USA
256 Posts

Posted - December 26 2006 :  07:52:02  Show Profile  Visit elammers's Homepage  Reply with Quote
I see this <%loginlogouttoggle%> as the function used in the default header. Have you tried playing around with that in the menu system? You may have to hand-code that portion of the menu.

I haven't played with this but am curious to learn what ultimately works.

Regards,

Eric in Maine
Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - December 27 2006 :  01:45:26  Show Profile  Visit go4gold's Homepage  Reply with Quote
Hi elammers,

Thanks for the suggestion. I tried pasting various permutations of this into the site menu setup which didn't work. Would you happen to know where I would find the code behind these menu items please?


Go4Gold
Go to Top of Page

Kidd
VP-CART Super User

Australia
373 Posts

Posted - December 27 2006 :  04:07:30  Show Profile  Reply with Quote
theres a sample code from shopproductsubs.asp

<input type="button" class="submitbtn" value="<%=getlang("langcommonsignup")%>" onclick="location.href='shopcustregister.asp'">

you can try to modify refering to those line i reckon, thats for the login button
Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - December 27 2006 :  10:26:24  Show Profile  Visit go4gold's Homepage  Reply with Quote
Thanks Kidd, this put me on a new tack. I found this loginlogouttoggle subroutine in shopproductsubs.asp which I assume I somehow I have to link in with the menu:

"Sub loginlogouttoggle
'VP-ASP 6.08 - restore cookie if enabled so this displays correctly
if getconfig("xcookielogin") = "Yes" then
RestoreCustomerDetailsCookie
end if

if Getsess ("lastname") > "" then%>
<a href="shopcustadminlogin.asp?new=yes" class="small-black-text"><%=getLang("langcommonlogout")%></a>
<%else%>
<a href="shopcustadminlogin.asp" class="small-black-text"><%=getLang("langcommonlogin")%></a>
<%end if
End sub"

I can't figure this out though. I tried some weird things like pasting the code into the menu admin and then into the login button code in that same file but all that did was give an error message when I tried to launch any site page. I'm thinking I need to include it somewhere in the code indicated by Kidd above or perhaps somewhere else in that file but have not really got a clue which bits to use where. If anyone has any further thoughts it would be much appreciated. It sounded so easy ...

Thanks in advance.

Go4Gold
Go to Top of Page

Kidd
VP-CART Super User

Australia
373 Posts

Posted - January 02 2007 :  04:39:27  Show Profile  Reply with Quote
basically what you need to do to call loginlogouttoggle is
(HTML TAG)<%loginlogouttoggle%>(HTML TAG)

something like
<td align="center"><%loginlogouttoggle%></td>


Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - January 04 2007 :  23:55:14  Show Profile  Visit go4gold's Homepage  Reply with Quote
I think I'm probably being dense but where do you mean I should post that code please? I tried it as the caption for langcommonlogin which did not work so assume I am still on the wrong track.

Thanks for your time Kidd.

Go4Gold
Go to Top of Page

Kidd
VP-CART Super User

Australia
373 Posts

Posted - January 04 2007 :  23:59:04  Show Profile  Reply with Quote
where are you trying to show this login thing actually? its a default function on vp-asp, top right corner my account | login | checkout
Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - January 05 2007 :  00:38:59  Show Profile  Visit go4gold's Homepage  Reply with Quote
I have moved it to the horizontal navigation bar so I am trying to handle it within the site menu administration.

Go4Gold
Go to Top of Page

Kidd
VP-CART Super User

Australia
373 Posts

Posted - January 05 2007 :  01:22:28  Show Profile  Reply with Quote
if you are trying to handle it through admin site menu it will never work well, i think you cant but who knows maybe someone else knows how to

to be able to call the loginlogouttoggle subroutine you will need to do some coding, thats the only way i can think of

Edited by - Kidd on January 05 2007 01:27:18
Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - January 05 2007 :  02:41:24  Show Profile  Visit go4gold's Homepage  Reply with Quote
Thanks for your time in trying to help Kidd. I'll put this to one side now and maybe revisit it after my site is launched.

Go4Gold
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00