lastProducts.php
598 Bytes
<?php
namespace common\modules\product\widgets;
use common\modules\product\helpers\ProductHelper;
use common\modules\product\models\Category;
use yii\base\Widget;
class lastProducts extends Widget {
    public function init()
    {
        parent::init(); // TODO: Change the autogenerated stub
    }
    public function run() {
        return $this->render('products_block', [
            'title' => \Yii::t('product', 'Вы недавно просматривали'),
            'class' => 'last-products',
            'products' => ProductHelper::getLastProducts(true),
        ]);
    }
} 
