Does anyone know any technical reasons as why bundle products with dynamic pricing cannot have custom options?
Magento – Bundle product with custom options
bundle-productcustom-options
Related Solutions
This is just my opinion, so don't shoot if you don't like it.
I would use configurable products if the only configurable attribute is 'color'.
Pro
Using configurable products you take advantage of what Magento offers. Each product has it's own SKU, you can set out of stock only a few combinations, you can even make (custom) reports of how many red shirts you sold, and the list can go on.
Con
I know it can be a pain to manage them...but I assume you are not going to manage 1k products (* configurations) each day.
I would not take the custom options approach.
Pro
Maybe this has an advantage, because It can be easier to manage. You can even create an observer that will add the custom options on save so you won't have to add them manually. (here is how)
Conn
You cannot set a combination out of stock.
Red for one product and Red for an other mean 2 different things.
I may take the bundle products approach by making each color a separate product, not visible individually.
Pro
Can make an observer to add them on save so you don't have to add manually (I don't have a link for that).
Can manage prices for different combinations easier than for the configurable products.
Conn
Cannot make a combination out of stock unless all "red" combinations become out of stock.
This is what I got so far. I will add more as soon as I remember.
Try this code:
First you need to override below file.
After that you can get bundle option images from below code.
app/design/frontend/Vendor/Theme_Name/Magento_Bundle/templates/catalog/product/view/type/bundle/option/radio.phtml
<?php foreach ($_selections as $_selection): ?>
<?php
$_imageHelper = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Catalog\Helper\Image');
$image = $_imageHelper->init($_selection, 'small_image', ['type' => 'small_image'])->keepAspectRatio(true)->resize('50', '50')->getUrl(); ?>
<label class="label"
for="bundle-option-<?= /* @escapeNotVerified */ $_option->getId() ?>-<?= /* @escapeNotVerified */ $_selection->getSelectionId() ?>">
<div class="bundle-option-image"><img src="<?php echo $image; ?>" /></div>
</label>
<?php endforeach; ?>
Hope this will works for you.
Best Answer
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:
Obviously this should only be done via local override (i.e do NOT mess with the core files as they mention) to preserve upgradeability