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

Getting products.tpl to see ExtraFields?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-26-2007, 04:54 PM
 
gkeraunen gkeraunen is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 37
 

Default Getting products.tpl to see ExtraFields?

I'm trying to set up some conditional logic in products.tpl that reads the some Extra_Fields for each product. The loop works just fine in product.tpl, but not in products.tpl. Can you spot my error? Or is it about placement and scope?

As usual, when I get this working, I'll post the mod. Thanks. -Michael

Code:
{* begin Michael Modification to include Drop Ship products in X-Cart October 26 2007 *} start_if {if $active_modules.Extra_Fields ne ""} {include file="modules/Extra_Fields/product.tpl"} {section name=field loop=$extra_fields} {if $extra_fields[field].field eq 'DropShipMessage'} {if $extra_fields[field].field_value ne ''} {assign var=drop_ship_message value=`$extra_fields[field].field_value`} {/if} {/if} {if $extra_fields[field].field eq 'AllowDropShip'} {if $extra_fields[field].field_value eq "Y"} {assign var=allow_drop_ship value=`$extra_fields[field].field_value`}{/if} {/if} {/section} {/if} {* end Michael's Modification to include Drop Ship products in X-Cart October 26 2007 *}
__________________
X-Cart 4.1.9
PHP 4.4.1
MySQL 4.0.27
Linux
Apache
Reply With Quote
  #2  
Old 10-27-2007, 03:44 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Getting products.tpl to see ExtraFields?

http://forum.x-cart.com/showthread.php?t=9540
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-30-2007, 08:45 AM
 
gkeraunen gkeraunen is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 37
 

Default Re: Getting products.tpl to see ExtraFields?

Well, following the mods in that thread did the trick. Thanks. With that and some new {if} statements in products.tpl, I can trigger a drop ship statement and buy-now button appearance based on extra fields and inventory. Sweet!

-Michael
__________________
X-Cart 4.1.9
PHP 4.4.1
MySQL 4.0.27
Linux
Apache
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:48 PM.

   

 
X-Cart forums © 2001-2020