Magento - 将延伸从左/右列移动到主要

时间:2013-02-22 09:35:25

标签: magento

我尝试将ext:Customers who bought this product also purchased从默认的左/右列移动到产品下的主列,但我不知道如何执行此操作。

我尝试在<product_detail_leftposition translate="label">文件中将行<product_page translate="label">更改为system.xml,但这没有帮助。

有什么建议吗?

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

您可以通过将其添加到布局XML中的“产品”视图页面部分来执行此操作。在内容参考块内部添加块,位于底部的某个位置。

确保它在手柄内部,因为它定义了产品视图页面上使用的结构。

应用程序/设计/前端/ [命名空间] / [THEMENAME] /layout/catalog.xml

<catalog_product_view translate="label">
   ...
    <reference name="content">
       ...
        <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
            <!-- Other blocks etc here.. add at the bottom -->
            <block type="module/block" name="yourblock" as="yourblock"  />
        </block>
    </reference>
 </catalog_product_view>

如果你在这里添加它,它会自动输出你的块,虽然这取决于你正在使用的主题。

如果没有自动显示,您可能需要在视图中添加一行以显示该块:

应用程序/设计/前端/ [命名空间] / [THEMENAME] /template/catalog/product/view.phtml

<?php // use the block name used in the XML config.. ?>
<?php echo $this->getChildHtml('yourblock') ?>