cancel
Showing results for 
Search instead for 
Did you mean: 

Products with required option not showing in Bundle Selection

Products with required option not showing in Bundle Selection

I can see any product with required options isn't showing in the bundle product selection. Does anyone else face this issue? When I set required_option = 0 in the table catalog_product_entity it starts showing in the backend and frontend.
I'm not sure if this is a bug or Magento default behavior, can anyone help on this, I managed to remove this required check from the admin collection and it started displaying that product in the grid. But this isn't working for the frontend.

I have checked on Magento Version 3.2 and 3.5

2 REPLIES 2

Re: Products with required option not showing in Bundle Selection

Hi @SoorajMalhi 

 

This is a database error caused by a cron job running and then not completing properly.
Please check cron job of server.
Kindly refer below link for cron tabs and set cron jogs with serveR:
https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html 

 

It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Products with required option not showing in Bundle Selection

Hi @Bhanu Periwal are you sure it is a database error? Cron is working fine and I don't see any issue with the Cron. But when looking into the bundle selection code, I found that ->addFilterByRequiredOptions() check was applied which is forcefully filtering products where required_option and has_option is set to no. I have removed this check and now the products with the required option are showing in the selection in the admin and I can also see the selection on the fronted now but their options aren't visible. 

 

getSelectionsCollection filter is also applied in getSelectionsCollection fucntion of Magento\Bundle\Model\Product\Type but still the options aren't loading on the frontend.

When I set required_option to no, the below template loads for the two times and displays all the bundle options. But when I set required_option to yes it loads only once and missed the selection with the required option.

 

Magento_Bundle/templates/catalog/product/view/type/bundle/option/radio.phtml

 

Can someone add reference,e how these options are rendered?

 

Thank You