人的头脑太复杂,时间过得久,有时候连自己也被自己骗了,记下来才是最真实的...... 注册 | 登录
浏览模式: 标准 | 列表2009年11月的文章

magento:Wordpress Integration

这篇日志被加密了,请输入密码后查看。

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.

bestsellers - magento 1.3

cms:
{{block type="catalog/product_bestsellers" name="home.catalog.product.bestsellers" alias="product_bestsellers" template="catalog/product/bestsellers.phtml"}}

附件: best seller products.rar (2.17 K, 下载次数:0)