Not sure why this doesn't work, just some more of my playing with the code. Nothing urgent here, not system critical, just me learning baby stuff.
In the Global Header I added some code to check for our local IP (numbers replaced in example) and if it matches I show a bar across the top that shows the customer name/email and logout button. This is because we use the 'shop as customer' feature and a the guys here have gotten confused, not realizing they were logged in as someone else.
<mvt:assign name="g.localip" value="s.remote_addr" />
<mvt:if expr="g.localip EQ '11.22.33.44'">
<div style="z-index: 400; width: 100%;text-align: center;background: #DB3232;color: #ffffff;padding: 6px;font-weight: bold; font-size: 1em;">CURRENTLY LOGGED IN AS: &mvt:global:customer:login; (& mvt:global:customer:pw_email;) &n bsp;<a style="color: #fff; text-decoration:underline" href="&mvte:urls:SFNT:secure_sep;Action=LOGO&SCREE N=REDIRECT_IPID&p=ip2782g">Logout</a></div>
</mvt:if>
The &SCREEN=REDIRECT_IPID&p=ip2782g gets this
<mvt:if expr="'ip2782g' CIN s.request_uri EQ">
<mvt:item name="toolkit" param="sassign|newurl|http://www.allfrom1supply.com" />
<mvt:item name="toolkit" param="headeroutput|Status|301 Moved Permanently" />
<mvt:item name="toolkit" param="vheaderoutput|Location|g.newurl" />
</mvt:if>
and this is simply because I found that after logging out the customer name and email remained in the top bar, but by sending it to a new page using the code above that flushed the customer name/email. However after I logout the customer, and then log in from the front end as a customer myself using that same bar to log out myself, with the same parameters no longer clears out the customer (me) name/email. It seemed odd to me.
Any thoughts?
In the Global Header I added some code to check for our local IP (numbers replaced in example) and if it matches I show a bar across the top that shows the customer name/email and logout button. This is because we use the 'shop as customer' feature and a the guys here have gotten confused, not realizing they were logged in as someone else.
<mvt:assign name="g.localip" value="s.remote_addr" />
<mvt:if expr="g.localip EQ '11.22.33.44'">
<div style="z-index: 400; width: 100%;text-align: center;background: #DB3232;color: #ffffff;padding: 6px;font-weight: bold; font-size: 1em;">CURRENTLY LOGGED IN AS: &mvt:global:customer:login; (& mvt:global:customer:pw_email;) &n bsp;<a style="color: #fff; text-decoration:underline" href="&mvte:urls:SFNT:secure_sep;Action=LOGO&SCREE N=REDIRECT_IPID&p=ip2782g">Logout</a></div>
</mvt:if>
The &SCREEN=REDIRECT_IPID&p=ip2782g gets this
<mvt:if expr="'ip2782g' CIN s.request_uri EQ">
<mvt:item name="toolkit" param="sassign|newurl|http://www.allfrom1supply.com" />
<mvt:item name="toolkit" param="headeroutput|Status|301 Moved Permanently" />
<mvt:item name="toolkit" param="vheaderoutput|Location|g.newurl" />
</mvt:if>
and this is simply because I found that after logging out the customer name and email remained in the top bar, but by sending it to a new page using the code above that flushed the customer name/email. However after I logout the customer, and then log in from the front end as a customer myself using that same bar to log out myself, with the same parameters no longer clears out the customer (me) name/email. It seemed odd to me.
Any thoughts?
Comment