Ejemplo n.º 1
0
 public function actionConfirm($id)
 {
     $this->layout = "main_layout";
     $model = new placeOrderModel();
     if (Yii::$app->request->post()) {
         if ($model->caridata($id)) {
             $model = placeOrderModel::findOne($id);
             $model->bukti_bayar = UploadedFile::getInstance($model, 'bukti_bayar');
             $model->bukti_bayar = file_get_contents($model->bukti_bayar->tempName);
             $model->order_status_code = 1;
             $model->save();
         }
         $this->redirect(['profile']);
     }
     return $this->render('bukti', ['model' => $model]);
 }
Ejemplo n.º 2
0
 public function caridata($id)
 {
     return placeOrderModel::findOne($id);
 }
Ejemplo n.º 3
0
<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\modules\front\models\placeOrderModel;
use yii\helpers\Url;
$model = new placeOrderModel();
$session = Yii::$app->session;
$session->open();
$user_session = $session['session.user'];
$session->close();
$user = $model->findUser($user_session['username'], $user_session['email']);
$this->title = 'profil';
$this->params['breadcrumbs'][] = $this->title;
?>
<!-- check out -->
<div class="container">
	<div class="check-sec">	 
		<div class="col-md-3 cart-total">
			<a class="continue" href="<?php 
echo Url::To('product');
?>
">Lanjut Belanja</a>
			<div class="price-details">
			<?php 
foreach ($user as $key => $value) {
    $id = $value['customers_id'];
    ?>
Ejemplo n.º 4
0
<?php

use app\modules\front\models\placeOrderModel;
$dataPesanModel = new placeOrderModel();
$id = Yii::$app->request->get()['id'];
$detailOrder = $dataPesanModel->findDetailOrder($id);
$itemOrder = $dataPesanModel->findItemOrder($id);
$this->title = 'Invoice #' . $id;
?>
 <div class="invoice-w">
      <div class="white-paper">
        <div class="invoice-header">
          <div class="row">
            <div class="col-sm-6">
              <div class="invoice-logo">
                <i class="fa fa-rocket"></i>
              </div>
            </div>
            <div class="col-sm-6">
                <div class="invoice-date-w">
                  <div class="invoice-date">April 5th, 2013</div>
                  <div class="invoice-number">Invoice #<?php 
echo $id;
?>
</div>
                </div>
            </div>
          </div>
        </div>
        <div class="invoice-header">
        <div class="row">