문제

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.

도움이 되었습니까?

해결책

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()) ?>

다른 팁

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');
        }
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top