dongwende1984 2012-11-02 13:08
浏览 19

在magento中移动“最近查看的产品”小部件

The xml code that I have for the widget layout is this:

    <reference name="left">
            <block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <block type="core/text_list" name="left.permanent.callout" template="callouts/left_col.phtml">
                <!--<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
                <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>-->
                <block type="cms/block" name="left_callout">
                    <action method="setBlockId"><block_id>left_callout</block_id></action>
                </block>
                <action method="setLinkUrl"><url>checkout/cart</url></action>
            </block>
    </reference>

And the corresponding output that I get is that the products get shown below the menu and above the product. I want the recently viewed product widget below the main product and if possible below the "You may also like section". The layout of the page is 1column layout. Please help. What to do????

  • 写回答

1条回答 默认 最新

  • duanmei1536 2013-07-11 08:38
    关注

    I'm not 100% sure but from what I know you can do something like this:

    xml file (I think catalog.xml)

    <reference name="content"><block type="catalog/product_compare_sidebar" after="" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <block type="core/text_list" name="left.permanent.callout" template="callouts/left_col.phtml">
                <block type="cms/block" name="left_callout">
                    <action method="setBlockId"><block_id>left_callout</block_id></action>
                </block>
                <action method="setLinkUrl"><url>checkout/cart</url></action>
            </block></reference>
    

    On the after="" tag, type in the name of the block for the related products(you may also like). You can find it somewhere in the xml file also. That would tell the Recently Viewed block to appear only after you may also like.

    Then, in your 1 column html, call it using $this->getChildHtml('left.permanent.callout'); right after where the other child html's are called.

    评论

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行