Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

substr help

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-16-2007, 10:55 AM
  hrothbeorht's Avatar 
hrothbeorht hrothbeorht is offline
 

Senior Member
  
Join Date: May 2007
Posts: 156
 

Default substr help

Hey there,

I need to take a chunk out of this:
{$product.tmbn_url}

diaplays as: http://www.thewebbbsite.ca/shop/images/P/fl_00001.swf
I need: fl_00001

substr('{$product.tmbn_url}', 41, -4)

I figure it might look something like this?
I've been trying lots of stuff and I can't seem to work this out..

?? help ~!

-hroth
__________________
x-cart- 4.1.10
www.boutiquefinn.ca
Reply With Quote
  #2  
Old 07-16-2007, 02:22 PM
 
nevets1219 nevets1219 is offline
 

eXpert
  
Join Date: Jun 2006
Posts: 351
 

Default Re: substr help

Are you in a TPL or a PHP file? It looks like you are trying to call PHP functions from TPL (Smarty). If that's the case, you need to do something like:
Code:
{$foo|substr:0:3}
Source. You might have to code it to handle both HTTPS and HTTP and non-WWW with WWW in case those scenarios ever come up for you.
__________________
4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:07 AM.

   

 
X-Cart forums © 2001-2020