Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

extra fields, assigning a variable, using more than one extra field

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 03-08-2009, 08:30 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

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

Default 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.)
__________________
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
  #12  
Old 04-06-2009, 06:00 PM
  clik's Avatar 
clik clik is offline
 

Advanced Member
  
Join Date: Mar 2006
Location: Canada
Posts: 30
 

Question 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?

I would appreciate your help, thank you!
clik
__________________
__________________
XC5: 5.3.4.4
PHP: 7.0.26
MySQL server: 5.5.56-MariaDB
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:58 AM.

   

 
X-Cart forums © 2001-2020