Sfoglia il codice sorgente

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

refactoring
Guillaume 3 anni fa
parent
commit
5f699afea1
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      producer/controllers/OrderController.php

+ 4
- 0
producer/controllers/OrderController.php Vedi 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…
Annulla
Salva