コード例 #1
0
ファイル: index.php プロジェクト: yodathedark/moltis-tickets
use yii\helpers\Url;
use yii\helpers\Html;
$this->title = Yii::t('app', 'Your cart');
$cartItems = CartItems::find()->where(['cart_id' => $cart->id]);
$cart->processCart();
$dataProvider = new yii\data\ActiveDataProvider(['query' => $cartItems]);
$formatter = \Yii::$app->formatter;
?>
<h1><?php 
echo Html::encode($this->title);
?>
</h1>
<?php 
$session = new Session();
$errors = $session->getErrors();
$session->clearErrors();
foreach ($errors as $e) {
    ?>
<div class="alert alert-danger"><h2><?php 
    echo $e;
    ?>
</h2></div><?php 
}
$successes = $session->getSuccesses();
$session->clearSuccesses();
foreach ($successes as $e) {
    ?>
<div class="alert alert-success"><h2><?php 
    echo $e;
    ?>
</h2></div><?php