View Single Post
  #1  
Old 06-14-2008, 06:34 AM
 
carlynleigh carlynleigh is offline
 

Newbie
  
Join Date: Jun 2008
Posts: 3
 

Default Smarty: IF statement and "productid" variable

I'm trying to modify products.tpl to make it so that if one specific product number is being shown, then the "Add to cart" link acts differently.

Does anyone know the code I can use to create an IF statement to specify my specific product?

This is what I'm trying so far. The result is that my special code intended for only one product is actually displaying for all products.

Code:
<td> {if $productid = "16134"} {include file="buttons/add_to_cart.tpl" style="button" href="http://www.myURL.com"} {else} {include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"} {/if} </td>

I've also tried these (with no success):
{if $productid=16134}
{if $productid eq "16134"}

Am I using the right variable? Syntax?

Thanks!
__________________
v4.1.10
Reply With Quote