Magendo将“发送给朋友”移动到产品视图下的选项卡


Magendo Move Send To Friend To a Tab Under Product View

我正试图在"产品视图"的选项卡下显示"发送给朋友"表单。

我在/app/design/frontend/default/metemplate/layout/catalog.xml 下插入了以下代码

<action method="addTab" translate="title">
    <alias>send-friend</alias>
    <title>Send Friends</title>
    <block>sendfriend/send</block>
    <template>sendfriend/send.phtml</template>
</action>

我在里面插入了代码:

<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >

问题是它不起作用。。。我从浏览器收到一条消息,说"重定向太多",但什么都没有显示!

我还有另外几个标签,我也以类似的方式添加了。其他的都很好用。

有人能帮忙吗?

感谢

实际上我在问题中插入的代码是正确的!

问题是,每次我点击产品时,Magento都会将我重定向到同一个页面,而不是打开请求的产品页面。

在Magento管理->系统->配置->开发者中激活错误日志后

我注意到/magento_install_path/var/log/exception.log中有一个错误,上面写着"Mage_Core _exception请定义一个有效的cookie实例"(我的magento语言不是英语,所以我不知道英语中的确切错误)。

在这之后,一切都很容易。只需进入系统->配置。在目录下选择发送朋友,并在"限制发送到"中选择"IP地址"!

希望这能帮助到别人。

感谢

如果您试图移动现有块,则需要使用"unsetChild"answers"insert"方法,并适当引用引用的应用程序部分。下面的示例代码从右列取消Poll块的设置,并将其移动到'catalog.leftnav'块之后的左列。这在Professional版本中使用过,但作为任何版本的起点仍然很有用。您可能需要打开调试选项来查看块名等,同时查看firebug中的类名等。如果不是移动,那么示例的insert语法部分应该很有用。

如果你需要进一步的帮助,请告诉我。

<layout>
    <default>
        <reference name='right'>
            <action method='unsetChild'><name>right.poll</name></action>
        </reference>
        <reference name='left'>
            <action method='insert'>
                <name>right.poll</name>
                <sibling>catalog.leftnav</sibling>
            </action>
        </reference>
    </default>
</layout>