In this module development is active, there are several versions of alpha.

Notes

<?
$filters = new \skeeks\cms\shop\cmsWidgets\filters\ShopProductFiltersWidget([
    'namespace' => 'ShopProductFiltersWidget-left',
    'onlyExistsFilters'     => true,
    //'viewFile'              => '@app/views/widgets/ShopProductFiltersWidget/default',
    //'viewFile'              => 'slider',
]); ?>

<? $widgetElements = new \skeeks\cms\cmsWidgets\contentElements\ContentElementsCmsWidget([
    'namespace' => 'ContentElementsCmsWidget-second',
    'viewFile' 	=> '@app/views/widgets/ContentElementsCmsWidget/products',
    'contentElementClass'         => \skeeks\cms\shop\models\ShopCmsContentElement::className(),
    'dataProviderCallback' 	=> function(\yii\data\ActiveDataProvider $activeDataProvider) use ($filters)
    {
        $filters->search($activeDataProvider);

        $activeDataProvider->query->with('relatedProperties');
        $activeDataProvider->query->with('shopProduct');
        $activeDataProvider->query->with('shopProduct.baseProductPrice');
        $activeDataProvider->query->with('shopProduct.minProductPrice');
    },
]); ?>

<? $resultElements = $widgetElements->run(); ?>
<? $resultFilters  = $filters->run(); ?>


<?= $resultFilters; ?>
<?= $resultElements; ?>

To customize the filters, copy the file to the project, and change it:


All Comments (0)
No Comments