2

When working with a grouped product on Magento (such as a furniture set), very little info is displayed by default about its simple products.

The demo site example doesn't appear to allow the user to explore any detail of the simples' dimensions or other attributes. All it shows are the names and prices.

Are there any template methods available on a grouped product page to display more detailed data about its component simple products? Things like short descriptions, thumbnails, URLs to simple product view (if active), etc.

2 Answers 2

5

In catalog/product/view/type/grouped.phtml you can find a table #super-product-table that contains the basic information you mentioned for associated products. To add a short description (for example) you should add something like this inside the body of the table, in other words inside foreach ($_associatedProducts as $_item) loop:

<?php echo $this->htmlEscape($_item->getShortDescription()) ?>
3

Let's say in catalog/product/view.phtml you can do something like this:

if($_product->isGrouped()) {
    $_associatedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product);
    foreach($_associatedProducts as $_associatedProduct) {
        if($_description = $_associatedProduct->getShortDescription()) {
            echo $this->helper('catalog/output')->productAttribute($_associatedProduct, $_description, 'short_description');
        }
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.