Re: Conditional Test for Text String
Thanks for the clarification on the ellipses. I changed the code but it still doesn't work.
Here is what I have:
{if $sales[sale].name|truncate:5:"":true eq "Buy 3"}
{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}
{elseif $sales}
{else}
{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}
{/if}
I reread the material on smarty.net about truncate and now I see the ... but they sure didn't make a big emphasis of it. Glad you saw that.
Thanks,
Randal
__________________
***********************
Visit Our Other Web Sites!
∙ Nutritional Herbs and Supplements
<a href="http://www.theherbsplace.com"> The Herbs Place </a>
∙ Frugal Ideas and a Forum To Submit Your Questions
<a href="http://www.thefrugallife.com"> The Frugal Life </a>
∙ Healthy and Natural Pet Products
<a href="http://www.healthypetcorner.com"> Healthy Pet Corner </a>
***********************
Joined 08/02/05
X-Cart Gold Version 4.3.2
Linux RedHat Enterprise
|