Browse Source

[producer] Prise de commande : redirection si non connecté

dev
Guillaume 3 years ago
parent
commit
5f699afea1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      producer/controllers/OrderController.php

+ 4
- 0
producer/controllers/OrderController.php View File

$params = []; $params = [];
$producer = $this->getProducer() ; $producer = $this->getProducer() ;


if(\Yii::$app->user->isGuest && !$producer->option_allow_order_guest) {
return $this->redirect(Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/producer','id' => $producer->id])) ;
}

if ($id) { if ($id) {
$order = Order::searchOne([ $order = Order::searchOne([
'id' => $id 'id' => $id

Loading…
Cancel
Save