skeeks/cms-shop-cart-steps-widget

Widget shop cart steps for SkeekS CMS

1.0.2 2019-03-25 16:04 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-steps-widget "*"

or add

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

Example

<?= \skeeks\cms\shopCartStepsWidget\ShopCartStepsWidget::widget(); ?>

View file

<?php
/* @var $this yii\web\View */
/* @var $widget \skeeks\cms\shop\widgets\cart\ShopCartStepsWidget */
\skeeks\cms\shopCartStepsWidget\assets\ShopCartStepsWidgetAsset::register($this);
$widget     = $this->context;
?>
<?= \yii\helpers\Html::beginTag('div', $widget->options); ?>
    <ul class="process-steps nav nav-justified">
        <li class="active">
            <a href="<?= \yii\helpers\Url::to(['/shop/cart']); ?>" data-pjax="0">1</a>
            <h5><?= \Yii::t('skeeks/shop-cart-steps-widget', 'Cart'); ?></h5>
        </li>
        <li class="<?= in_array(\Yii::$app->controller->action->getUniqueId(), ['shop/cart/checkout', 'shop/order/finish']) ? "active" : ""; ?>">
            <a href="<?= \yii\helpers\Url::to(['/shop/cart/checkout']); ?>" data-pjax="0">2</a>
            <h5><?= \Yii::t('skeeks/shop-cart-steps-widget', 'Ordering'); ?></h5>
        </li>
        <li class="<?= \Yii::$app->controller->action->getUniqueId() == 'shop/order/finish' ? "active" : ""; ?>">
            <a href="#">3</a>
            <h5><?= \Yii::t('skeeks/shop-cart-steps-widget', 'Ready order'); ?></h5>
        </li>
    </ul>
<?= \yii\helpers\Html::endTag('div'); ?>

##Links

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