|
|
@@ -37,19 +37,20 @@ class SwitchMerchantController extends AbstractController |
|
|
|
if ($context == 'admin') { |
|
|
|
$url .= 'admin'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(!$url) { |
|
|
|
$url = $request->headers->get('referer'); |
|
|
|
} |
|
|
|
|
|
|
|
if($url) { |
|
|
|
return $this->redirect($url); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($url) { |
|
|
|
return $this->redirect($url); |
|
|
|
} else { |
|
|
|
$this->addFlashTranslator('error', ActionDefinition::SWITCH_MERCHANT, 'Merchant'); |
|
|
|
return $this->redirect($request->headers->get('referer')); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$this->addFlashTranslator('error', ActionDefinition::SWITCH_MERCHANT, 'Merchant'); |
|
|
|
return $this->redirectToRoute('frontend_home'); |
|
|
|
} |
|
|
|
|
|
|
|
} |