Skip to content

Commit

Permalink
Use route and query parameters for bootstrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed May 4, 2016
1 parent b7adea6 commit 585a697
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/Aimeos/Shop/Base/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@


use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Route;


Expand Down Expand Up @@ -163,17 +164,9 @@ protected function getLocale( \Aimeos\MShop\Context\Item\Iface $context )
{
if( $this->locale === null )
{
if( Route::current() !== null )
{
$site = Route::input( 'site', 'default' );
$lang = Route::input( 'locale', '' );
$currency = Route::input( 'currency', '' );
}
else
{
$site = 'default';
$lang = $currency = '';
}
$site = Route::input( 'site', Input::get( 'site', 'default' ) );
$currency = Route::input( 'currency', Input::get( 'currency', '' ) );
$lang = Route::input( 'locale', Input::get( 'locale', '' ) );

$disableSites = $this->config->get( 'shop.disableSites', true );

Expand Down

0 comments on commit 585a697

Please sign in to comment.