0

I want to display the shortdescription of simple products within my bundle-products. There already is an answer/question to that here: How to display the image, name and short description for a bundle product items And I do understand the answer theoretically, but I am far off from being able to use it. Maybe someone could guide me a bit on how to do that more in details:

  1. take the product_id of the $_selections,
  2. load the product by this product_id
  3. give the resulting product object to Mage_Catalog_Helper_Product::getImageUrl. (I guess in my case, something like getShortDescription ?)

I guess, I need to start it in the foreach-loop of the select.phtml-file something similar to this:

<?php foreach ($_selections as $_selection): ?>
<p><?php /*Step 1 could be that? */ $this->getProductId() ?></p>
<?php endforeach; ?>

But you see, step 2 is already too complicated too me. Could anybody be that kind to guide me a bit more in details?

Thanks so much.

1

As I understand you have found the file which render options of bundle products:

/app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/*

For example your output type is <select>. In select.phtml inside foreach you can access your properties by the method, which you offered. You don't need to load the product again, because this product is already loaded with necessary short_description. Maybe better create one more foreach at the bottom of the file, where you can output everything you need.

    <!-- Here your existing template code -->

    <?php foreach ($_selections as $_selection): ?>
        <p><?php echo $_selection->getShortDescription(); ?></p>
    <?php endforeach; ?>

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.