2014-12-02 84 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