I have a collection, which contains only one product. How I can get this product without using a "foreach' cycle?
+2
A:
Use $collection->getFirstItem()
to retrieve the first item from a collection.
Joseph Mastey
2010-09-10 16:21:01
Thank you very much. It's so simply really :)
Victor Burre
2010-09-12 21:48:23