1

I'm using Magento 1.4.1.1.

I'm wondering whether there is an easy way to display product images from a bundle product ?

(I'm quite new in Magento, don't hesitate to provide code snippets and tutorial links)

Thank you !

2
  • you cannot just upload a image for the bundled product in the backend? Or do you want to show the images from the underlaying products? It's a bit unclear
    – Jeroen
    Mar 23 '15 at 20:59
  • When you make a bundle product, customers could choose product options using select oder check boxes. There is no way could see images of product option. I'm trying to associate every selected option to an image.
    – jolyqr
    Mar 24 '15 at 9:55
3

Adding selected image overview could be done by adding the following

<img id="<?php echo "bund" ;?>" src="<?php echo $adresse ;?>" />

in the file template/bundle/catalog/product/view/type/bundle/option/select.phtml". Like that.

...
<select onchange="bundle.changeSelection(this)" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select">
            <option value=""><?php echo $this->__('Choose a selection...') ?></option>
            <?php foreach($_selections as $_selection): ?>
                <option value="<?php echo $_selection->getSelectionId() ?>"<?php echo ($_selection->getIsDefault() && $_selection->isSaleable())?' selected="selected" ':'' ?><?php echo !$_selection->isSaleable()?' disabled="disabled" ':'' ?>><?php echo $this->getSelectionTitlePrice($_selection, false) ?></option>
                <?php $adresse=$this->helper("catalog/image")->init($_selection, "small_image")->resize(50,50);?>
            <?php endforeach;?>
</select>
<img id="<?php echo "bund" ;?>" src="<?php echo $adresse ;?>" />
...

Fill free to update the code snippets to your will.

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.