欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

magento創建自定義頁面 (Bestseller實例) Bes

系統 2013 0

Bestseller or best selling product is one of the features people tend to ask for when it comes to Magento?.

?

There are multiple ways to implement this feature.

In this example, I’m not using controller or model directories at all; I’m going to show you how to implement this feature using only one file: the View.

?

Basically, what you need to do is to create the directory inside your template directory and place the bestseller.phtml file in it. In my example, I’m using the custom-created directory /inchoo . All of the screenshots provided here are based on that directory structure.

Adding this feature to your store is a matter of two simple steps:

  • copy bestseller-phtml file to your directory
  • display the block on home page

?

To add a block to a home page, you simply log into the Magento, CMS > Manage Pages > Home. Then add the following to the content area:

        {{block type="core/template" template="inchoo/bestseller.phtml"}}
      
?

Notice the type attribute. I used core /template which means you can place this code anywhere in your site and it will work. Code does not inherit any collection objects from controllers since it has none. All that is necessary for the bestseller.phtml to work is defined in that single file.

?

?

One more thing: If you study the code in bestseller.phtml file you will see, at the very top of the file, the part that says: $this->show_total .

?

If I were to write

        {{block type="core/template" show_total="12" template="inchoo/bestseller.phtml"}} 
      
?

in my home page, then $this would be assigned property show_total with a value of 12 .

?

?

Therefore, the provided bestseller.phtml file provides the option of setting the number of products you wish to see listed.

?

?

Here is the bestseller.phtml packed in bestseller .zip.

Hope you find this useful.

?

來源: http://inchoo.net/ecommerce/magento/bestseller-products-in-magento/

magento創建自定義頁面 (Bestseller實例) Bestseller products in Magento


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!??!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲精品天堂 | 九九久久看少妇高潮A片特黄 | 欧美一区二区三区在线观看视频 | 深夜激情视频 | 精品国产日韩一区三区 | 青娱乐精品在线 | www香蕉视频 | 污污的网站免费观看 | 国产成人精品免费视频大全可播放的 | 久久中文网 | 亚洲精品免费在线视频 | 男进女内免费视频无遮挡 | 99精品视频3| 亚洲人成亚洲人成在线观看 | 国产精品国产成人国产三级 | 日韩精品亚洲人成在线播放 | 亚洲视频在线看 | 99精品国产高清一区二区麻豆 | 天天操夜夜噜 | 91草莓| 欧美日韩一区二区三区四区五区 | 性强烈欧美一级毛片 | 99精品久久 | 91高清网站 | 久久天天躁夜夜躁狠狠 | 黄色的视频免费观看 | 爱人同志国语免费观看全集 | 日韩欧美亚洲 | 亚州第一视频 | 热久久久 | 久草最新在线 | 欧洲精品视频完整版在线 | 精品视频在线观看视频免费视频 | 999热这里只有精品 三级在线网站 | 亚洲高清久久 | 日日摸夜夜添夜夜添破第一 | 久9久9精品视频在线观看 | 欧美久久xxxxxx影院 | 草的爽免费视频 | 久久一二三区 | 欧美77|