【问题标题】:Magento design - new homepage columnsMagento design - 新的主页栏目
【发布时间】:2011-05-30 05:05:37
【问题描述】:

我想为我的 magento 商店做一个这样的定制设计:

我该如何继续这样做,特别是对于 category1 和 category2 中的产品,我希望这个列表有一个新的标题,带有一些图像,不像标准的类别网格......

非常感谢您的帮助;

【问题讨论】:

    标签: templates layout magento magento-1.4


    【解决方案1】:
    • 创建 CMS 页面。
    • 切换到设计模式。选择布局 - 1 列。
    • 编辑布局更新 XML

      <block type="cms/block" name="block1_static">
          <action method="setBlockId"><id>cms_block1-static</id></action>
      </block>
      
      
      <block type="page/html_wrapper" name="left.callout.wrapper" translate="label">
          <action method="setElementId"><value>hompage-left-callout</value></action>
          <block type="core/template" name="left.callout" template="callouts/right_col.phtml">
              <action method="setImgSrc"><src>images/media/left_banner_1.gif</src></action>
          </block>
      </block>
      
      
      <block type="page/html_wrapper" name="center.wrapper" translate="label">
          <action method="setElementId"><value>hompage-center</value></action>
          <block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
          <block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new"><action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
      </block>
      
      
      <block type="page/html_wrapper" name="right.callout.wrapper" translate="label">
          <action method="setElementId"><value>hompage-right-callout</value></action>
          <block type="core/template" name="right.callout" template="callouts/right_col.phtml">
              <action method="setImgSrc"><src>images/media/right_banner_1.gif</src></action>
          </block>
      </block>
      

    例如,有两个块 - 查看的产品和新产品。 Magento 中没有默认块来显示特定类别的产品。您应该为其创建此块和模板,并使用此块代替示例块。

    您可以与 css 对齐的块的位置。每个块都将用具有特定 ID 的 div 包装。 ElementId 和 ElementClass 你可以设置包装块。

    【讨论】:

      猜你喜欢
      • 2010-12-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-21
      • 1970-01-01
      • 2018-02-06
      • 1970-01-01
      相关资源
      最近更新 更多