Magento小知识

来源:互联网 发布:国外体育直播软件 编辑:程序博客网 时间:2024/04/30 07:20
一:添加magento原有的链接 
如在header里独立写一个login:
<a href="<?php echo$this->getUrl('customer/account/login/')?>"style="display:inline">Login</a>

二:首页添加新产品方法:
1.在在home page里写
{{block type="catalog/product_new" name="home.catalog.product.new"alias="product_new" template="catalog/product/new.phtml"after="cms_page"}}
2.是在Edit Page xxxx -> Custom Design--> Layout update xml:
增加   
<reference name="content">
<block type="catalog/product_new"name="home.catalog.product.new" alias="product_new"template="catalog/product/new.phtml"after="cms_page"><actionmethod="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action></block>
</reference>

三:产品每行显示的产品数量修改:
appdesignfrontenddefault-----templatecatalogproductlist.phtml
<?php $_columnCount =$this->getColumnCount();?>  改为 <?php $_columnCount = 4?>  4是每行要显示的产品数量
最后修改下CSS就好、

四:Shopping Cart页面设置成2栏左列结构:
appdesignfrontenddefaultbasedefaultlayoutcheckout.xml
修改 <!-- Mage_Checkout-->下的结构为2columns-left.phtml,并删除上面的<removename="left"/>

http://blog.sina.com.cn/s/blog_6a13237801012w6o.html
原创粉丝点击