I am trying to display only the first product of a page on one page. When
only one product is assigned to the page, it works, but when more than one
product is assigned, I appear to get an infinite loop of tab characters.
Here is the code where the products are looped:
[-- VAR.usedFeaturedProduct false --]
[-- LOOP PRODUCTS --]
[-- IF VAR.usedFeaturedProduct false --]
[-- PRODUCT ballfour_featureditem_template --]
[-- VAR.usedFeaturedProduct true --]
[-- END_IF --]
[-- END_LOOP PRODUCTS --]
As mentioned, I'm only trying to have the first product appear in this area
(and the others appear later on in the page). I was assuming that this code
would set the usedFeaturedProduct variable to a value outside of the IF
statement after the first loop and therefore no more products would be
output.
When I comment out this entire block, the page functions as expected...no
products show up. When I only use one product on this page, again, it
functions as expected; displaying that product. It's only when I have more
than one product where the infinite loop occurs.
Is there a better way to do this?
I basically need to have one area showing the first product, and later on I
need an area that shows up to four products (products 2-5).
Thank you,
Matt