View Single Post
  #1  
Old 07-28-2009, 12:42 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default testing for registered or anonymous user

I's like to be able to use an if statement in my invoice template, to display one thing for registered users, and another to anonymous users.

I am assuming I can just test the value of {$order.login}, but anonymous user logins have a number at the end.

I really want to do something like

{if left({$order.orderid}, 9) eq "anonymous"}
stuff here
{else}
stuff here
{/if}

but I can't work out what it should actually be? I've tried looking at the smarty site with no success?

tia
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote