/** * Finds the Provider model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Provider the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Provider::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
echo Yii::t('app', 'Message'); ?> :</span> <span><?php echo $model->message; ?> </span> </p> <?php } ?> <?php foreach ($model->getProductsByProviders() as $provId => $items) { /** @var Provider $provider */ $provider = Provider::findOne($provId); ?> <div style="padding: 2px 5px 12px 5px;border-bottom: 1px dotted #cccccc;"> <?php echo !is_null($provider) && !empty($provider->name) ? Html::tag('h3', $provider->name, []) : ''; ?> <table class="table table-bordered"> <thead> <tr> <th><?php echo Yii::t('app', 'Items'); ?> </th>
<?php /** @var $model Order */ /** @var $provider Order */ use app\models\Order; use app\models\Provider; use yii\helpers\Url; $orderShipping = $model->orderShipping; $destinationAccount = $orderShipping->getDestinationAccount(); $url_destination = Url::base(true) . '/destinatario/'; $instructions = []; foreach ($providers as $provID) { if (!is_null($provider = Provider::findOne($provID))) { if (!empty($provider->destination_instructions)) { $instructions[] = $provider->destination_instructions; } } } echo $this->render('_top'); ?> <h2>Confirmación de Compra</h2> <table class="info"> <tr> <th nowrap="nowrap"><?php echo Yii::t('app', 'Order #'); ?> </th> <td><?php echo $model->id;