I have a store where-by I create a Grouped Product and associate a number of Simple Products. When I add custom options to the simple products it is not visible in the Grouped Products' Associated Products Grid neither the Front-End.

However I have implemented a local, custom module to amend this behaviour, but what I would like to know is:

  • What are the reasons for this behaviour in Magento?
  • Is my module a good/bad idea?






class Vendor_Catalog_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Group
    extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group
    protected function _prepareCollection()
        $allowProductTypes = array();
        $allowProductTypeNodes = Mage::getConfig()
        foreach ($allowProductTypeNodes as $type) {
            $allowProductTypes[] = $type->getName();

        $collection = Mage::getModel('catalog/product_link')->useGroupedLinks()
            #->addFilterByRequiredOptions() # removed this
            ->addAttributeToFilter('type_id', $allowProductTypes);

        if ($this->getIsReadonly() === true) {
            $collection->addFieldToFilter('entity_id', array('in' => $this->_getSelectedProducts()));

        $parent = get_parent_class(get_parent_class($this));
        return $parent::_prepareCollection();



class Vendor_Catalog_Model_Product_Type_Grouped
    extends Mage_Catalog_Model_Product_Type_Grouped
    public function getAssociatedProducts($product = null)
        if (! $this->getProduct($product)->hasData($this->_keyAssociatedProducts)) {
            $associatedProducts = array();

            if (! Mage::app()->getStore()->isAdmin()) {

            $collection = $this->getAssociatedProductCollection($product)
                #->addFilterByRequiredOptions() # removed this
                ->addAttributeToFilter('status', array('in' => $this->getStatusFilters($product)));

            foreach ($collection as $item) {
                $associatedProducts[] = $item;

            $this->getProduct($product)->setData($this->_keyAssociatedProducts, $associatedProducts);
        return $this->getProduct($product)->getData($this->_keyAssociatedProducts);

1 Answer 1


In this article is described how to associate simple products(containing custom options) with group product.

So if you wish to have simple products with custom options listed, be sure you don’t set any of the custom options to be required.

I hope this will solve your problem.

  • Then i'm confused because addFilterByRequiredOptions() adds the following query into the collection for associated products ((e.required != '1') OR (e.required IS NULL)) which compensates for both required and not required, thus the article above is not accurate? Also if you look at the last comments in that article (from 2014) this suggest it's a solution to a version prior to 1.8.
    – Ash
    Jan 24, 2014 at 17:50
  • Did you try? I just tried it on magento version and it works. Jan 24, 2014 at 19:20
  • Then it must have been a recent change in, and yes when I set custom options on a simple product and they were not required they were omitted from the grouped products associated products (as I have stated above). In my question you can see the example code is a direct copy of the core code with one line commented out.
    – Ash
    Jan 25, 2014 at 20:03
  • If you have developer mode turned on you will run into warnings when doing this. Bug? Feature? I'm not sure anyone knows. Either way, it's asking for trouble.
    – pspahn
    Oct 30, 2014 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.