duanduan8439 2012-07-23 09:51
浏览 21

重用Magento产品列表块 - 自定义集合

I want to use the default magento product list block and template but use it with my own custom product collection.

The collection is not part of a category, but a collection that is being created by my own module.

how do i tie the two up?

  • 写回答

1条回答 默认 最新

  • dongyi5070 2012-07-23 09:56
    关注

    You need to create your own block class, inheriting from Mage_Catalog_Block_Product_List, and to override at least its _getProductCollection() method, to make it load your collection.

    And regarding the template, you can assign the default one to your block in your layout definition.

    评论

报告相同问题?

悬赏问题

  • ¥15 netty整合springboot之后自动重连失效
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击