Bläddra i källkod

Fix : problème urls bouton "Commander" invité

refactoring
keun 6 år sedan
förälder
incheckning
66a687ff30
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. +1
    -1
      producer/views/layouts/main.php
  2. +1
    -1
      producer/views/site/index.php

+ 1
- 1
producer/views/layouts/main.php Visa fil

@@ -125,7 +125,7 @@ $producer = $this->context->getProducer() ;
],
[
'label' => '<span class="glyphicon glyphicon-plus"></span> Commander',
'url' => Yii::$app->urlManagerFrontend->createUrl(['site/producer','id' => $this->context->getProducer()->id,'return_url' => Yii::$app->urlManagerProducer->createAbsoluteUrl(['commande/create','slug_producer' => $this->context->getProducer()->slug])]),
'url' => Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/producer','id' => $this->context->getProducer()->id,'return_url' => Yii::$app->urlManagerProducer->createAbsoluteUrl(['commande/create','slug_producer' => $this->context->getProducer()->slug])]),
'visible' => Yii::$app->user->isGuest,
'active' => $this->getControllerAction() == 'commande/create' || $this->getControllerAction() == 'commande/update',
],

+ 1
- 1
producer/views/site/index.php Visa fil

@@ -12,7 +12,7 @@ else
?>

<section id="commander">
<a class="btn btn-primary btn-lg" href="<?php if(Yii::$app->user->isGuest): echo Yii::$app->urlManagerFrontend->createUrl(['site/producer','id' => $this->context->getProducer()->id,'return_url' => Yii::$app->urlManagerProducer->createAbsoluteUrl(['commande/create','slug_producer' => $this->context->getProducer()->slug])]); else: echo Yii::$app->urlManager->createUrl(['commande/create']); endif; ?>"><span class="glyphicon glyphicon-plus"></span> Passer une commande</a>
<a class="btn btn-primary btn-lg" href="<?php if(Yii::$app->user->isGuest): echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/producer','id' => $this->context->getProducer()->id,'return_url' => Yii::$app->urlManagerProducer->createAbsoluteUrl(['commande/create','slug_producer' => $this->context->getProducer()->slug])]); else: echo Yii::$app->urlManager->createUrl(['commande/create']); endif; ?>"><span class="glyphicon glyphicon-plus"></span> Passer une commande</a>
</section>

<section id="presentation">

Laddar…
Avbryt
Spara