I am encountering some odd behavior with Smarty but I believe solution is fairly simple. I am admittedly not an expert w/ Smarty but I still find this rather strange.
Some background, $PF_SHOP_CART_GIFTS
is an integer, either 0 if no gifts are in cart or a positive number if gifts do exist in the cart.
I have a section loop defined as the following:
{if $PF_SHOP_CART_GIFTS}
<input type="text" name="iGifts" value="{$PF_SHOP_CART_GIFTS}" />
{section name="gift_memberships" loop=$PF_SHOP_CART_GIFTS}
// A bunch of stuff happens here but it isn't related to my question
{/section}
{/if}
The problem is that the value of the input field "iGifts" always ends up being NULL (value="" when I view source) which is weird because if I just output the smarty variable:
{$PF_SHOP_CART_GIFTS}
I see the correct integer value that it is set to. Is there something that prevents me from using smarty variables in the context of input field values?