skeeks/cms-shop-cart-items-widget

Widget shop cart items for SkeekS CMS

2.0.0.2 2024-11-14 12:14 UTC

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist skeeks/cms-shop-cart-items-widget "*"

or add

"skeeks/cms-shop-cart-items-widget": "*"

Example

<?= \skeeks\cms\shopCartItemsWidget\ShopCartItemsListWidget::widget([
    'dataProvider' => new \yii\data\ActiveDataProvider([
        'query' => \Yii::$app->shop->shopFuser->getShopBaskets(),
        'pagination' =>
        [
            'defaultPageSize' => 100,
            'pageSizeLimit' => [1, 100],
        ]
    ]),
    //'headerView' => '@app/view/.../header',
    //'footerView' => '@app/view/.../footer',
    //'itemView' => '@app/view/.../item',
]); ?>

Example cart items

<?= \skeeks\cms\shopCartItemsWidget\ShopCartItemsListWidget::widget([
    'dataProvider' => new \yii\data\ActiveDataProvider([
        'query' => $model->getShopBaskets(),
        'pagination' =>
        [
            'defaultPageSize' => 100,
            'pageSizeLimit' => [1, 100],
        ],
    ]),
]); ?>

Example order items

<?= \skeeks\cms\shopCartItemsWidget\ShopCartItemsListWidget::widget([
    'dataProvider' => new \yii\data\ActiveDataProvider([
        'query' => $model->getShopBaskets(),
        'pagination' =>
        [
            'defaultPageSize' => 100,
            'pageSizeLimit' => [1, 100],
        ],
    ]),
    'footerView'    => false,
    'itemView'      => '@skeeks/cms/shopCartItemsWidget/views/items-list-order-item',
]); ?>

##Links

skeeks!
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com