kingmoore Posted September 7, 2006 Share Posted September 7, 2006 From: order-stepone.tpl {if $product.pricing.monthly}<option value="monthly"> {$product.pricing.monthly} </option>{/if} I would like to replace this code with some code that displays the monthly price, and then the default text... so the result would look like this: 15.00/mo - 90 USD Semi Anually etc. I need to be able to parse out the actual $ amount from the smarty variable {$product.pricing.monthly}, so I am breaking into php. The problem is, I can't find a way for PHP to access $product.pricing.monthly. I can access the products array like this: {php}echo $products[0]['pricing']['monthly'];{/php} but in order-stepone.tpl, this is inside of a smarty loop: {foreach key=num item=product from=$products} The $product array is just one product from the $products (PLURAL) array, but I see no way for PHP to know the current index of the smarty array, so I don't know which product from the products array to grab my data from. Any help? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.