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)
-   -   Getting products.tpl to see ExtraFields? (https://forum.x-cart.com/showthread.php?t=34945)

gkeraunen 10-26-2007 04:54 PM

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 *}


balinor 10-27-2007 03:44 AM

Re: Getting products.tpl to see ExtraFields?
 
http://forum.x-cart.com/showthread.php?t=9540

gkeraunen 10-30-2007 08:45 AM

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


All times are GMT -8. The time now is 04:34 AM.

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