<?php
namespace MNM\Spitzner\Plugin;

class GroupedProductsGetAssociatedProductsCollection
{
    /**
     * @param \Magento\GroupedProduct\Model\Product\Type\Grouped $subject
     * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $result
     * @return string
     */
    public function aftergetAssociatedProductCollection(\Magento\GroupedProduct\Model\Product\Type\Grouped $subject,
                                                        \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection $result)
    {
        $result->addAttributeToSelect(['spi_inhalt', 'spi_normalized_volume', 'spi_normalized_price', 'spi_aponow_pzn', 'spi_aponow_link']);

        return $result;
    }
}