View Single Post
  #1  
Old 10-30-2012, 02:34 AM
  David-Allan's Avatar 
David-Allan David-Allan is offline
 

eXpert
  
Join Date: Oct 2011
Location: Scotland, UK
Posts: 313
 

Default Extra Fields if statement

Hi guys,

I am trying to stop the display of the contact us pop up on the product page if the extra field "Sample Request" is set to "NO"

Here is what I have done so far but can't get it to work. Can someone have a quick look at my code and see if I am doing something wrong.

Code:
{foreach from=$product.extra_fields item=v} {if $v.field eq "Sample Request" && $v.value ne "NO"} <div class="ask-question"> {include file="customer/buttons/button.tpl" button_title=$lng.lbl_ask_question_about_product style="link" href="javascript: return !popupOpen(xcart_web_dir + '/popup_ask.php?productid=`$product.productid`')"} </div> <div class="clearing"></div> </li> {/if} {/foreach}

I have inserted this in product_details.tpl but its not showing the ask question part no matter what the "Sample Request" is set to.

any one got any ideas?
__________________
Live Version : 4.5.2
Licensed Products:
X-Cart Gold
Ability Theme
CDSEO
xCMS
Abandoned Cart
Food Packaging Scotland
Reply With Quote