View Single Post
  #4  
Old 07-28-2009, 03:43 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: testing for registered or anonymous user

I do such a test on order_invoice.tpl (for BCSE reward points - display points only for registered customers):

Code:
{if $order.login|strpos:'customer-'===0} code for anon customers {else} code for registered customers {/if}

NOTE: I call my anon customers, "customer", as set in config.php -- if you call them "anonymous", then change

strpos:'customer-'

to strpos:'anonymous-'

I also have a 4 digit order number (for now). Hopefully, it will exceed 4 digits some day, and I will have to adjust this code. That's about $11,000,000 of orders from now.

Hope this works for you.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote