X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   extra fields, assigning a variable, using more than one extra field (https://forum.x-cart.com/showthread.php?t=46059)

gb2world 03-08-2009 08:30 PM

Re: extra fields, assigning a variable, using more than one extra field
 
Phil's Shadowbox mod is great for displaying detailed images & video. The only thing that takes me back to using extra fields for some applications is the fact that updating the extra fields is already built into the XCART import/export functionality. (I have not had time to see what it would take to update the import/export code to add a few fields.)

clik 04-06-2009 06:00 PM

Re: extra fields, assigning a variable, using more than one extra field
 
Hi,
I was trying in different ways to implement your idea of taking a certain extra field's value and inserting where you wish to. It didn't work for me. Can you tell me where I'm wrong:

skin1/modules/Extra_Fields/product.tpl

Code:

{foreach from=$extra_fields item=v}
  {if $v.active eq "Y" && $v.field_value}
    <tr>
            <td class="property-name">{$v.field}</td>
            <td class="property-value">{$v.field_value}</td>
    </tr>
  {/if}
{/foreach}

{section name=field loop=$extra_fields}
{if $extra_fields[field].field eq "promo_link"}
 {if $extra_fields[field].field_value ne ""}
  {assign var="promo_link" value=$extra_fields[field].field_value}
<tr><td colspan="2">
  <a href="{$promo_link}" class="ButtonOrange">Print Special Coupon</a>
</td></tr>
 {/if}
{/if}
{/section}


I have other three Extra Fields marked as "show" and one is not marked as "show" (promo_link) so I need to show the three extra field's values normally and the promo_link as a code in <a> tag. Is it possible? :roll:

I would appreciate your help, thank you!
clik


All times are GMT -8. The time now is 09:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.