1
votes

When building a new grouped product using already created and in stock simple products the finished grouped product not show the table listing the product titles and prices on the right side column when using my custom template.

When the custom template is turned off and the default Magento template is in use the template displays the titles and prices correctly. There is an issue with the grouped product template code that is preventing this portion of information from being displayed but the code of /app/design/frontend/mytemplate/default/template/catalog/product/view/type/grouped.phtml is the same as the default template of Magento.

Any one know how to resolve this?

2

2 Answers

0
votes

It's hard to tell, but perhaps the template file isn't used. You could check if the layout file in your template has a block that refers to grouped.phtml in the PRODUCT_TYPE_grouped node. Also check if the view.phtml makes a call like

<?php echo $this->getChildHtml('product_type_data') ?>

to refer to the block.

Compare your template files to:

  • app\design\frontend\base\default\template\catalog\product\view.phtml
  • app\design\frontend\base\default\layout\catalog.xml

to see what I mean.

0
votes
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>

    <?php echo $this->getBlockHtml('formkey'); ?>
    <div class="no-display">
        <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
        <input type="hidden" name="related_product" id="related-products-field" value="" />
    </div>

    <?php
        //Product collaterals
        $section = array();

        //Related products. $section['related'] is set only if related products (or replacement) exist
        $replaceRelated = $theme->getCfg('product_page/replace_related');
        if ($replaceRelated == 1) //don't replace with static block
        {
            if ($tmpHtml = trim($this->getChildHtml('catalog.product.related')))
                $section['related'] = $tmpHtml;
            //$section['related'] = trim($this->getChildHtml('catalog.product.related'));
        }
        elseif ($replaceRelated == 2) //if related is empty, replace with static block
        {
            if ($tmpHtml = trim($this->getChildHtml('catalog.product.related')))
                $section['related'] = $tmpHtml;
            else //related empty
                if ($tmpHtml = $this->getChildHtml('block_product_replace_related'))
                    $section['related'] = '<div class="block_product_replace_related">'. $tmpHtml .'</div>';
        }
        elseif ($replaceRelated == 3) //replace with static block
        {
            if ($tmpHtml = $this->getChildHtml('block_product_replace_related'))
                $section['related'] = '<div class="block_product_replace_related">'. $tmpHtml .'</div>';
        }

        //Up-sell products. $section['upsell'] is set only if up-sell products (or replacement) exist
        $replaceUpsell = $theme->getCfg('product_page/replace_upsell');
        if ($replaceUpsell == 1) //don't replace with static block
        {
            if ($tmpHtml = trim($this->getChildHtml('upsell_products')))
                $section['upsell'] = $tmpHtml;
            //$section['upsell'] = $this->getChildHtml('upsell_products');
        }
        elseif ($replaceUpsell == 2) //if upsell is empty, replace with static block
        {
            if ($tmpHtml = trim($this->getChildHtml('upsell_products')))
                $section['upsell'] = $tmpHtml;
            else //upsell empty
                if ($tmpHtml = $this->getChildHtml('block_product_replace_upsell'))
                    $section['upsell'] = '<div class="block_product_replace_upsell">'. $tmpHtml .'</div>';
        }
        elseif ($replaceUpsell == 3) //replace with static block
        {
            if ($tmpHtml = $this->getChildHtml('block_product_replace_upsell'))
                $section['upsell'] = '<div class="block_product_replace_upsell">'. $tmpHtml .'</div>';
        }



        //Assign related products to selected position
        if (isset($section['related']))
        {
            $relatedPosition = $theme->getCfg('product_page/related_position');
            //TODO:remove: $relatedPosition = 11;
            switch ($relatedPosition)
            {
                case 10:
                    $p['secondaryCol'][0] = $section['related'];
                    break;
                case 11:
                    $p['secondaryCol'][1] = $section['related'];
                    break;
                case 20:
                    $p['collatSecondaryCol'] = $section['related'];
                    break;
            }
        }



        //Width (in grid units) of product page sections
        $imgColUnits                    = $theme->getCfg('product_page/image_column');
        $primaryColUnits                = $theme->getCfg('product_page/primary_column');
        $secondaryColUnits              = $theme->getCfg('product_page/secondary_column');
        $container2ColUnits             = $imgColUnits + $primaryColUnits;
        $collatPrimaryColUnits          = $imgColUnits + $primaryColUnits;
        $collatSecondaryColUnits        = $secondaryColUnits;

        //If no secondary column
        if (empty($secondaryColUnits))
        {
            $primaryColUnits            += 12 - ($imgColUnits + $primaryColUnits);
            $container2ColUnits         = $imgColUnits + $primaryColUnits;
            $collatPrimaryColUnits      = 9;
            $collatSecondaryColUnits    = 3;
        }

        //If no related products, stretch collateral primary column
        if (!isset($section['related']))
        {
            $container2ColUnits         = 12;
            $collatPrimaryColUnits      = 12;
            $collatSecondaryColUnits    = 0;
        }
        elseif (!isset($p['secondaryCol']))
        {
            $container2ColUnits         = 12;
        }

        //Grid classes
        $imgColGridClass                = 'grid12-' . $imgColUnits;
        $primaryColGridClass            = 'grid12-' . $primaryColUnits;
        $secondaryColGridClass          = 'grid12-' . $secondaryColUnits;
        $container2ColGridClass         = 'grid12-' . $container2ColUnits;
        $collatPrimaryColGridClass      = 'grid12-' . $collatPrimaryColUnits;
        $collatSecondaryColGridClass    = 'grid12-' . $collatSecondaryColUnits;
        if (empty($secondaryColUnits))
        {
            $secondaryColGridClass  = '';
        }
    ?>

    <div class="product-img-column <?php echo $imgColGridClass; ?>">
        <?php echo $this->getChildHtml('media') ?>
        <?php //Product labels
            echo $this->helper('ultimo/labels')->getLabels($_product);
        ?>
    </div>

    <div class="product-shop <?php echo $primaryColGridClass; ?>">

        <div class="product-name">
            <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
        </div>

        <?php echo $this->getReviewsSummaryHtml($_product, false, true); //reviews ?>

        <?php if ($_product->getShortDescription()): ?>
            <div class="short-description">
                <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
            </div>
        <?php endif;?>

        <?php if ($theme->getCfg('product_page/sku')): ?>
            <div class="sku"><span><?php echo $this->__('SKU'); ?>: </span><?php echo $_product->getSku(); ?></div>
        <?php endif; ?>



        <?php if ($extrahint_html = $this->getChildHtml('extrahint')): //qty increments ?>
            <div class="extrahint-wrapper"><?php echo $extrahint_html; ?></div>
        <?php endif; ?>

        <div class="product-type-data<?php echo $productTypeClasses; ?>"><?php echo $this->getChildHtml('product_type_data'); ?></div>

        <?php echo $this->getTierPriceHtml(); //tier prices ?>

        <?php if (!$this->hasOptions()): //add to cart when no options ?>
            <?php if($_product->isSaleable()): ?>
                <div class="add-to-box">
                    <?php echo $this->getChildHtml('addtocart') ?>
                </div>
            <?php endif; ?>
            <?php echo $this->getChildHtml('extra_buttons') ?>
        <?php endif; ?>

        <?php if ($_product->isSaleable() && $this->hasOptions()): ?>
            <?php if ($container1_html = $this->getChildChildHtml('container1', '', true, true)): ?>
                <div class="container1-wrapper"><?php echo $container1_html; ?></div>
            <?php endif; ?>
        <?php endif;?>

        <?php if ($addtoLinksHtml = $this->getChildHtml('addto')): //compare, wishlist, to friend ?>
            <div class="action-box clearer">
                <?php echo $addtoLinksHtml; ?>
            </div>
        <?php endif; ?>
        <?php echo $this->getChildHtml('alert_urls'); //alerts ?>
        <?php echo $this->getChildHtml('other'); ?>

        <?php if ($tmpHtml = $this->getChildHtml('block_product_primary_bottom')): ?>
            <div class="feature-wrapper top-border block_product_primary_bottom"><?php echo $tmpHtml; ?></div>
        <?php endif; ?>

        <?php if ($tmpHtml = $this->getChildHtml('product_primary_bottom_placeholder')): //Placeholder for extensions ?>
            <div class="feature-wrapper top-border"><?php echo $tmpHtml; ?></div>
        <?php endif; ?>

    </div> <!-- end: product-shop -->

    <?php if ($secondaryColUnits): //(!empty($secondaryColUnits)): ?>
        <div class="product-secondary-column <?php echo $secondaryColGridClass; ?> custom-sidebar-right">
            <div class="inner">

                <?php //Placeholder for extensions ?>
                <?php if ($tmpHtml = $this->getChildHtml('product_secondary_top_placeholder')): //Placeholder for extensions ?>
                    <div class="margin-bottom"><?php echo $tmpHtml; ?></div>
                <?php endif; ?>

                <?php if (isset($p['secondaryCol'][0])): ?>
                    <?php echo $p['secondaryCol'][0]; ?>
                <?php endif; ?>

                <?php if ($tmpHtml = $this->getChildHtml('block_product_secondary_bottom')): ?>
                    <div class="feature-wrapper top-border block_product_secondary_bottom"><?php echo $tmpHtml; ?></div>
                <?php endif; ?>

                <?php if (isset($p['secondaryCol'][1])): ?>
                    <div class="margin-top"><?php echo $p['secondaryCol'][1]; ?></div>
                <?php endif; ?>

                <?php /*?>
                <?php if (isset($section['related'])): ?>
                    <div class="margin-top"><?php echo $section['related']; ?></div>
                <?php endif; ?>
                <?php */?>

            </div>
        </div> <!-- end: product-secondary-column -->
    <?php endif; ?>

    <?php if ($_product->isSaleable() && $this->hasOptions()): ?>
        <?php if ($container2_html = $this->getChildChildHtml('container2', '', true, true)): ?>
            <div class="box-additional <?php echo $container2ColGridClass; ?>">
                <div class="container2-wrapper"><?php echo $container2_html; ?></div>
            </div>
        <?php endif; ?>
    <?php endif; ?>

</form>