我已经定制了产品类型(酒店)。它在后端有自定义选项选项卡。
我在某些产品(酒店)中添加了一些自定义选项。我已将 html 添加到自定义主题的 view.phtml 以输出自定义选项。
<?php if ($this->hasOptions()):?> <?php echo $this->getChildHtml('container1','', true, true) ?> <?php endif;?>
我还在我的布局中添加了块。
<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>
但<?php echo $this->getChildHtml('container1','', true, true) ?>
返回空。
如何显示选项块?