downloadMagento allows you to add more than one related or associated products to make a group of products that can be sold as one. In this grouped product type out of the box Magento lets you add simple and virtual products to the group and not any other type of product. Here I am going to show you a technique that will allow inclusion of downloadable products in a group along with simple and virtual products.

There are only two simple steps:

  1. Tell Magento you want to add downloadable products to group
  2. Make the downloadable product compatible to be shown in a group
Override the config.xml file of core catalog module

First of all you need to tell Magento what you want. You want to add downloadable products to your group products. So we’re going to override the core config.xml file of Magneto catalog module. The config file is located here:

1
magento / app / code  / core / Mage / Catalog / etc /

Now, around line 480 you will see a code that configures which types of products can be added in grouped products. Right now you can see there are only two products provided, simple and virtual. Here’s that code:

1
2
3
4
5
6
7
8
9
10
11
12
<grouped translate="label" module="catalog">
<label>Grouped Product</label>
<model>catalog/product_type_grouped</model>
<price_model>catalog/product_type_grouped_price</price_model>
<composite>1</composite>
<allow_product_types>
<simple/>
<virtual/>
</allow_product_types>
<index_priority>50</index_priority>
<price_indexer>catalog/product_indexer_price_grouped</price_indexer>
</grouped>

But instead of changing the core file we are going to override this particular block in our local.xml file. In the local.xml add the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<config>
<global>
<catalog>
<product>
<type>
<grouped translate="label" module="catalog">
<label>Grouped Product</label>
<model>catalog/product_type_grouped</model>
<price_model>catalog/product_type_grouped_price</price_model>
<composite>1</composite>
<allow_product_types>
<simple/>
<virtual/>
<downloadable/>
</allow_product_types>
<index_priority>50</index_priority>
<price_indexer>catalog/product_indexer_price_grouped</price_indexer>
</grouped>
</type>
</product>
</catalog>
</global>
</config>

The first step is done. Now for the second step go to your Magento admin and navigate to the downloadable product that you want to add to a group product and open up its edit page.The last tab of the page “Downloadable Information” has a field called “Links can be purchased separately”. Select NO for that. Save the product.

When you are looking at a list of products that can be added in a group, along with all the simple and virtual products of your store you’ll be able to see the recently edited downloadable product.

If you have any questions please ask them in comment section.

GD Star Rating
loading...

Leave a comment





Last Tweet

  • "Upgrade your magento store to Magento 1.7 http://t.co/dfRDNz4E"
  • " Indieswebs Magento Blog talks about learning, relearning and unlearning coding , designing and development of magento stores one blog at a time. "