我一直在目录/view/options/type/configurable.phtml中进行编辑,而在该模板上工作的另一个人一直在整个地方进行编辑。突然,整个可配置的选项块(呈现出confyurable.phtml)从页面中丢失了。以下块仍在view.phtml中:

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
                <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
                <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
            <?php endif;?>

可能缺少什么会导致可配置选项块的消失?服务器或Magento日志中没有任何错误。没有任何JavaScript错误。

有帮助吗?

解决方案

是否对/app/design/frontend/default/ [default/catalog.xml做出了任何更改?

<catalog_product_view translate="label">
 .....
            <block type="core/template_facade" name="product.info.container1" as="container1">
                <action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
                <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
                <action method="append"><block>product.info.options.wrapper</block></action>
                <action method="append"><block>product.info.options.wrapper.bottom</block></action>
            </block>
            <block type="core/template_facade" name="product.info.container2" as="container2">
                <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
                <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
                <action method="append"><block>product.info.options.wrapper</block></action>
                <action method="append"><block>product.info.options.wrapper.bottom</block></action>
            </block>
            <action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
            <action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
许可以下: CC-BY-SA归因
scroll top