View Single Post
  #4  
Old 02-11-2008, 09:46 PM
  DezineJunkie's Avatar 
DezineJunkie DezineJunkie is offline
 

Senior Member
  
Join Date: Jan 2008
Posts: 174
 

Default Re: Smarty help please, "if a string begins with xyz..."?

hey thanks



Quote:
Originally Posted by carpeperdiem
I want to include usernames in the order_invoice.tpl

This thread shows how.

Now, I need to exclude the "anonymous" checkouts, which for my store, all start with "customer".

customer-392
customer-1048
customer-21864

etc...

How do I ask smarty to look for the phrase "customer-XYZ" and if it sees a username that begins with "customer" to let me know...

{if $order.login BEGINS WITH 'customer'}
do this
{/if}

Smarty experts?

Thank you in advance.

Jeremy
__________________
X-CART Pro V.4.3.0
PHP version 5.2.11
MySQL version 5.0.81
Architecture x86_64
Apache version 2.2.14 (Unix)mod_ssl/2.2.14
Operating System: Linux
Dedicated Ip
cPanel Pro 1.0 (RC1)
cPanel Version 11.24.5-RELEASE
Modules: DL Expander, DL Products, One Page Checkout, Dynamic Images,
Multicolumn Recommends, Narrow by Search, Random Products Tabs.
X-AOM, SALES-N-STATS 1.3 , X-Offers-4.1.9, X-Magnifier41x, X-Fancy Categories,
X-RSS Feeds, Static Meta Tags , X-AJAX Rating System v4.1


Reply With Quote