Pārlūkot izejas kodu

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

dev
Guillaume pirms 3 gadiem
vecāks
revīzija
5f699afea1
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. +4
    -0
      producer/controllers/OrderController.php

+ 4
- 0
producer/controllers/OrderController.php Parādīt failu

@@ -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

Notiek ielāde…
Atcelt
Saglabāt