Exemplo n.º 1
0
 /**
  * @return string
  */
 public function actionPlace()
 {
     $order = Checkout::place_order();
     if ($order) {
         return $this->redirect(['success']);
     } else {
         return $this->redirect(['fail']);
     }
 }
Exemplo n.º 2
0
Arquivo: list.php Projeto: vetoni/toko
<?php

use app\api\Checkout;
use app\helpers\CurrencyHelper;
use app\modules\checkout\models\Order;
use app\widgets\BackLink;
use yii\bootstrap\Html;
/**
 * @var Order[] $orders
 */
$pager = Checkout::pager();
?>

<h1><?php 
echo Yii::t('app', 'My orders');
?>
</h1>
<table class="table">
    <thead>
    <tr>
        <th>#</th>
        <th><?php 
echo Yii::t('app', 'Name');
?>
</th>
        <th><?php 
echo Yii::t('app', 'Address');
?>
</th>
        <th><?php 
echo Yii::t('app', 'Total');