Magento2: Bundle products being added as upsells but not being shown in admin panel.

Created on 15 Jul 2016  路  13Comments  路  Source: magento/magento2

Steps to reproduce

  1. Make bundle product and add options to it.
  2. If I understand correctly the bundle product is being added as upsell by Magento\Bundle\Observer\AppendUpsellProductsObserver (? correct me if I'm mistaken)
  3. check the simple products page and go to advanced settings -> upsells

    Expected result

  4. All the upsells are being shown in advanced settings -> upsells

  5. I could edit/delete these upsells in advanced settings -> upsells

    Actual result

  6. The upsells grid is empty

  7. Only way I know I have upsells is when I go to the simple product set as option page is that I can see the bundle product in "We found other products you might like!" box (frontend)
Catalog Confirmed Format is not valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x bug report triage wanted

Most helpful comment

I found out, that this is not a bug, it's a magento feature.

Magentos bundle module has an observer (frontend/events.xml) who listenes to the event called 'catalog_product_upsell'. See here:

<event name="catalog_product_upsell"> <observer name="bundle_observer" instance="Magento\Bundle\Observer\AppendUpsellProductsObserver"/> </event>

The observer (magento/module-bundle/Observer/AppendUpsellProductsObserver.php) loads all bundles, the product is applied to, and adds these bundles to the collection of upselling products.

To disable this feature, just disable the observer in the xml.

Greetings,
Christoph

All 13 comments

@ErikPel can you provide version information for where this issue was observed? Was this a clean install or an upgrade to latest version?

2.0.6

I think it's upgraded from 2.0.2

Any update on this issue? I'm seeing this as well.

@antboiko can you have the team check into this one?

I am on EE 2.0.7 for the record.

I am seeing this as well

@ErikPel, thank you for your report.
We've created internal ticket(s) MAGETWO-82987 to track progress on the issue.

Hi @ErikPel

This ticket has been marked as "Triage Wanted" due to low user involvement over time. Over the next 2 weeks we are looking for additional community feedback to decide if it should be archived or not. More information on this is available on the GitHub wiki.

Thank you for collaboration.

@ErikPel, thank you for your report.

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

You may learn more about this initiative following this link.

Please feel free to comment or reopen the ticket if you think it should be reviewed once more. Thank you for collaboration.

I found out, that this is not a bug, it's a magento feature.

Magentos bundle module has an observer (frontend/events.xml) who listenes to the event called 'catalog_product_upsell'. See here:

<event name="catalog_product_upsell"> <observer name="bundle_observer" instance="Magento\Bundle\Observer\AppendUpsellProductsObserver"/> </event>

The observer (magento/module-bundle/Observer/AppendUpsellProductsObserver.php) loads all bundles, the product is applied to, and adds these bundles to the collection of upselling products.

To disable this feature, just disable the observer in the xml.

Greetings,
Christoph

Thanks, @Neusta-Hartwig. Your solution works as expected!

catalog_product_upsell

How do I do it without editing the core file?
I know I could do this in my module:

    <event name="catalog_product_upsell">
        <observer name="bundle_observer" disabled="true"/>
    </event>

But I see there is another observer given same name bundle_observer

<event name="catalog_product_upsell">
        <observer name="bundle_observer" instance="Magento\Bundle\Observer\AppendUpsellProductsObserver"/>
    </event>
    <event name="product_option_renderer_init">
        <observer name="bundle_observer" instance="Magento\Bundle\Observer\InitOptionRendererObserver"/>
    </event>

Can anyone confirm disabling as I mentioned above will not break anything else.

@adarshkhatri You do it exactly like that. In your module you just disable the observer for the event you want on your events.xml file.
Observer names are per event definition, so disabling the one for catalog_product_upsell won't affect the one in product_option_renderer_init.
You can read more about it on this section of the docs https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#subscribing-to-events

Was this page helpful?
0 / 5 - 0 ratings