Magento – How to add a “Downloadable Product” to a Bundle

bundled-productdownloadablemagento-1

The company I'm working for has asked me to help them with implementing eBooks into their e-commerce website. I have read on the Magento forums that you can add a line to the config for bundles, and that worked on one of my servers, but none of my other servers. We are looking to provide Bundles to our customers if they want to buy both the printed book, as well as the eBook, and provide that bundle at a slight discount from the regular price of both products. Any help to solve the issue would be appreciated.

Setup for company testing server #1 and #2:
OS: CentOS 6
Magento Version: 1.7.0.2

Setup for company production server:
OS: CentOS 6
Magento Version: 1.7.0.2

Setup for personal "play" server:
OS: Ubuntu 13.10
Magento Version: 1.8.0.0

EDIT: In the app\code\core\Mage\Downloadable\etc\config.xml (Which I overrode in the proper way with app\code\local) You can add <downloadable/> as a key under bundle/allowed_selection_types
This worked for one of my testing servers — allowing me to add a downloadable product to a bundle, but the other servers will not let me do the same.

Any help to accomplish the goal of adding a download to a bundle on multiple systems and occasions will be greatly appreciated.

EDIT 2: Adding Downloadable Products to Grouped Products or Bundled Products This provided information relevant to this problem/issue, but has not helped solve it.

EDIT 3: Now I cannot add a download to a bundle on any server I have access to.

Best Answer

You cannot override XML files in app/code/local, only PHP classes that are loaded by the Magento autoloader (nor is it the "proper way" to override classes there, if you can use a rewrite instead).

What you should do instead, is create an own module with two files

  • app/etc/modules/Your_DownloadableBundle.xml
  • app/code/local/Your/DownloadableBundle/etc/config.xml

Since configuration files are merged, you only need to add the node bundle/allowed_selection_types/downloadable in this config.xml.

Related Topic