5

Does anyone know any technical reasons as why bundle products with dynamic pricing cannot have custom options?

4

It seems like this is a limitation with Magento.

There is a discussion on their forum visible over here:

Custom Options on a Bundle Product

The solution is:

As a quick solution to add Custom Options to bundled products with dynamic prices you may try to tweak prepareProductSave method in app/code/core/Mage/Bundle/Model/Observer.php, namely just comment some code out as follows:

/*
    if ($product->getPriceType() == '0' && !$product->getOptionsReadonly()) {
        $product->setCanSaveCustomOptions(true);
        if ($customOptions = $product->getProductOptions()) {
            foreach (array_keys($customOptions) as $key) {
                $customOptions[$key]['is_delete'] = 1;
            }
            $product->setProductOptions($customOptions);
        }
    }
*/ 

To get rid of “Bundle with dynamic pricing cannot include custom defined options. Options will not be saved.” message you should hack app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml template

//show error message
/*
if ($('price_type')) {
if ($('price_type').value == '0' && $('dynamic-price-warrning')) {
    $('dynamic-price-warrning').show();
}
}
*/ 

Obviously this should only be done via local override (i.e do NOT mess with the core files as they mention) to preserve upgradeability

| improve this answer | |
  • This post is about simple product with custom options as a part of bundle product :(. It is not what i need – Sergey Tsekhanovich Apr 9 '14 at 9:47
  • @SergeyTsekhanovich did u got solution ? – mdeveloper Mar 15 '16 at 13:16
0

I tried to comment the file as indicated but in the backend in the Bundle (Bundle Items) tab typing a code of a simple product with options does not come out no result ("no product"). Also, by adding a product with custom options from Database, the product is added to the Bundle but without the options! How can you view them and be able to select them?

Thanks so much

| improve this answer | |

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.