2014-12-02 80 views

回答

1

Magento中有句柄决定当调用特定控制器时显示的块。
看看这个文件 /magento/app/design/frontend/base/default/layout/catalog.xml,找到以下行

<catalog_product_view translate="label"> 
     <label>Catalog Product View (Any)</label> 
     <!-- Mage_Catalog --> 
     <reference name="root"> 
      <action method="setTemplate"> 
       <template>page/2columns-right.phtml</template> 
      </action> 
     </reference> 

     <reference name="content"> 
      <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml"> 
       <!-- Some more code --> 
      </block> 
     </reference> 
     <!-- Some more code --> 
    </catalog_product_view> 

catalog_product_view是你可能想把手用于在产品页面上显示横幅。

选择该句柄并编写块特定的代码。

如果你想使用扩展名来简化你的任务here is the one.

+0

thaks的评论。我在哪里可以找到我的横幅的特定于块的代码?还尝试在Magento Connect管理面板中安装该扩展程序,但由于错误(不正确的名称,无日期,无效字符等)而无法使用。我是在正确的地方安装吗?我将包上传到Magento Connect Manager>文件上传 – the10thplanet 2014-12-02 06:50:59

+0

要安装扩展,请先禁用缓存。 使用magento连接密钥从http://www.freegento.com/下载该扩展的zip文件。使用直接下载magento扩展并只需粘贴密钥。 将扩展文件上传到Magento的根目录,检查文件/文件夹权限。 按照这个简单的视频。 https://www.youtube.com/watch?v=jvqY3zhjF-c – Harit 2014-12-02 07:02:36

+0

对于bannerslider块,具体代码与此类似 Harit 2014-12-02 07:04:22

0

您可以在产品页面上调用横幅代码。或者如果你想用简单的技术,使用iframe