faonni/module-product-most-ordered

扩展显示您店铺中最常订购的产品(热销产品)。

安装: 133

依赖: 0

建议者: 0

安全: 0

星标: 5

关注者: 5

分支: 1

开放性问题: 0

类型:magento2-module

2.1.1 2017-11-24 20:00 UTC

This package is auto-updated.

Last update: 2024-08-29 04:25:28 UTC


README

扩展显示您店铺中最常订购的产品(热销产品)。

主页

Magento2 ProductMostOrdered

分类页

Magento2 ProductMostOrdered

使用Composer进行安装

  1. 进入Magento2根目录

  2. 输入以下命令以安装模块

    composer require faonni/module-product-most-ordered

    等待依赖更新。

  3. 输入以下命令以启用模块

    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy
  4. 刷新统计信息

显示和配置

  1. 一个短代码,用于主页和其他CMS页面或CMS块。

    {{block class='Faonni\ProductMostOrdered\Block\ProductList' 
    		template='Faonni_ProductMostOrdered::product/list/items.phtml' 
    		title='Most Ordered Products'
    		period='monthly'
    		interval='3'
    		num_products='6'
    }}
  2. 更新所有类别的布局XML。

    <referenceBlock name="catalog.product.most.ordered">
    	<action method="setTitle">
    		<argument name="title" xsi:type="string" translate="true">Most Ordered Products of Category</argument>
    	</action>
    	<action method="setNumProducts">
    		<argument name="num_products" xsi:type="string">6</argument>
    	</action>
    	<action method="setPeriod">
    		<argument name="period" xsi:type="string">monthly</argument>
    	</action>
    	<action method="setInterval">
    		<argument name="interval" xsi:type="string">3</argument>
    	</action>	
    </referenceBlock>