faonni / module-product-most-viewed
扩展显示您商店中最受查看的产品。
2.1.1
2017-11-24 19:55 UTC
Requires
- php: ~5.6.0|~7.0.0|~7.1.0
- magento/module-reports: 100.1.*|100.2.*
This package is auto-updated.
Last update: 2024-08-29 04:09:11 UTC
README
扩展显示您商店中最受查看的产品。
主页
分类页面
使用Composer进行安装
-
进入Magento2根目录
-
输入以下命令来安装模块
composer require faonni/module-product-most-viewed
等待依赖更新。
-
输入以下命令来启用模块
php bin/magento setup:upgrade php bin/magento setup:static-content:deploy
-
刷新统计信息
显示和配置
-
一个短代码,用于主页和其他CMS页面或CMS块。
{{block class='Faonni\ProductMostViewed\Block\ProductList' template='Faonni_ProductMostViewed::product/list/items.phtml' title='Most Viewed Products' interval='45' num_products='6' }}
-
更新所有类别的布局XML。
<referenceBlock name="catalog.product.most.viewed"> <action method="setTitle"> <argument name="title" xsi:type="string" translate="true">Most Viewed Products of Category</argument> </action> <action method="setNumProducts"> <argument name="num_products" xsi:type="string">6</argument> </action> <!-- last 45 days, if 0 - all lifetime --> <action method="setInterval"> <argument name="interval" xsi:type="string">45</argument> </action> </referenceBlock>