欧美三区_成人在线免费观看视频_欧美极品少妇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條評論
主站蜘蛛池模板: 青娱乐在线视频盛宴 | xy110.app | 精品日韩欧美国产一区二区 | 国产高清在线精品免费 | www九色 | 色网在线免费观看 | 6全高清智能录播系统视频 精品九九 | 欧美特级 | 好大好硬好长好爽a网站 | 欧美午夜一艳片欧美精品 | 排球少年第四季 | 亚洲国产中文字幕 | 亚洲国产三级 | 毛片基地免费视频a | 香港一级毛片免费看 | 久久久久久久 | 上将的炮灰前妻重生了 | 欧美在线一级精品 | 成人性生活视频在线观看 | 久久中文字幕一区二区三区 | 亚洲经典激情春色另类 | 久久久婷| 毛片免费观看视频 | 一级黄色片欧美 | 久久久久国产亚洲日本 | 国产三级在线观看视频 | 亚洲精品无码不卡在线播放he | 日韩在线观看视频网站 | 午夜资源站 | 波多久久夜色精品国产 | 五月激情综合网 | 国产精品久久久久久久久免费相片 | 综合第一页 | 亚洲免费黄色 | 四虎图库| 亚洲综合久久久久久888 | 丁香婷婷在线观看 | 91官网| 欧美va亚洲 | 亚洲欧美在线免费观看 | 国产精品美女久久久久久 |