Added group by p.products_id statement to mysql query so all items with the same product id will be grouped together (fix for stores with many product attributes).

More...