人的头脑太复杂,时间过得久,有时候连自己也被自己骗了,记下来才是最真实的...... 注册 | 登录

feature products - magento 1.3

feature products.rarcms:
{{block type="catalog/product_homepage" name="home.catalog.product.homepage" alias="product_homepage" template="catalog/product/homepage.phtml"}}


add attribute:
in order to put products on the homepage based on a custom attribute, you need a block, a template file, and a little bit of css markup. I have attached two files, Homepage.php and homepage.phtml. Homepage.php should be placed in app/code/core/Mage/Catalog/Block/Product/ and homepage.phtml should be placed in app/design/frontend/[your package]/[your theme]/template/catalog/product/. Homepage.php is based off of the new product block but instead of looking for a date period it looks for a custom attribute called home_page_featured? which leads me to the next step: creating the custom attribute. Create an attribute called home_page_featured?of the yes/no variety and add this to your default attribute group. You may choose whatever attribute label you wish. Now when you edit a product there will be a yes/no option for this attribute. Set the products that you want to appear on the homepage as yes.

Trackbacks

点击获得Trackback地址,Encode: UTF-8 点击获得Trackback地址,Encode: GB2312 or GBK 点击获得Trackback地址,Encode: BIG5

发表评论

评论内容 (*):

温馨提醒
  • 。游客评论时可不填密码
  • 。请勿发广告以及有背法律的言论
  • 。留下您的联系方式以方便我们联系您