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