![]() |
String formatting in X-Cart/Smarty
I'm trying to reformat a string and then pass it to our shipping companies web site for tracking.
I have done it previously in asp / vb but am new to smarty and am finding the syntax a little hard going. Heres the vb code Code:
ticketnumber = replace (ticketnumber ," ", "") 'remove spaces Can someone give me a "translation" for Smarty ? Seems from (my very limited) expereince I will need to set it up as a plugin and do it under php ??? Thanks |
Re: String formatting in X-Cart/Smarty
use replace and substr
ie: replace:" ":"" substr:8 you can pipe these together as well, ie: {$ticketnumber|replace:" ":""|substr:8} |
Re: String formatting in X-Cart/Smarty
That pointed me in the right direction. all working now.
Thanks :D |
All times are GMT -8. The time now is 06:11 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.