View Single Post
  #5  
Old 05-02-2009, 10:01 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: ship by mail icon.. (like the special offer icon) (i can pay for it)

Hi Christopher -

Look at posts #6 & #7 in this thread. Since you can have more than one extra field - they are stored in an array that you have to loop trough to get yours. In the examples - replace "Ingredients" with the name of your field "ship_by_mail".

Quote:
For example, this code in the top of product.tpl makes a bunch of variables, that can be used on product.tpl, and any other templates nested in it:
Code:
{section name=field loop=$extra_fields} {if $extra_fields[field].field eq "ship_by_mail" && $extra_fields[field].field_value ne ""} {assign var="ship_by_mail" value=$extra_fields[field].field_value} {/if} {/section}
You can temporarily print the variable in the template to make sure it is working.
Code:
<b>Ship By Mail:</b> {$ship_by_mail}<br />
If it looks okay - do an if/than based on the variable:
Code:
{if $ship_by_mail "Y"} <img src="{$ImagesDir}/myimage.gif" /> {/if}
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote