簡體   English   中英

C:\\ wamp \\ www \\ mg1 \\ app \\ Mage.php:595中的Magento無效塊類型

[英]Magento Invalid Block Type in C:\wamp\www\mg1\app\Mage.php:595

我剛剛安裝了一個簡單的擴展程序,以顯示按屬性集分組的屬性。 安裝后,我得到此錯誤:

exception 'Mage_Core_Exception' with message 'Invalid block type: ' in C:\wamp\www\mg1\app\Mage.php:595

以下是它安裝的2個文件(我手動找到了它們):誰能告訴我可以從哪里開始尋找錯誤原因?

布局文件: \\ app \\ design \\ frontend \\ base \\ default \\ layout \\ AttributesAsGroup.xml

<layout version="0.1.0">

    <catalog_product_view>

        <reference name="content">
        <block name="product.info" >

        <block type="Webguys_AttributesAsGroup/Groupview" name="product.attributes" as="additional" template="webguys/attributesasgroup/groupview.phtml">
            <action method="addToParentGroup"><group>detailed_info</group></action>
        </block>

        </block>
    </reference>

    </catalog_product_view>

</layout>

這是模板文件 \\ app \\ design \\ frontend \\ base \\ default \\ template \\ webguys \\ attributesasgroup

<?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct()
?>

<?php if($_additionalgroup = $this->getAdditionalData()): ?>
<div class="box-collateral box-additional">
    <h2><?php echo $this->__('Additional Information') ?></h2>

    <?php $i=0; foreach ($_additionalgroup as $_additional): $i++; ?>
        <h3><?php echo $this->__( $_additional['title'] )?></h3>
        <table class="data-table" id="product-attribute-specs-table-<?php echo $i?>">
            <col width="25%" />
            <col />
            <tbody>
            <?php foreach ($_additional['items'] as $_data): ?>
                <tr>
                    <th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
                    <td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
        <script type="text/javascript">decorateTable('product-attribute-specs-table-<?php echo $i?>')</script>
    <?php endforeach; ?>

</div>
<?php endif;?>

此擴展名不是合適的擴展名。

i  have modify app\code\community\Webguys\AttributesAsGroup\etc\config.xml in 

和代碼是

   <?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Webguys_AttributesAsGroup>
            <version>1.0.0</version>
        </Webguys_AttributesAsGroup>
    </modules>

    <global>
        <blocks>
            <attributesasgroup>
                <class>Webguys_AttributesAsGroup_Block</class>
            </attributesasgroup>
        </blocks>
    </global>
    <frontend>
        <layout>
            <updates>
                <attributesasgroup>
                    <file>attributesasgroup.xml</file>
                </attributesasgroup>

            </updates>
        </layout>
    </frontend>
</config>
and file name AttributesAsGroup.xml change to attributesasgroup.xml

和此代碼的代碼:

該文件代碼是

<layout version="0.1.0">
    <catalog_product_view>

        <reference name="content">
            <block name="product.info" >

                <block type="attributesasgroup/groupview" name="product.attributes" as="additional" template="webguys/attributesasgroup/groupview.phtml">
                    <action method="addToParentGroup"><group>detailed_info</group></action>
                </block>

            </block>
        </reference>

    </catalog_product_view>

</layout>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM