0

I'm trying to see if its possible to create a configurable product with both a virtual and a downloadable product in it. The idea would be if it is a virtual product, I would be adding a link to his Account page with some additional information. If the product is downloadable, the normal process of would happen through the Account page or email.

After toying with the Magento backend, this doesn't seem possible out of the box, but perhaps there is a class I could extend or something without a lot of difficulty?

2

As far as I know, you can add simple, virtual and downloadable products inside a configurable product.

Wait.. you believed me ? If I say "I am the greatest person in the entire world..", will you believe me then ? I guess you will not. Coz in the next momemnt you will reply to me.. "Proove it...if you think so". Okey. That's the point. So I have a responsibility to prove my very first statement :-)

In order to prove it, I want to you look into Mage_Catalog module. This is one of the complex module I have ever seen ! You can find an entire universe in it. Now we just want to look on the very small portion of this giant module.

File : app\code\core\Mage\Catalog\etc\config.xml

<catalog>
        <product>
            <type>
                ....
                <configurable translate="label" module="catalog">
                    <label>Configurable Product</label>
                    <model>catalog/product_type_configurable</model>
                    <price_model>catalog/product_type_configurable_price</price_model>
                    <composite>1</composite>
                    <allow_product_types>
                        <simple/>
                        <virtual/>
                    </allow_product_types>
                    <index_priority>30</index_priority>
                    <price_indexer>catalog/product_indexer_price_configurable</price_indexer>
                </configurable>
                ...
            </type>
        </product>
</catalog>

This section defines product type specific configuration. See the node allow_product_type and inside it you can see that it contains simple and virtual product types. This means magento by default will allow simple and virtual product inside configurable product. Wait you cant find downloadable product inside that list right ? Okey.. before cursing me.. I want you look into downloadable product configuration section (inside Mage_Downloadable module)

File : app\code\core\Mage\Downloadable\etc\config.xml

<catalog>
        <product>
            <type>
                ....
                <configurable>
                    <allow_product_types>
                        <downloadable/>
                    </allow_product_types>
                </configurable>
                ...
            </type>
        </product>
</catalog>

See downloadable products are adding via this configuration file. Though downloadable product is added via different config file, magento is brave enough to trace this out. (It's an another story. I dont want to go into that area).

Now the most important part is, if children product that constitutes configurable product has required_option property set to yes, then it will not allow you to construct configurable product.

I am not going to provide proof for this point. Because I dont know any proof for this point right now. and I dont have time to look for any proof right now. :-) But expert says so...

proof 1 - David Manners, proof 2-sarah,proxiBlue , proof 3 - Rob

Hope that will help

  • The FULL correct answer is to ensure required_fields is NEVER set to true, which it is by default. This answer is which is found in the "proof 2" link you provide. – Thomas Bennett Jan 22 '15 at 2:55
  • 1
    he he... now you will believe me even if I didnt provide any proof... its called TRUST :-) congratulation – Rajeev K Tomy Jan 22 '15 at 3:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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