Browse Source

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

refactoring
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

@@ -77,6 +77,10 @@ class OrderController extends ProducerBaseController
$params = [];
$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) {
$order = Order::searchOne([
'id' => $id

Loading…
Cancel
Save