Smarty iteration: is there a similar function when not in a foreach loop?
- by Kyle Sevenoaks
Hi, I'm trying to add a JS fly to basket plugin to the site I'm working on, but the plugin needs unique productID numbers, is there a way to iterate this in Smarty when not in a foreach loop? Something like: {$smarty.foreach.foo.iteration}
Here's the code I need to itrate:
<span id="slidingProd57404045">
<a href="{link controller=order action=addToCart id=$product.ID returnPath=true}" rel="nofollow" class="addToCart" title="Bestill"
onclick="addToBasket(57404045); return false;" id="fly_to_basket"> </a>
</span>
The 57404045 needs to be iterated.
Thanks.