From 1e16931ba3e827325c8c98e4cfb0741fadcd9b3c Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 12 Oct 2018 18:24:10 +0530 Subject: [PATCH 1/5] Countries and States models added --- composer.json | 1 - packages/Webkul/Admin/src/Http/routes.php | 84 +- .../src/Providers/EventServiceProvider.php | 20 +- .../Admin/src/Resources/lang/en/app.php | 8 +- .../common/create-country-state.blade.php | 25 + .../views/common/edit-country-state.blade.php | 28 + .../views/settings/countries/create.blade.php | 43 - .../views/settings/countries/index.blade.php | 22 - .../inventory_sources/create.blade.php | 11 +- .../settings/inventory_sources/edit.blade.php | 17 +- .../create.blade.php | 18 +- .../edit => tax-categories}/edit.blade.php | 20 +- .../index.blade.php | 6 +- .../views/tax/tax-rates/create.blade.php | 126 + .../edit => tax-rates}/edit.blade.php | 22 +- .../{taxrate => tax-rates}/index.blade.php | 8 +- .../tax/taxrate/create/taxrate.blade.php | 126 - packages/Webkul/Checkout/src/Cart.php | 2 +- packages/Webkul/Core/src/Core.php | 44 +- packages/Webkul/Core/src/Data/countries.json | 1277 ++++++ packages/Webkul/Core/src/Data/states.json | 3978 +++++++++++++++++ ...18_07_20_054426_create_countries_table.php | 2 - ...1803_create_country_translations_table.php | 35 + ..._12_101913_create_country_states_table.php | 36 + ...reate_country_state_translations_table.php | 35 + .../Database/Seeders/CountriesTableSeeder.php | 18 + .../Database/Seeders/CurrencyTableSeeder..php | 14 +- .../src/Database/Seeders/DatabaseSeeder.php | 3 + .../Database/Seeders/LocalesTableSeeder.php | 20 +- .../Database/Seeders/StatesTableSeeder.php | 18 + .../Http/Controllers/CountryController.php | 96 - packages/Webkul/Core/src/Models/Country.php | 9 +- .../Webkul/Core/src/Models/CountryState.php | 10 + .../Repositories/CountryStateRepository.php | 24 + .../src/Http/Controllers/HomeController.php | 2 - .../Webkul/Shop/src/Resources/lang/en/app.php | 1 + .../views/checkout/onepage.blade.php | 9 + .../checkout/onepage/customer-info.blade.php | 106 +- .../Tax/src/Providers/TaxServiceProvider.php | 23 - public/themes/default/assets/js/shop.js | 6 +- 40 files changed, 5825 insertions(+), 528 deletions(-) create mode 100644 packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php create mode 100644 packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php delete mode 100644 packages/Webkul/Admin/src/Resources/views/settings/countries/create.blade.php delete mode 100644 packages/Webkul/Admin/src/Resources/views/settings/countries/index.blade.php rename packages/Webkul/Admin/src/Resources/views/tax/{taxrule/create => tax-categories}/create.blade.php (83%) rename packages/Webkul/Admin/src/Resources/views/tax/{taxrule/edit => tax-categories}/edit.blade.php (84%) rename packages/Webkul/Admin/src/Resources/views/tax/{taxrule => tax-categories}/index.blade.php (67%) create mode 100644 packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php rename packages/Webkul/Admin/src/Resources/views/tax/{taxrate/edit => tax-rates}/edit.blade.php (83%) rename packages/Webkul/Admin/src/Resources/views/tax/{taxrate => tax-rates}/index.blade.php (60%) delete mode 100644 packages/Webkul/Admin/src/Resources/views/tax/taxrate/create/taxrate.blade.php create mode 100644 packages/Webkul/Core/src/Data/countries.json create mode 100644 packages/Webkul/Core/src/Data/states.json create mode 100644 packages/Webkul/Core/src/Database/Migrations/2018_10_12_101803_create_country_translations_table.php create mode 100644 packages/Webkul/Core/src/Database/Migrations/2018_10_12_101913_create_country_states_table.php create mode 100644 packages/Webkul/Core/src/Database/Migrations/2018_10_12_101923_create_country_state_translations_table.php create mode 100644 packages/Webkul/Core/src/Database/Seeders/CountriesTableSeeder.php create mode 100644 packages/Webkul/Core/src/Database/Seeders/StatesTableSeeder.php delete mode 100644 packages/Webkul/Core/src/Http/Controllers/CountryController.php create mode 100644 packages/Webkul/Core/src/Models/CountryState.php create mode 100644 packages/Webkul/Core/src/Repositories/CountryStateRepository.php diff --git a/composer.json b/composer.json index 7c2bf94e3..75737c25f 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,6 @@ "laravel/framework": "5.6.*", "laravel/tinker": "^1.0", "nwidart/laravel-modules": "^3.2", - "pragmarx/countries": "^0.5.9", "prettus/l5-repository": "^2.6", "propaganistas/laravel-intl": "^2.0" }, diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index 459c3e537..5dab660b7 100644 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -284,20 +284,6 @@ Route::group(['middleware' => ['web']], function () { ])->name('admin.locales.store'); - // Country Routes - Route::get('/countries', 'Webkul\Core\Http\Controllers\CountryController@index')->defaults('_config', [ - 'view' => 'admin::settings.countries.index' - ])->name('admin.countries.index'); - - Route::get('/countries/create', 'Webkul\Core\Http\Controllers\CountryController@create')->defaults('_config', [ - 'view' => 'admin::settings.countries.create' - ])->name('admin.countries.create'); - - Route::post('/countries/create', 'Webkul\Core\Http\Controllers\CountryController@store')->defaults('_config', [ - 'redirect' => 'admin.countries.index' - ])->name('admin.countries.store'); - - // Currency Routes Route::get('/currencies', 'Webkul\Core\Http\Controllers\CurrencyController@index')->defaults('_config', [ 'view' => 'admin::settings.currencies.index' @@ -400,54 +386,52 @@ Route::group(['middleware' => ['web']], function () { 'redirect' => 'admin::sliders.index' ])->name('admin.sliders.store'); + //tax routes - Route::prefix('tax')->group(function () { + Route::get('/tax-categories', 'Webkul\Tax\Http\Controllers\TaxController@index')->defaults('_config', [ + 'view' => 'admin::tax.tax-categories.index' + ])->name('admin.tax-categories.index'); - Route::get('taxrule', 'Webkul\Tax\Http\Controllers\TaxController@index')->defaults('_config', [ - 'view' => 'admin::tax.taxrule.index' - ])->name('admin.taxrule.index'); + // tax rule routes + Route::get('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [ + 'view' => 'admin::tax.tax-categories.create' + ])->name('admin.tax-categories.show'); - // tax rule routes - Route::get('taxrule/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [ - 'view' => 'admin::tax.taxrule.create.create' - ])->name('admin.taxrule.show'); + Route::post('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@create')->defaults('_config', [ + 'redirect' => 'admin.tax-categories.index' + ])->name('admin.tax-categories.create'); - Route::post('taxrule/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@create')->defaults('_config', [ - 'redirect' => 'admin.taxrule.index' - ])->name('admin.taxrule.create'); + Route::get('/tax-categories/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@edit')->defaults('_config', [ + 'view' => 'admin::tax.tax-categories.edit' + ])->name('admin.tax-categories.edit'); - Route::get('/taxrule/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@edit')->defaults('_config', [ - 'view' => 'admin::tax.taxrule.edit.edit' - ])->name('admin.taxrule.edit'); + Route::put('/tax-categories/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@update')->defaults('_config', [ + 'redirect' => 'admin.tax-categories.index' + ])->name('admin.tax-categories.update'); - Route::put('/taxrule/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@update')->defaults('_config', [ - 'redirect' => 'admin.taxrule.index' - ])->name('admin.taxrule.update'); + //tax rule ends - //tax rule ends - //tax rate + //tax rate + Route::get('tax-rates', 'Webkul\Tax\Http\Controllers\TaxRateController@index')->defaults('_config', [ + 'view' => 'admin::tax.tax-rates.index' + ])->name('admin.tax-rates.index'); - Route::get('taxrate', 'Webkul\Tax\Http\Controllers\TaxRateController@index')->defaults('_config', [ - 'view' => 'admin::tax.taxrate.index' - ])->name('admin.taxrate.index'); + Route::get('tax-rates/create', 'Webkul\Tax\Http\Controllers\TaxRateController@show')->defaults('_config', [ + 'view' => 'admin::tax.tax-rates.create' + ])->name('admin.tax-rates.show'); - Route::get('taxrate/create', 'Webkul\Tax\Http\Controllers\TaxRateController@show')->defaults('_config', [ - 'view' => 'admin::tax.taxrate.create.taxrate' - ])->name('admin.taxrate.show'); + Route::post('tax-rates/create', 'Webkul\Tax\Http\Controllers\TaxRateController@create')->defaults('_config', [ + 'redirect' => 'admin.tax-rates.index' + ])->name('admin.tax-rates.create'); - Route::post('taxrate/create', 'Webkul\Tax\Http\Controllers\TaxRateController@create')->defaults('_config', [ - 'redirect' => 'admin.taxrate.index' - ])->name('admin.taxrate.create'); + Route::get('tax-rates/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@edit')->defaults('_config', [ + 'view' => 'admin::tax.tax-rates.edit' + ])->name('admin.tax-rates.store'); - Route::get('taxrate/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@edit')->defaults('_config', [ - 'view' => 'admin::tax.taxrate.edit.edit' - ])->name('admin.taxrate.store'); - - Route::put('taxrate/update/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@update')->defaults('_config', [ - 'redirect' => 'admin.taxrate.index' - ])->name('admin.taxrate.update'); - }); + Route::put('tax-rates/update/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@update')->defaults('_config', [ + 'redirect' => 'admin.tax-rates.index' + ])->name('admin.tax-rates.update'); //tax rate ends }); }); diff --git a/packages/Webkul/Admin/src/Providers/EventServiceProvider.php b/packages/Webkul/Admin/src/Providers/EventServiceProvider.php index e54df6b84..6e857bbbe 100644 --- a/packages/Webkul/Admin/src/Providers/EventServiceProvider.php +++ b/packages/Webkul/Admin/src/Providers/EventServiceProvider.php @@ -68,21 +68,19 @@ class EventServiceProvider extends ServiceProvider $menu->add('configuration.account', 'My Account', 'admin.account.edit', 1); - $menu->add('settings', 'Settings', 'admin.countries.index', 6, 'settings-icon'); + $menu->add('settings', 'Settings', 'admin.locales.index', 6, 'settings-icon'); - $menu->add('settings.countries', 'Countries', 'admin.countries.index', 1, ''); + $menu->add('settings.locales', 'Locales', 'admin.locales.index', 1, ''); - $menu->add('settings.locales', 'Locales', 'admin.locales.index', 2, ''); + $menu->add('settings.currencies', 'Currencies', 'admin.currencies.index', 2, ''); - $menu->add('settings.currencies', 'Currencies', 'admin.currencies.index', 3, ''); + $menu->add('settings.exchange_rates', 'Exchange Rates', 'admin.exchange_rates.index', 3, ''); - $menu->add('settings.exchange_rates', 'Exchange Rates', 'admin.exchange_rates.index', 4, ''); - - $menu->add('settings.inventory_sources', 'Inventory Sources', 'admin.inventory_sources.index', 5, ''); + $menu->add('settings.inventory_sources', 'Inventory Sources', 'admin.inventory_sources.index', 4, ''); $menu->add('settings.channels', 'Channels', 'admin.channels.index', 5, ''); - $menu->add('settings.users', 'Users', 'admin.users.index', 7, ''); + $menu->add('settings.users', 'Users', 'admin.users.index', 6, ''); $menu->add('settings.users.users', 'Users', 'admin.users.index', 1, ''); @@ -90,11 +88,11 @@ class EventServiceProvider extends ServiceProvider $menu->add('settings.sliders', 'Create Sliders', 'admin.sliders.index', 8, ''); - $menu->add('settings.tax', 'Taxes', 'admin.taxrule.index', 9, ''); + $menu->add('settings.tax', 'Taxes', 'admin.tax-categories.index', 9, ''); - $menu->add('settings.tax.taxrule', 'Add Tax Category', 'admin.taxrule.index', 1, ''); + $menu->add('settings.tax.tax-categories', 'Add Tax Category', 'admin.tax-categories.index', 1, ''); - $menu->add('settings.tax.taxrate', 'Add Tax Rates', 'admin.taxrate.index', 2, ''); + $menu->add('settings.tax.tax-rates', 'Add Tax Rates', 'admin.tax-rates.index', 2, ''); }); } diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 93043405f..c7062982d 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -2,7 +2,9 @@ return [ 'common' => [ - 'no-result-found' => 'We couldn\'t find any records.' + 'no-result-found' => 'We couldn\'t find any records.', + 'country' => 'Country', + 'state' => 'State' ], 'account' => [ 'header-title' => 'My Account', @@ -260,7 +262,7 @@ return [ 'add-title' => 'Add Tax Category' ], - 'taxrule' => [ + 'tax-categories' => [ 'title' => 'Add Tax Category', 'create' => 'Create Tax Category', 'general' => 'Tax Category', @@ -275,7 +277,7 @@ return [ ] ], - 'taxrate' => [ + 'tax-rates' => [ 'title' => 'Add Tax Rate', 'general' => 'Tax Rate', 'identifier' => 'Identifier', diff --git a/packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php b/packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php new file mode 100644 index 000000000..7dbf7505b --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php @@ -0,0 +1,25 @@ +
+ + +
+ +
+ + +
+ +@push('scripts') + + + +@endpush \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php b/packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php new file mode 100644 index 000000000..0e9856886 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php @@ -0,0 +1,28 @@ +
+ country ?> + + + + +
+ +
+ + +
+ +@push('scripts') + + + +@endpush \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/settings/countries/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/countries/create.blade.php deleted file mode 100644 index 2ff8fef17..000000000 --- a/packages/Webkul/Admin/src/Resources/views/settings/countries/create.blade.php +++ /dev/null @@ -1,43 +0,0 @@ -@extends('admin::layouts.content') - -@section('content') -
- -
- - -
-
- @csrf() - - -
-
- - - @{{ errors.first('code') }} -
- -
- - - @{{ errors.first('name') }} -
-
-
- -
-
-
-
-@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/settings/countries/index.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/countries/index.blade.php deleted file mode 100644 index 571bf7471..000000000 --- a/packages/Webkul/Admin/src/Resources/views/settings/countries/index.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -@extends('admin::layouts.content') - -@section('content') -
- - -
- @inject('countries','Webkul\Admin\DataGrids\CountryDataGrid') - {!! $countries->render() !!} -
-
-@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php index 5d35c6db4..fc4c9c493 100644 --- a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php @@ -100,16 +100,7 @@
-
- - -
+ @include ('admin::common.create-country-state')
diff --git a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php index 0177f5da3..71b752595 100644 --- a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php @@ -101,22 +101,7 @@
-
- country ?> - - -
- -
- - -
+ @include ('admin::common.edit-country-state', ['model' => $inventorySource])
diff --git a/packages/Webkul/Admin/src/Resources/views/tax/taxrule/create/create.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php similarity index 83% rename from packages/Webkul/Admin/src/Resources/views/tax/taxrule/create/create.blade.php rename to packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php index d82924833..3c1d04b0d 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/taxrule/create/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php @@ -1,20 +1,20 @@ @extends('admin::layouts.content') @section('page_title') - {{ __('admin::app.configuration.taxrule.title') }} + {{ __('admin::app.configuration.tax-categories.title') }} @stop @section('content')
-
+ @@ -22,7 +22,7 @@
@csrf()
- + @@ -46,7 +46,7 @@
- + @@ -54,7 +54,7 @@
- + @@ -62,7 +62,7 @@
- + @foreach(core()->getAllChannels() as $channelModel) @@ -43,7 +43,7 @@
- + @@ -51,7 +51,7 @@
- + @@ -59,7 +59,7 @@
- + @@ -67,7 +67,7 @@
- + @inject('taxRates', 'Webkul\Core\Repositories\TaxRatesRepository') diff --git a/packages/Webkul/Admin/src/Resources/views/tax/taxrule/index.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/index.blade.php similarity index 67% rename from packages/Webkul/Admin/src/Resources/views/tax/taxrule/index.blade.php rename to packages/Webkul/Admin/src/Resources/views/tax/tax-categories/index.blade.php index e381dede6..6e0abe990 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/taxrule/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/index.blade.php @@ -8,15 +8,15 @@
- @inject('taxrule','Webkul\Admin\DataGrids\TaxRuleDataGrid') - {!! $taxrule->render() !!} + @inject('taxCategories','Webkul\Admin\DataGrids\TaxRuleDataGrid') + {!! $taxCategories->render() !!}
@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php new file mode 100644 index 000000000..22ba1255a --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php @@ -0,0 +1,126 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.configuration.tax-rates.title') }} +@stop + +@section('content') +
+ + + +
+
+ @csrf() + +
+ + + + + @{{ errors.first('identifier') }} +
+ +
+ + + + + @{{ errors.first('state') }} +
+ +
+ + + + + @{{ errors.first('country') }} +
+ +
+ + + + + + Enable Zip Range + +
+ +
+ + + + + @{{ errors.first('zip_code') }} +
+ +
+ + + + + @{{ errors.first('zip_from') }} +
+ +
+ + + + + @{{ errors.first('zip_to') }} +
+ +
+ + + + + @{{ errors.first('tax_rate') }} +
+ +
+
+ +
+ @push('scripts') + + @endpush +@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/tax/taxrate/edit/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php similarity index 83% rename from packages/Webkul/Admin/src/Resources/views/tax/taxrate/edit/edit.blade.php rename to packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php index 10608bb21..64692695d 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/taxrate/edit/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php @@ -1,20 +1,20 @@ @extends('admin::layouts.content') @section('page_title') - {{ __('admin::app.configuration.taxrate.title') }} + {{ __('admin::app.configuration.tax-rates.title') }} @stop @section('content')
-
+ @@ -23,11 +23,11 @@
@method('PUT') @csrf() - +
- + @@ -45,7 +45,7 @@
- + @@ -53,7 +53,7 @@
- + @@ -61,7 +61,7 @@
- + @@ -69,7 +69,7 @@
- + @@ -77,7 +77,7 @@
- + diff --git a/packages/Webkul/Admin/src/Resources/views/tax/taxrate/index.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/index.blade.php similarity index 60% rename from packages/Webkul/Admin/src/Resources/views/tax/taxrate/index.blade.php rename to packages/Webkul/Admin/src/Resources/views/tax/tax-rates/index.blade.php index 940bb8427..aa9d6fd38 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/taxrate/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/index.blade.php @@ -1,19 +1,19 @@ @extends('admin::layouts.content') @section('page_title') - {{ __('admin::app.configuration.taxrate.title') }} + {{ __('admin::app.configuration.tax-rates.title') }} @stop @section('content')
diff --git a/packages/Webkul/Admin/src/Resources/views/tax/taxrate/create/taxrate.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/taxrate/create/taxrate.blade.php deleted file mode 100644 index 95e98a59c..000000000 --- a/packages/Webkul/Admin/src/Resources/views/tax/taxrate/create/taxrate.blade.php +++ /dev/null @@ -1,126 +0,0 @@ -@extends('admin::layouts.content') - -@section('page_title') - {{ __('admin::app.configuration.taxrate.title') }} -@stop - -@section('content') -
- - - -
-
- @csrf() - -
- - - - - @{{ errors.first('identifier') }} -
- -
- - - - - @{{ errors.first('state') }} -
- -
- - - - - @{{ errors.first('country') }} -
- -
- - - - - - Enable Zip Range - -
- -
- - - - - @{{ errors.first('zip_code') }} -
- -
- - - - - @{{ errors.first('zip_from') }} -
- -
- - - - - @{{ errors.first('zip_to') }} -
- -
- - - - - @{{ errors.first('tax_rate') }} -
- -
-
- -
- @push('scripts') - - @endpush -@stop \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 37a686572..2d8e3bb84 100644 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -153,7 +153,7 @@ class Cart { $itemData = $this->prepareItemData($id, $data); - if($itemData == false) { + if(!$itemData) { return false; } diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index 90722168e..342b6e727 100644 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -10,8 +10,9 @@ use Webkul\Core\Models\TaxCategory as TaxCategory; use Webkul\Core\Models\TaxRate as TaxRate; use Webkul\Core\Repositories\CurrencyRepository; use Webkul\Core\Repositories\ExchangeRateRepository; +use Webkul\Core\Repositories\CountryRepository; +use Webkul\Core\Repositories\CountryStateRepository; use Illuminate\Support\Facades\Config; -use PragmaRX\Countries\Package\Countries; class Core { @@ -29,21 +30,43 @@ class Core */ protected $exchangeRateRepository; + /** + * CountryRepository model + * + * @var mixed + */ + protected $countryRepository; + + /** + * CountryStateRepository model + * + * @var mixed + */ + protected $countryStateRepository; + /** * Create a new instance. * * @param Webkul\Core\Repositories\CurrencyRepository $currencyRepository * @param Webkul\Core\Repositories\ExchangeRateRepository $exchangeRateRepository + * @param Webkul\Core\Repositories\CountryRepository $countryRepository + * @param Webkul\Core\Repositories\CountryStateRepository $countryStateRepository * @return void */ public function __construct( CurrencyRepository $currencyRepository, - ExchangeRateRepository $exchangeRateRepository + ExchangeRateRepository $exchangeRateRepository, + CountryRepository $countryRepository, + CountryStateRepository $countryStateRepository ) { $this->currencyRepository = $currencyRepository; $this->exchangeRateRepository = $exchangeRateRepository; + + $this->countryRepository = $countryRepository; + + $this->countryStateRepository = $countryStateRepository; } /** @@ -451,9 +474,7 @@ class Core */ public function countries() { - $countries = new Countries; - - return $countries->all()->pluck('name.common', 'cca2'); + return $this->countryRepository->all(); } /** @@ -463,14 +484,7 @@ class Core */ public function states($countryCode) { - $countries = new Countries; - - return $countries->where('cca2', $countryCode) - ->first() - ->hydrateStates() - ->states - ->sortBy('name') - ->pluck('name', 'postal'); + return $this->countryStateRepository->findByField('country_code', $countryCode); } /** @@ -482,8 +496,8 @@ class Core { $collection = []; - foreach ($this->countries() as $countryCode => $countryName) { - $collection[$countryCode] = $this->states($countryCode)->toArray(); + foreach ($this->countries() as $country) { + $collection[$country->code] = $this->states($country->code)->toArray(); } return $collection; diff --git a/packages/Webkul/Core/src/Data/countries.json b/packages/Webkul/Core/src/Data/countries.json new file mode 100644 index 000000000..c57294c51 --- /dev/null +++ b/packages/Webkul/Core/src/Data/countries.json @@ -0,0 +1,1277 @@ +[ + { + "id":1, + "code":"AF", + "name":"Afghanistan" + }, + { + "id":2, + "code":"AX", + "name":"\u00c5land Islands" + }, + { + "id":3, + "code":"AL", + "name":"Albania" + }, + { + "id":4, + "code":"DZ", + "name":"Algeria" + }, + { + "id":5, + "code":"AS", + "name":"American Samoa" + }, + { + "id":6, + "code":"AD", + "name":"Andorra" + }, + { + "id":7, + "code":"AO", + "name":"Angola" + }, + { + "id":8, + "code":"AI", + "name":"Anguilla" + }, + { + "id":9, + "code":"AQ", + "name":"Antarctica" + }, + { + "id":10, + "code":"AG", + "name":"Antigua & Barbuda" + }, + { + "id":11, + "code":"AR", + "name":"Argentina" + }, + { + "id":12, + "code":"AM", + "name":"Armenia" + }, + { + "id":13, + "code":"AW", + "name":"Aruba" + }, + { + "id":14, + "code":"AC", + "name":"Ascension Island" + }, + { + "id":15, + "code":"AU", + "name":"Australia" + }, + { + "id":16, + "code":"AT", + "name":"Austria" + }, + { + "id":17, + "code":"AZ", + "name":"Azerbaijan" + }, + { + "id":18, + "code":"BS", + "name":"Bahamas" + }, + { + "id":19, + "code":"BH", + "name":"Bahrain" + }, + { + "id":20, + "code":"BD", + "name":"Bangladesh" + }, + { + "id":21, + "code":"BB", + "name":"Barbados" + }, + { + "id":22, + "code":"BY", + "name":"Belarus" + }, + { + "id":23, + "code":"BE", + "name":"Belgium" + }, + { + "id":24, + "code":"BZ", + "name":"Belize" + }, + { + "id":25, + "code":"BJ", + "name":"Benin" + }, + { + "id":26, + "code":"BM", + "name":"Bermuda" + }, + { + "id":27, + "code":"BT", + "name":"Bhutan" + }, + { + "id":28, + "code":"BO", + "name":"Bolivia" + }, + { + "id":29, + "code":"BA", + "name":"Bosnia & Herzegovina" + }, + { + "id":30, + "code":"BW", + "name":"Botswana" + }, + { + "id":31, + "code":"BR", + "name":"Brazil" + }, + { + "id":32, + "code":"IO", + "name":"British Indian Ocean Territory" + }, + { + "id":33, + "code":"VG", + "name":"British Virgin Islands" + }, + { + "id":34, + "code":"BN", + "name":"Brunei" + }, + { + "id":35, + "code":"BG", + "name":"Bulgaria" + }, + { + "id":36, + "code":"BF", + "name":"Burkina Faso" + }, + { + "id":37, + "code":"BI", + "name":"Burundi" + }, + { + "id":38, + "code":"KH", + "name":"Cambodia" + }, + { + "id":39, + "code":"CM", + "name":"Cameroon" + }, + { + "id":40, + "code":"CA", + "name":"Canada" + }, + { + "id":41, + "code":"IC", + "name":"Canary Islands" + }, + { + "id":42, + "code":"CV", + "name":"Cape Verde" + }, + { + "id":43, + "code":"BQ", + "name":"Caribbean Netherlands" + }, + { + "id":44, + "code":"KY", + "name":"Cayman Islands" + }, + { + "id":45, + "code":"CF", + "name":"Central African Republic" + }, + { + "id":46, + "code":"EA", + "name":"Ceuta & Melilla" + }, + { + "id":47, + "code":"TD", + "name":"Chad" + }, + { + "id":48, + "code":"CL", + "name":"Chile" + }, + { + "id":49, + "code":"CN", + "name":"China" + }, + { + "id":50, + "code":"CX", + "name":"Christmas Island" + }, + { + "id":51, + "code":"CC", + "name":"Cocos (Keeling) Islands" + }, + { + "id":52, + "code":"CO", + "name":"Colombia" + }, + { + "id":53, + "code":"KM", + "name":"Comoros" + }, + { + "id":54, + "code":"CG", + "name":"Congo - Brazzaville" + }, + { + "id":55, + "code":"CD", + "name":"Congo - Kinshasa" + }, + { + "id":56, + "code":"CK", + "name":"Cook Islands" + }, + { + "id":57, + "code":"CR", + "name":"Costa Rica" + }, + { + "id":58, + "code":"CI", + "name":"C\u00f4te d\u2019Ivoire" + }, + { + "id":59, + "code":"HR", + "name":"Croatia" + }, + { + "id":60, + "code":"CU", + "name":"Cuba" + }, + { + "id":61, + "code":"CW", + "name":"Cura\u00e7ao" + }, + { + "id":62, + "code":"CY", + "name":"Cyprus" + }, + { + "id":63, + "code":"CZ", + "name":"Czechia" + }, + { + "id":64, + "code":"DK", + "name":"Denmark" + }, + { + "id":65, + "code":"DG", + "name":"Diego Garcia" + }, + { + "id":66, + "code":"DJ", + "name":"Djibouti" + }, + { + "id":67, + "code":"DM", + "name":"Dominica" + }, + { + "id":68, + "code":"DO", + "name":"Dominican Republic" + }, + { + "id":69, + "code":"EC", + "name":"Ecuador" + }, + { + "id":70, + "code":"EG", + "name":"Egypt" + }, + { + "id":71, + "code":"SV", + "name":"El Salvador" + }, + { + "id":72, + "code":"GQ", + "name":"Equatorial Guinea" + }, + { + "id":73, + "code":"ER", + "name":"Eritrea" + }, + { + "id":74, + "code":"EE", + "name":"Estonia" + }, + { + "id":75, + "code":"ET", + "name":"Ethiopia" + }, + { + "id":76, + "code":"EZ", + "name":"Eurozone" + }, + { + "id":77, + "code":"FK", + "name":"Falkland Islands" + }, + { + "id":78, + "code":"FO", + "name":"Faroe Islands" + }, + { + "id":79, + "code":"FJ", + "name":"Fiji" + }, + { + "id":80, + "code":"FI", + "name":"Finland" + }, + { + "id":81, + "code":"FR", + "name":"France" + }, + { + "id":82, + "code":"GF", + "name":"French Guiana" + }, + { + "id":83, + "code":"PF", + "name":"French Polynesia" + }, + { + "id":84, + "code":"TF", + "name":"French Southern Territories" + }, + { + "id":85, + "code":"GA", + "name":"Gabon" + }, + { + "id":86, + "code":"GM", + "name":"Gambia" + }, + { + "id":87, + "code":"GE", + "name":"Georgia" + }, + { + "id":88, + "code":"DE", + "name":"Germany" + }, + { + "id":89, + "code":"GH", + "name":"Ghana" + }, + { + "id":90, + "code":"GI", + "name":"Gibraltar" + }, + { + "id":91, + "code":"GR", + "name":"Greece" + }, + { + "id":92, + "code":"GL", + "name":"Greenland" + }, + { + "id":93, + "code":"GD", + "name":"Grenada" + }, + { + "id":94, + "code":"GP", + "name":"Guadeloupe" + }, + { + "id":95, + "code":"GU", + "name":"Guam" + }, + { + "id":96, + "code":"GT", + "name":"Guatemala" + }, + { + "id":97, + "code":"GG", + "name":"Guernsey" + }, + { + "id":98, + "code":"GN", + "name":"Guinea" + }, + { + "id":99, + "code":"GW", + "name":"Guinea-Bissau" + }, + { + "id":100, + "code":"GY", + "name":"Guyana" + }, + { + "id":101, + "code":"HT", + "name":"Haiti" + }, + { + "id":102, + "code":"HN", + "name":"Honduras" + }, + { + "id":103, + "code":"HK", + "name":"Hong Kong SAR China" + }, + { + "id":104, + "code":"HU", + "name":"Hungary" + }, + { + "id":105, + "code":"IS", + "name":"Iceland" + }, + { + "id":106, + "code":"IN", + "name":"India" + }, + { + "id":107, + "code":"ID", + "name":"Indonesia" + }, + { + "id":108, + "code":"IR", + "name":"Iran" + }, + { + "id":109, + "code":"IQ", + "name":"Iraq" + }, + { + "id":110, + "code":"IE", + "name":"Ireland" + }, + { + "id":111, + "code":"IM", + "name":"Isle of Man" + }, + { + "id":112, + "code":"IL", + "name":"Israel" + }, + { + "id":113, + "code":"IT", + "name":"Italy" + }, + { + "id":114, + "code":"JM", + "name":"Jamaica" + }, + { + "id":115, + "code":"JP", + "name":"Japan" + }, + { + "id":116, + "code":"JE", + "name":"Jersey" + }, + { + "id":117, + "code":"JO", + "name":"Jordan" + }, + { + "id":118, + "code":"KZ", + "name":"Kazakhstan" + }, + { + "id":119, + "code":"KE", + "name":"Kenya" + }, + { + "id":120, + "code":"KI", + "name":"Kiribati" + }, + { + "id":121, + "code":"XK", + "name":"Kosovo" + }, + { + "id":122, + "code":"KW", + "name":"Kuwait" + }, + { + "id":123, + "code":"KG", + "name":"Kyrgyzstan" + }, + { + "id":124, + "code":"LA", + "name":"Laos" + }, + { + "id":125, + "code":"LV", + "name":"Latvia" + }, + { + "id":126, + "code":"LB", + "name":"Lebanon" + }, + { + "id":127, + "code":"LS", + "name":"Lesotho" + }, + { + "id":128, + "code":"LR", + "name":"Liberia" + }, + { + "id":129, + "code":"LY", + "name":"Libya" + }, + { + "id":130, + "code":"LI", + "name":"Liechtenstein" + }, + { + "id":131, + "code":"LT", + "name":"Lithuania" + }, + { + "id":132, + "code":"LU", + "name":"Luxembourg" + }, + { + "id":133, + "code":"MO", + "name":"Macau SAR China" + }, + { + "id":134, + "code":"MK", + "name":"Macedonia" + }, + { + "id":135, + "code":"MG", + "name":"Madagascar" + }, + { + "id":136, + "code":"MW", + "name":"Malawi" + }, + { + "id":137, + "code":"MY", + "name":"Malaysia" + }, + { + "id":138, + "code":"MV", + "name":"Maldives" + }, + { + "id":139, + "code":"ML", + "name":"Mali" + }, + { + "id":140, + "code":"MT", + "name":"Malta" + }, + { + "id":141, + "code":"MH", + "name":"Marshall Islands" + }, + { + "id":142, + "code":"MQ", + "name":"Martinique" + }, + { + "id":143, + "code":"MR", + "name":"Mauritania" + }, + { + "id":144, + "code":"MU", + "name":"Mauritius" + }, + { + "id":145, + "code":"YT", + "name":"Mayotte" + }, + { + "id":146, + "code":"MX", + "name":"Mexico" + }, + { + "id":147, + "code":"FM", + "name":"Micronesia" + }, + { + "id":148, + "code":"MD", + "name":"Moldova" + }, + { + "id":149, + "code":"MC", + "name":"Monaco" + }, + { + "id":150, + "code":"MN", + "name":"Mongolia" + }, + { + "id":151, + "code":"ME", + "name":"Montenegro" + }, + { + "id":152, + "code":"MS", + "name":"Montserrat" + }, + { + "id":153, + "code":"MA", + "name":"Morocco" + }, + { + "id":154, + "code":"MZ", + "name":"Mozambique" + }, + { + "id":155, + "code":"MM", + "name":"Myanmar (Burma)" + }, + { + "id":156, + "code":"NA", + "name":"Namibia" + }, + { + "id":157, + "code":"NR", + "name":"Nauru" + }, + { + "id":158, + "code":"NP", + "name":"Nepal" + }, + { + "id":159, + "code":"NL", + "name":"Netherlands" + }, + { + "id":160, + "code":"NC", + "name":"New Caledonia" + }, + { + "id":161, + "code":"NZ", + "name":"New Zealand" + }, + { + "id":162, + "code":"NI", + "name":"Nicaragua" + }, + { + "id":163, + "code":"NE", + "name":"Niger" + }, + { + "id":164, + "code":"NG", + "name":"Nigeria" + }, + { + "id":165, + "code":"NU", + "name":"Niue" + }, + { + "id":166, + "code":"NF", + "name":"Norfolk Island" + }, + { + "id":167, + "code":"KP", + "name":"North Korea" + }, + { + "id":168, + "code":"MP", + "name":"Northern Mariana Islands" + }, + { + "id":169, + "code":"NO", + "name":"Norway" + }, + { + "id":170, + "code":"OM", + "name":"Oman" + }, + { + "id":171, + "code":"PK", + "name":"Pakistan" + }, + { + "id":172, + "code":"PW", + "name":"Palau" + }, + { + "id":173, + "code":"PS", + "name":"Palestinian Territories" + }, + { + "id":174, + "code":"PA", + "name":"Panama" + }, + { + "id":175, + "code":"PG", + "name":"Papua New Guinea" + }, + { + "id":176, + "code":"PY", + "name":"Paraguay" + }, + { + "id":177, + "code":"PE", + "name":"Peru" + }, + { + "id":178, + "code":"PH", + "name":"Philippines" + }, + { + "id":179, + "code":"PN", + "name":"Pitcairn Islands" + }, + { + "id":180, + "code":"PL", + "name":"Poland" + }, + { + "id":181, + "code":"PT", + "name":"Portugal" + }, + { + "id":182, + "code":"PR", + "name":"Puerto Rico" + }, + { + "id":183, + "code":"QA", + "name":"Qatar" + }, + { + "id":184, + "code":"RE", + "name":"R\u00e9union" + }, + { + "id":185, + "code":"RO", + "name":"Romania" + }, + { + "id":186, + "code":"RU", + "name":"Russia" + }, + { + "id":187, + "code":"RW", + "name":"Rwanda" + }, + { + "id":188, + "code":"WS", + "name":"Samoa" + }, + { + "id":189, + "code":"SM", + "name":"San Marino" + }, + { + "id":190, + "code":"ST", + "name":"S\u00e3o Tom\u00e9 & Pr\u00edncipe" + }, + { + "id":191, + "code":"SA", + "name":"Saudi Arabia" + }, + { + "id":192, + "code":"SN", + "name":"Senegal" + }, + { + "id":193, + "code":"RS", + "name":"Serbia" + }, + { + "id":194, + "code":"SC", + "name":"Seychelles" + }, + { + "id":195, + "code":"SL", + "name":"Sierra Leone" + }, + { + "id":196, + "code":"SG", + "name":"Singapore" + }, + { + "id":197, + "code":"SX", + "name":"Sint Maarten" + }, + { + "id":198, + "code":"SK", + "name":"Slovakia" + }, + { + "id":199, + "code":"SI", + "name":"Slovenia" + }, + { + "id":200, + "code":"SB", + "name":"Solomon Islands" + }, + { + "id":201, + "code":"SO", + "name":"Somalia" + }, + { + "id":202, + "code":"ZA", + "name":"South Africa" + }, + { + "id":203, + "code":"GS", + "name":"South Georgia & South Sandwich Islands" + }, + { + "id":204, + "code":"KR", + "name":"South Korea" + }, + { + "id":205, + "code":"SS", + "name":"South Sudan" + }, + { + "id":206, + "code":"ES", + "name":"Spain" + }, + { + "id":207, + "code":"LK", + "name":"Sri Lanka" + }, + { + "id":208, + "code":"BL", + "name":"St. Barth\u00e9lemy" + }, + { + "id":209, + "code":"SH", + "name":"St. Helena" + }, + { + "id":210, + "code":"KN", + "name":"St. Kitts & Nevis" + }, + { + "id":211, + "code":"LC", + "name":"St. Lucia" + }, + { + "id":212, + "code":"MF", + "name":"St. Martin" + }, + { + "id":213, + "code":"PM", + "name":"St. Pierre & Miquelon" + }, + { + "id":214, + "code":"VC", + "name":"St. Vincent & Grenadines" + }, + { + "id":215, + "code":"SD", + "name":"Sudan" + }, + { + "id":216, + "code":"SR", + "name":"Suriname" + }, + { + "id":217, + "code":"SJ", + "name":"Svalbard & Jan Mayen" + }, + { + "id":218, + "code":"SZ", + "name":"Swaziland" + }, + { + "id":219, + "code":"SE", + "name":"Sweden" + }, + { + "id":220, + "code":"CH", + "name":"Switzerland" + }, + { + "id":221, + "code":"SY", + "name":"Syria" + }, + { + "id":222, + "code":"TW", + "name":"Taiwan" + }, + { + "id":223, + "code":"TJ", + "name":"Tajikistan" + }, + { + "id":224, + "code":"TZ", + "name":"Tanzania" + }, + { + "id":225, + "code":"TH", + "name":"Thailand" + }, + { + "id":226, + "code":"TL", + "name":"Timor-Leste" + }, + { + "id":227, + "code":"TG", + "name":"Togo" + }, + { + "id":228, + "code":"TK", + "name":"Tokelau" + }, + { + "id":229, + "code":"TO", + "name":"Tonga" + }, + { + "id":230, + "code":"TT", + "name":"Trinidad & Tobago" + }, + { + "id":231, + "code":"TA", + "name":"Tristan da Cunha" + }, + { + "id":232, + "code":"TN", + "name":"Tunisia" + }, + { + "id":233, + "code":"TR", + "name":"Turkey" + }, + { + "id":234, + "code":"TM", + "name":"Turkmenistan" + }, + { + "id":235, + "code":"TC", + "name":"Turks & Caicos Islands" + }, + { + "id":236, + "code":"TV", + "name":"Tuvalu" + }, + { + "id":237, + "code":"UM", + "name":"U.S. Outlying Islands" + }, + { + "id":238, + "code":"VI", + "name":"U.S. Virgin Islands" + }, + { + "id":239, + "code":"UG", + "name":"Uganda" + }, + { + "id":240, + "code":"UA", + "name":"Ukraine" + }, + { + "id":241, + "code":"AE", + "name":"United Arab Emirates" + }, + { + "id":242, + "code":"GB", + "name":"United Kingdom" + }, + { + "id":243, + "code":"UN", + "name":"United Nations" + }, + { + "id":244, + "code":"US", + "name":"United States" + }, + { + "id":245, + "code":"UY", + "name":"Uruguay" + }, + { + "id":246, + "code":"UZ", + "name":"Uzbekistan" + }, + { + "id":247, + "code":"VU", + "name":"Vanuatu" + }, + { + "id":248, + "code":"VA", + "name":"Vatican City" + }, + { + "id":249, + "code":"VE", + "name":"Venezuela" + }, + { + "id":250, + "code":"VN", + "name":"Vietnam" + }, + { + "id":251, + "code":"WF", + "name":"Wallis & Futuna" + }, + { + "id":252, + "code":"EH", + "name":"Western Sahara" + }, + { + "id":253, + "code":"YE", + "name":"Yemen" + }, + { + "id":254, + "code":"ZM", + "name":"Zambia" + }, + { + "id":255, + "code":"ZW", + "name":"Zimbabwe" + } +] \ No newline at end of file diff --git a/packages/Webkul/Core/src/Data/states.json b/packages/Webkul/Core/src/Data/states.json new file mode 100644 index 000000000..8efb1bd2a --- /dev/null +++ b/packages/Webkul/Core/src/Data/states.json @@ -0,0 +1,3978 @@ +[ + { + "id":1, + "country_code":"US", + "code":"AL", + "default_name":"Alabama", + "country_id":244 + }, + { + "id":2, + "country_code":"US", + "code":"AK", + "default_name":"Alaska", + "country_id":244 + }, + { + "id":3, + "country_code":"US", + "code":"AS", + "default_name":"American Samoa", + "country_id":244 + }, + { + "id":4, + "country_code":"US", + "code":"AZ", + "default_name":"Arizona", + "country_id":244 + }, + { + "id":5, + "country_code":"US", + "code":"AR", + "default_name":"Arkansas", + "country_id":244 + }, + { + "id":6, + "country_code":"US", + "code":"AE", + "default_name":"Armed Forces Africa", + "country_id":244 + }, + { + "id":7, + "country_code":"US", + "code":"AA", + "default_name":"Armed Forces Americas", + "country_id":244 + }, + { + "id":8, + "country_code":"US", + "code":"AE", + "default_name":"Armed Forces Canada", + "country_id":244 + }, + { + "id":9, + "country_code":"US", + "code":"AE", + "default_name":"Armed Forces Europe", + "country_id":244 + }, + { + "id":10, + "country_code":"US", + "code":"AE", + "default_name":"Armed Forces Middle East", + "country_id":244 + }, + { + "id":11, + "country_code":"US", + "code":"AP", + "default_name":"Armed Forces Pacific", + "country_id":244 + }, + { + "id":12, + "country_code":"US", + "code":"CA", + "default_name":"California", + "country_id":244 + }, + { + "id":13, + "country_code":"US", + "code":"CO", + "default_name":"Colorado", + "country_id":244 + }, + { + "id":14, + "country_code":"US", + "code":"CT", + "default_name":"Connecticut", + "country_id":244 + }, + { + "id":15, + "country_code":"US", + "code":"DE", + "default_name":"Delaware", + "country_id":244 + }, + { + "id":16, + "country_code":"US", + "code":"DC", + "default_name":"District of Columbia", + "country_id":244 + }, + { + "id":17, + "country_code":"US", + "code":"FM", + "default_name":"Federated States Of Micronesia", + "country_id":244 + }, + { + "id":18, + "country_code":"US", + "code":"FL", + "default_name":"Florida", + "country_id":244 + }, + { + "id":19, + "country_code":"US", + "code":"GA", + "default_name":"Georgia", + "country_id":244 + }, + { + "id":20, + "country_code":"US", + "code":"GU", + "default_name":"Guam", + "country_id":244 + }, + { + "id":21, + "country_code":"US", + "code":"HI", + "default_name":"Hawaii", + "country_id":244 + }, + { + "id":22, + "country_code":"US", + "code":"ID", + "default_name":"Idaho", + "country_id":244 + }, + { + "id":23, + "country_code":"US", + "code":"IL", + "default_name":"Illinois", + "country_id":244 + }, + { + "id":24, + "country_code":"US", + "code":"IN", + "default_name":"Indiana", + "country_id":244 + }, + { + "id":25, + "country_code":"US", + "code":"IA", + "default_name":"Iowa", + "country_id":244 + }, + { + "id":26, + "country_code":"US", + "code":"KS", + "default_name":"Kansas", + "country_id":244 + }, + { + "id":27, + "country_code":"US", + "code":"KY", + "default_name":"Kentucky", + "country_id":244 + }, + { + "id":28, + "country_code":"US", + "code":"LA", + "default_name":"Louisiana", + "country_id":244 + }, + { + "id":29, + "country_code":"US", + "code":"ME", + "default_name":"Maine", + "country_id":244 + }, + { + "id":30, + "country_code":"US", + "code":"MH", + "default_name":"Marshall Islands", + "country_id":244 + }, + { + "id":31, + "country_code":"US", + "code":"MD", + "default_name":"Maryland", + "country_id":244 + }, + { + "id":32, + "country_code":"US", + "code":"MA", + "default_name":"Massachusetts", + "country_id":244 + }, + { + "id":33, + "country_code":"US", + "code":"MI", + "default_name":"Michigan", + "country_id":244 + }, + { + "id":34, + "country_code":"US", + "code":"MN", + "default_name":"Minnesota", + "country_id":244 + }, + { + "id":35, + "country_code":"US", + "code":"MS", + "default_name":"Mississippi", + "country_id":244 + }, + { + "id":36, + "country_code":"US", + "code":"MO", + "default_name":"Missouri", + "country_id":244 + }, + { + "id":37, + "country_code":"US", + "code":"MT", + "default_name":"Montana", + "country_id":244 + }, + { + "id":38, + "country_code":"US", + "code":"NE", + "default_name":"Nebraska", + "country_id":244 + }, + { + "id":39, + "country_code":"US", + "code":"NV", + "default_name":"Nevada", + "country_id":244 + }, + { + "id":40, + "country_code":"US", + "code":"NH", + "default_name":"New Hampshire", + "country_id":244 + }, + { + "id":41, + "country_code":"US", + "code":"NJ", + "default_name":"New Jersey", + "country_id":244 + }, + { + "id":42, + "country_code":"US", + "code":"NM", + "default_name":"New Mexico", + "country_id":244 + }, + { + "id":43, + "country_code":"US", + "code":"NY", + "default_name":"New York", + "country_id":244 + }, + { + "id":44, + "country_code":"US", + "code":"NC", + "default_name":"North Carolina", + "country_id":244 + }, + { + "id":45, + "country_code":"US", + "code":"ND", + "default_name":"North Dakota", + "country_id":244 + }, + { + "id":46, + "country_code":"US", + "code":"MP", + "default_name":"Northern Mariana Islands", + "country_id":244 + }, + { + "id":47, + "country_code":"US", + "code":"OH", + "default_name":"Ohio", + "country_id":244 + }, + { + "id":48, + "country_code":"US", + "code":"OK", + "default_name":"Oklahoma", + "country_id":244 + }, + { + "id":49, + "country_code":"US", + "code":"OR", + "default_name":"Oregon", + "country_id":244 + }, + { + "id":50, + "country_code":"US", + "code":"PW", + "default_name":"Palau", + "country_id":244 + }, + { + "id":51, + "country_code":"US", + "code":"PA", + "default_name":"Pennsylvania", + "country_id":244 + }, + { + "id":52, + "country_code":"US", + "code":"PR", + "default_name":"Puerto Rico", + "country_id":244 + }, + { + "id":53, + "country_code":"US", + "code":"RI", + "default_name":"Rhode Island", + "country_id":244 + }, + { + "id":54, + "country_code":"US", + "code":"SC", + "default_name":"South Carolina", + "country_id":244 + }, + { + "id":55, + "country_code":"US", + "code":"SD", + "default_name":"South Dakota", + "country_id":244 + }, + { + "id":56, + "country_code":"US", + "code":"TN", + "default_name":"Tennessee", + "country_id":244 + }, + { + "id":57, + "country_code":"US", + "code":"TX", + "default_name":"Texas", + "country_id":244 + }, + { + "id":58, + "country_code":"US", + "code":"UT", + "default_name":"Utah", + "country_id":244 + }, + { + "id":59, + "country_code":"US", + "code":"VT", + "default_name":"Vermont", + "country_id":244 + }, + { + "id":60, + "country_code":"US", + "code":"VI", + "default_name":"Virgin Islands", + "country_id":244 + }, + { + "id":61, + "country_code":"US", + "code":"VA", + "default_name":"Virginia", + "country_id":244 + }, + { + "id":62, + "country_code":"US", + "code":"WA", + "default_name":"Washington", + "country_id":244 + }, + { + "id":63, + "country_code":"US", + "code":"WV", + "default_name":"West Virginia", + "country_id":244 + }, + { + "id":64, + "country_code":"US", + "code":"WI", + "default_name":"Wisconsin", + "country_id":244 + }, + { + "id":65, + "country_code":"US", + "code":"WY", + "default_name":"Wyoming", + "country_id":244 + }, + { + "id":66, + "country_code":"CA", + "code":"AB", + "default_name":"Alberta", + "country_id":40 + }, + { + "id":67, + "country_code":"CA", + "code":"BC", + "default_name":"British Columbia", + "country_id":40 + }, + { + "id":68, + "country_code":"CA", + "code":"MB", + "default_name":"Manitoba", + "country_id":40 + }, + { + "id":69, + "country_code":"CA", + "code":"NL", + "default_name":"Newfoundland and Labrador", + "country_id":40 + }, + { + "id":70, + "country_code":"CA", + "code":"NB", + "default_name":"New Brunswick", + "country_id":40 + }, + { + "id":71, + "country_code":"CA", + "code":"NS", + "default_name":"Nova Scotia", + "country_id":40 + }, + { + "id":72, + "country_code":"CA", + "code":"NT", + "default_name":"Northwest Territories", + "country_id":40 + }, + { + "id":73, + "country_code":"CA", + "code":"NU", + "default_name":"Nunavut", + "country_id":40 + }, + { + "id":74, + "country_code":"CA", + "code":"ON", + "default_name":"Ontario", + "country_id":40 + }, + { + "id":75, + "country_code":"CA", + "code":"PE", + "default_name":"Prince Edward Island", + "country_id":40 + }, + { + "id":76, + "country_code":"CA", + "code":"QC", + "default_name":"Quebec", + "country_id":40 + }, + { + "id":77, + "country_code":"CA", + "code":"SK", + "default_name":"Saskatchewan", + "country_id":40 + }, + { + "id":78, + "country_code":"CA", + "code":"YT", + "default_name":"Yukon Territory", + "country_id":40 + }, + { + "id":79, + "country_code":"DE", + "code":"NDS", + "default_name":"Niedersachsen", + "country_id":88 + }, + { + "id":80, + "country_code":"DE", + "code":"BAW", + "default_name":"Baden-W\u00fcrttemberg", + "country_id":88 + }, + { + "id":81, + "country_code":"DE", + "code":"BAY", + "default_name":"Bayern", + "country_id":88 + }, + { + "id":82, + "country_code":"DE", + "code":"BER", + "default_name":"Berlin", + "country_id":88 + }, + { + "id":83, + "country_code":"DE", + "code":"BRG", + "default_name":"Brandenburg", + "country_id":88 + }, + { + "id":84, + "country_code":"DE", + "code":"BRE", + "default_name":"Bremen", + "country_id":88 + }, + { + "id":85, + "country_code":"DE", + "code":"HAM", + "default_name":"Hamburg", + "country_id":88 + }, + { + "id":86, + "country_code":"DE", + "code":"HES", + "default_name":"Hessen", + "country_id":88 + }, + { + "id":87, + "country_code":"DE", + "code":"MEC", + "default_name":"Mecklenburg-Vorpommern", + "country_id":88 + }, + { + "id":88, + "country_code":"DE", + "code":"NRW", + "default_name":"Nordrhein-Westfalen", + "country_id":88 + }, + { + "id":89, + "country_code":"DE", + "code":"RHE", + "default_name":"Rheinland-Pfalz", + "country_id":88 + }, + { + "id":90, + "country_code":"DE", + "code":"SAR", + "default_name":"Saarland", + "country_id":88 + }, + { + "id":91, + "country_code":"DE", + "code":"SAS", + "default_name":"Sachsen", + "country_id":88 + }, + { + "id":92, + "country_code":"DE", + "code":"SAC", + "default_name":"Sachsen-Anhalt", + "country_id":88 + }, + { + "id":93, + "country_code":"DE", + "code":"SCN", + "default_name":"Schleswig-Holstein", + "country_id":88 + }, + { + "id":94, + "country_code":"DE", + "code":"THE", + "default_name":"Th\u00fcringen", + "country_id":88 + }, + { + "id":95, + "country_code":"AT", + "code":"WI", + "default_name":"Wien", + "country_id":16 + }, + { + "id":96, + "country_code":"AT", + "code":"NO", + "default_name":"Nieder\u00f6sterreich", + "country_id":16 + }, + { + "id":97, + "country_code":"AT", + "code":"OO", + "default_name":"Ober\u00f6sterreich", + "country_id":16 + }, + { + "id":98, + "country_code":"AT", + "code":"SB", + "default_name":"Salzburg", + "country_id":16 + }, + { + "id":99, + "country_code":"AT", + "code":"KN", + "default_name":"K\u00e4rnten", + "country_id":16 + }, + { + "id":100, + "country_code":"AT", + "code":"ST", + "default_name":"Steiermark", + "country_id":16 + }, + { + "id":101, + "country_code":"AT", + "code":"TI", + "default_name":"Tirol", + "country_id":16 + }, + { + "id":102, + "country_code":"AT", + "code":"BL", + "default_name":"Burgenland", + "country_id":16 + }, + { + "id":103, + "country_code":"AT", + "code":"VB", + "default_name":"Vorarlberg", + "country_id":16 + }, + { + "id":104, + "country_code":"CH", + "code":"AG", + "default_name":"Aargau", + "country_id":220 + }, + { + "id":105, + "country_code":"CH", + "code":"AI", + "default_name":"Appenzell Innerrhoden", + "country_id":220 + }, + { + "id":106, + "country_code":"CH", + "code":"AR", + "default_name":"Appenzell Ausserrhoden", + "country_id":220 + }, + { + "id":107, + "country_code":"CH", + "code":"BE", + "default_name":"Bern", + "country_id":220 + }, + { + "id":108, + "country_code":"CH", + "code":"BL", + "default_name":"Basel-Landschaft", + "country_id":220 + }, + { + "id":109, + "country_code":"CH", + "code":"BS", + "default_name":"Basel-Stadt", + "country_id":220 + }, + { + "id":110, + "country_code":"CH", + "code":"FR", + "default_name":"Freiburg", + "country_id":220 + }, + { + "id":111, + "country_code":"CH", + "code":"GE", + "default_name":"Genf", + "country_id":220 + }, + { + "id":112, + "country_code":"CH", + "code":"GL", + "default_name":"Glarus", + "country_id":220 + }, + { + "id":113, + "country_code":"CH", + "code":"GR", + "default_name":"Graub\u00fcnden", + "country_id":220 + }, + { + "id":114, + "country_code":"CH", + "code":"JU", + "default_name":"Jura", + "country_id":220 + }, + { + "id":115, + "country_code":"CH", + "code":"LU", + "default_name":"Luzern", + "country_id":220 + }, + { + "id":116, + "country_code":"CH", + "code":"NE", + "default_name":"Neuenburg", + "country_id":220 + }, + { + "id":117, + "country_code":"CH", + "code":"NW", + "default_name":"Nidwalden", + "country_id":220 + }, + { + "id":118, + "country_code":"CH", + "code":"OW", + "default_name":"Obwalden", + "country_id":220 + }, + { + "id":119, + "country_code":"CH", + "code":"SG", + "default_name":"St. Gallen", + "country_id":220 + }, + { + "id":120, + "country_code":"CH", + "code":"SH", + "default_name":"Schaffhausen", + "country_id":220 + }, + { + "id":121, + "country_code":"CH", + "code":"SO", + "default_name":"Solothurn", + "country_id":220 + }, + { + "id":122, + "country_code":"CH", + "code":"SZ", + "default_name":"Schwyz", + "country_id":220 + }, + { + "id":123, + "country_code":"CH", + "code":"TG", + "default_name":"Thurgau", + "country_id":220 + }, + { + "id":124, + "country_code":"CH", + "code":"TI", + "default_name":"Tessin", + "country_id":220 + }, + { + "id":125, + "country_code":"CH", + "code":"UR", + "default_name":"Uri", + "country_id":220 + }, + { + "id":126, + "country_code":"CH", + "code":"VD", + "default_name":"Waadt", + "country_id":220 + }, + { + "id":127, + "country_code":"CH", + "code":"VS", + "default_name":"Wallis", + "country_id":220 + }, + { + "id":128, + "country_code":"CH", + "code":"ZG", + "default_name":"Zug", + "country_id":220 + }, + { + "id":129, + "country_code":"CH", + "code":"ZH", + "default_name":"Z\u00fcrich", + "country_id":220 + }, + { + "id":130, + "country_code":"ES", + "code":"A Coru\u0441a", + "default_name":"A Coru\u00f1a", + "country_id":206 + }, + { + "id":131, + "country_code":"ES", + "code":"Alava", + "default_name":"Alava", + "country_id":206 + }, + { + "id":132, + "country_code":"ES", + "code":"Albacete", + "default_name":"Albacete", + "country_id":206 + }, + { + "id":133, + "country_code":"ES", + "code":"Alicante", + "default_name":"Alicante", + "country_id":206 + }, + { + "id":134, + "country_code":"ES", + "code":"Almeria", + "default_name":"Almeria", + "country_id":206 + }, + { + "id":135, + "country_code":"ES", + "code":"Asturias", + "default_name":"Asturias", + "country_id":206 + }, + { + "id":136, + "country_code":"ES", + "code":"Avila", + "default_name":"Avila", + "country_id":206 + }, + { + "id":137, + "country_code":"ES", + "code":"Badajoz", + "default_name":"Badajoz", + "country_id":206 + }, + { + "id":138, + "country_code":"ES", + "code":"Baleares", + "default_name":"Baleares", + "country_id":206 + }, + { + "id":139, + "country_code":"ES", + "code":"Barcelona", + "default_name":"Barcelona", + "country_id":206 + }, + { + "id":140, + "country_code":"ES", + "code":"Burgos", + "default_name":"Burgos", + "country_id":206 + }, + { + "id":141, + "country_code":"ES", + "code":"Caceres", + "default_name":"Caceres", + "country_id":206 + }, + { + "id":142, + "country_code":"ES", + "code":"Cadiz", + "default_name":"Cadiz", + "country_id":206 + }, + { + "id":143, + "country_code":"ES", + "code":"Cantabria", + "default_name":"Cantabria", + "country_id":206 + }, + { + "id":144, + "country_code":"ES", + "code":"Castellon", + "default_name":"Castellon", + "country_id":206 + }, + { + "id":145, + "country_code":"ES", + "code":"Ceuta", + "default_name":"Ceuta", + "country_id":206 + }, + { + "id":146, + "country_code":"ES", + "code":"Ciudad Real", + "default_name":"Ciudad Real", + "country_id":206 + }, + { + "id":147, + "country_code":"ES", + "code":"Cordoba", + "default_name":"Cordoba", + "country_id":206 + }, + { + "id":148, + "country_code":"ES", + "code":"Cuenca", + "default_name":"Cuenca", + "country_id":206 + }, + { + "id":149, + "country_code":"ES", + "code":"Girona", + "default_name":"Girona", + "country_id":206 + }, + { + "id":150, + "country_code":"ES", + "code":"Granada", + "default_name":"Granada", + "country_id":206 + }, + { + "id":151, + "country_code":"ES", + "code":"Guadalajara", + "default_name":"Guadalajara", + "country_id":206 + }, + { + "id":152, + "country_code":"ES", + "code":"Guipuzcoa", + "default_name":"Guipuzcoa", + "country_id":206 + }, + { + "id":153, + "country_code":"ES", + "code":"Huelva", + "default_name":"Huelva", + "country_id":206 + }, + { + "id":154, + "country_code":"ES", + "code":"Huesca", + "default_name":"Huesca", + "country_id":206 + }, + { + "id":155, + "country_code":"ES", + "code":"Jaen", + "default_name":"Jaen", + "country_id":206 + }, + { + "id":156, + "country_code":"ES", + "code":"La Rioja", + "default_name":"La Rioja", + "country_id":206 + }, + { + "id":157, + "country_code":"ES", + "code":"Las Palmas", + "default_name":"Las Palmas", + "country_id":206 + }, + { + "id":158, + "country_code":"ES", + "code":"Leon", + "default_name":"Leon", + "country_id":206 + }, + { + "id":159, + "country_code":"ES", + "code":"Lleida", + "default_name":"Lleida", + "country_id":206 + }, + { + "id":160, + "country_code":"ES", + "code":"Lugo", + "default_name":"Lugo", + "country_id":206 + }, + { + "id":161, + "country_code":"ES", + "code":"Madrid", + "default_name":"Madrid", + "country_id":206 + }, + { + "id":162, + "country_code":"ES", + "code":"Malaga", + "default_name":"Malaga", + "country_id":206 + }, + { + "id":163, + "country_code":"ES", + "code":"Melilla", + "default_name":"Melilla", + "country_id":206 + }, + { + "id":164, + "country_code":"ES", + "code":"Murcia", + "default_name":"Murcia", + "country_id":206 + }, + { + "id":165, + "country_code":"ES", + "code":"Navarra", + "default_name":"Navarra", + "country_id":206 + }, + { + "id":166, + "country_code":"ES", + "code":"Ourense", + "default_name":"Ourense", + "country_id":206 + }, + { + "id":167, + "country_code":"ES", + "code":"Palencia", + "default_name":"Palencia", + "country_id":206 + }, + { + "id":168, + "country_code":"ES", + "code":"Pontevedra", + "default_name":"Pontevedra", + "country_id":206 + }, + { + "id":169, + "country_code":"ES", + "code":"Salamanca", + "default_name":"Salamanca", + "country_id":206 + }, + { + "id":170, + "country_code":"ES", + "code":"Santa Cruz de Tenerife", + "default_name":"Santa Cruz de Tenerife", + "country_id":206 + }, + { + "id":171, + "country_code":"ES", + "code":"Segovia", + "default_name":"Segovia", + "country_id":206 + }, + { + "id":172, + "country_code":"ES", + "code":"Sevilla", + "default_name":"Sevilla", + "country_id":206 + }, + { + "id":173, + "country_code":"ES", + "code":"Soria", + "default_name":"Soria", + "country_id":206 + }, + { + "id":174, + "country_code":"ES", + "code":"Tarragona", + "default_name":"Tarragona", + "country_id":206 + }, + { + "id":175, + "country_code":"ES", + "code":"Teruel", + "default_name":"Teruel", + "country_id":206 + }, + { + "id":176, + "country_code":"ES", + "code":"Toledo", + "default_name":"Toledo", + "country_id":206 + }, + { + "id":177, + "country_code":"ES", + "code":"Valencia", + "default_name":"Valencia", + "country_id":206 + }, + { + "id":178, + "country_code":"ES", + "code":"Valladolid", + "default_name":"Valladolid", + "country_id":206 + }, + { + "id":179, + "country_code":"ES", + "code":"Vizcaya", + "default_name":"Vizcaya", + "country_id":206 + }, + { + "id":180, + "country_code":"ES", + "code":"Zamora", + "default_name":"Zamora", + "country_id":206 + }, + { + "id":181, + "country_code":"ES", + "code":"Zaragoza", + "default_name":"Zaragoza", + "country_id":206 + }, + { + "id":182, + "country_code":"FR", + "code":"1", + "default_name":"Ain", + "country_id":81 + }, + { + "id":183, + "country_code":"FR", + "code":"2", + "default_name":"Aisne", + "country_id":81 + }, + { + "id":184, + "country_code":"FR", + "code":"3", + "default_name":"Allier", + "country_id":81 + }, + { + "id":185, + "country_code":"FR", + "code":"4", + "default_name":"Alpes-de-Haute-Provence", + "country_id":81 + }, + { + "id":186, + "country_code":"FR", + "code":"5", + "default_name":"Hautes-Alpes", + "country_id":81 + }, + { + "id":187, + "country_code":"FR", + "code":"6", + "default_name":"Alpes-Maritimes", + "country_id":81 + }, + { + "id":188, + "country_code":"FR", + "code":"7", + "default_name":"Ard\u00e8che", + "country_id":81 + }, + { + "id":189, + "country_code":"FR", + "code":"8", + "default_name":"Ardennes", + "country_id":81 + }, + { + "id":190, + "country_code":"FR", + "code":"9", + "default_name":"Ari\u00e8ge", + "country_id":81 + }, + { + "id":191, + "country_code":"FR", + "code":"10", + "default_name":"Aube", + "country_id":81 + }, + { + "id":192, + "country_code":"FR", + "code":"11", + "default_name":"Aude", + "country_id":81 + }, + { + "id":193, + "country_code":"FR", + "code":"12", + "default_name":"Aveyron", + "country_id":81 + }, + { + "id":194, + "country_code":"FR", + "code":"13", + "default_name":"Bouches-du-Rh\u00f4ne", + "country_id":81 + }, + { + "id":195, + "country_code":"FR", + "code":"14", + "default_name":"Calvados", + "country_id":81 + }, + { + "id":196, + "country_code":"FR", + "code":"15", + "default_name":"Cantal", + "country_id":81 + }, + { + "id":197, + "country_code":"FR", + "code":"16", + "default_name":"Charente", + "country_id":81 + }, + { + "id":198, + "country_code":"FR", + "code":"17", + "default_name":"Charente-Maritime", + "country_id":81 + }, + { + "id":199, + "country_code":"FR", + "code":"18", + "default_name":"Cher", + "country_id":81 + }, + { + "id":200, + "country_code":"FR", + "code":"19", + "default_name":"Corr\u00e8ze", + "country_id":81 + }, + { + "id":201, + "country_code":"FR", + "code":"2A", + "default_name":"Corse-du-Sud", + "country_id":81 + }, + { + "id":202, + "country_code":"FR", + "code":"2B", + "default_name":"Haute-Corse", + "country_id":81 + }, + { + "id":203, + "country_code":"FR", + "code":"21", + "default_name":"C\u00f4te-d'Or", + "country_id":81 + }, + { + "id":204, + "country_code":"FR", + "code":"22", + "default_name":"C\u00f4tes-d'Armor", + "country_id":81 + }, + { + "id":205, + "country_code":"FR", + "code":"23", + "default_name":"Creuse", + "country_id":81 + }, + { + "id":206, + "country_code":"FR", + "code":"24", + "default_name":"Dordogne", + "country_id":81 + }, + { + "id":207, + "country_code":"FR", + "code":"25", + "default_name":"Doubs", + "country_id":81 + }, + { + "id":208, + "country_code":"FR", + "code":"26", + "default_name":"Dr\u00f4me", + "country_id":81 + }, + { + "id":209, + "country_code":"FR", + "code":"27", + "default_name":"Eure", + "country_id":81 + }, + { + "id":210, + "country_code":"FR", + "code":"28", + "default_name":"Eure-et-Loir", + "country_id":81 + }, + { + "id":211, + "country_code":"FR", + "code":"29", + "default_name":"Finist\u00e8re", + "country_id":81 + }, + { + "id":212, + "country_code":"FR", + "code":"30", + "default_name":"Gard", + "country_id":81 + }, + { + "id":213, + "country_code":"FR", + "code":"31", + "default_name":"Haute-Garonne", + "country_id":81 + }, + { + "id":214, + "country_code":"FR", + "code":"32", + "default_name":"Gers", + "country_id":81 + }, + { + "id":215, + "country_code":"FR", + "code":"33", + "default_name":"Gironde", + "country_id":81 + }, + { + "id":216, + "country_code":"FR", + "code":"34", + "default_name":"H\u00e9rault", + "country_id":81 + }, + { + "id":217, + "country_code":"FR", + "code":"35", + "default_name":"Ille-et-Vilaine", + "country_id":81 + }, + { + "id":218, + "country_code":"FR", + "code":"36", + "default_name":"Indre", + "country_id":81 + }, + { + "id":219, + "country_code":"FR", + "code":"37", + "default_name":"Indre-et-Loire", + "country_id":81 + }, + { + "id":220, + "country_code":"FR", + "code":"38", + "default_name":"Is\u00e8re", + "country_id":81 + }, + { + "id":221, + "country_code":"FR", + "code":"39", + "default_name":"Jura", + "country_id":81 + }, + { + "id":222, + "country_code":"FR", + "code":"40", + "default_name":"Landes", + "country_id":81 + }, + { + "id":223, + "country_code":"FR", + "code":"41", + "default_name":"Loir-et-Cher", + "country_id":81 + }, + { + "id":224, + "country_code":"FR", + "code":"42", + "default_name":"Loire", + "country_id":81 + }, + { + "id":225, + "country_code":"FR", + "code":"43", + "default_name":"Haute-Loire", + "country_id":81 + }, + { + "id":226, + "country_code":"FR", + "code":"44", + "default_name":"Loire-Atlantique", + "country_id":81 + }, + { + "id":227, + "country_code":"FR", + "code":"45", + "default_name":"Loiret", + "country_id":81 + }, + { + "id":228, + "country_code":"FR", + "code":"46", + "default_name":"Lot", + "country_id":81 + }, + { + "id":229, + "country_code":"FR", + "code":"47", + "default_name":"Lot-et-Garonne", + "country_id":81 + }, + { + "id":230, + "country_code":"FR", + "code":"48", + "default_name":"Loz\u00e8re", + "country_id":81 + }, + { + "id":231, + "country_code":"FR", + "code":"49", + "default_name":"Maine-et-Loire", + "country_id":81 + }, + { + "id":232, + "country_code":"FR", + "code":"50", + "default_name":"Manche", + "country_id":81 + }, + { + "id":233, + "country_code":"FR", + "code":"51", + "default_name":"Marne", + "country_id":81 + }, + { + "id":234, + "country_code":"FR", + "code":"52", + "default_name":"Haute-Marne", + "country_id":81 + }, + { + "id":235, + "country_code":"FR", + "code":"53", + "default_name":"Mayenne", + "country_id":81 + }, + { + "id":236, + "country_code":"FR", + "code":"54", + "default_name":"Meurthe-et-Moselle", + "country_id":81 + }, + { + "id":237, + "country_code":"FR", + "code":"55", + "default_name":"Meuse", + "country_id":81 + }, + { + "id":238, + "country_code":"FR", + "code":"56", + "default_name":"Morbihan", + "country_id":81 + }, + { + "id":239, + "country_code":"FR", + "code":"57", + "default_name":"Moselle", + "country_id":81 + }, + { + "id":240, + "country_code":"FR", + "code":"58", + "default_name":"Ni\u00e8vre", + "country_id":81 + }, + { + "id":241, + "country_code":"FR", + "code":"59", + "default_name":"Nord", + "country_id":81 + }, + { + "id":242, + "country_code":"FR", + "code":"60", + "default_name":"Oise", + "country_id":81 + }, + { + "id":243, + "country_code":"FR", + "code":"61", + "default_name":"Orne", + "country_id":81 + }, + { + "id":244, + "country_code":"FR", + "code":"62", + "default_name":"Pas-de-Calais", + "country_id":81 + }, + { + "id":245, + "country_code":"FR", + "code":"63", + "default_name":"Puy-de-D\u00f4me", + "country_id":81 + }, + { + "id":246, + "country_code":"FR", + "code":"64", + "default_name":"Pyr\u00e9n\u00e9es-Atlantiques", + "country_id":81 + }, + { + "id":247, + "country_code":"FR", + "code":"65", + "default_name":"Hautes-Pyr\u00e9n\u00e9es", + "country_id":81 + }, + { + "id":248, + "country_code":"FR", + "code":"66", + "default_name":"Pyr\u00e9n\u00e9es-Orientales", + "country_id":81 + }, + { + "id":249, + "country_code":"FR", + "code":"67", + "default_name":"Bas-Rhin", + "country_id":81 + }, + { + "id":250, + "country_code":"FR", + "code":"68", + "default_name":"Haut-Rhin", + "country_id":81 + }, + { + "id":251, + "country_code":"FR", + "code":"69", + "default_name":"Rh\u00f4ne", + "country_id":81 + }, + { + "id":252, + "country_code":"FR", + "code":"70", + "default_name":"Haute-Sa\u00f4ne", + "country_id":81 + }, + { + "id":253, + "country_code":"FR", + "code":"71", + "default_name":"Sa\u00f4ne-et-Loire", + "country_id":81 + }, + { + "id":254, + "country_code":"FR", + "code":"72", + "default_name":"Sarthe", + "country_id":81 + }, + { + "id":255, + "country_code":"FR", + "code":"73", + "default_name":"Savoie", + "country_id":81 + }, + { + "id":256, + "country_code":"FR", + "code":"74", + "default_name":"Haute-Savoie", + "country_id":81 + }, + { + "id":257, + "country_code":"FR", + "code":"75", + "default_name":"Paris", + "country_id":81 + }, + { + "id":258, + "country_code":"FR", + "code":"76", + "default_name":"Seine-Maritime", + "country_id":81 + }, + { + "id":259, + "country_code":"FR", + "code":"77", + "default_name":"Seine-et-Marne", + "country_id":81 + }, + { + "id":260, + "country_code":"FR", + "code":"78", + "default_name":"Yvelines", + "country_id":81 + }, + { + "id":261, + "country_code":"FR", + "code":"79", + "default_name":"Deux-S\u00e8vres", + "country_id":81 + }, + { + "id":262, + "country_code":"FR", + "code":"80", + "default_name":"Somme", + "country_id":81 + }, + { + "id":263, + "country_code":"FR", + "code":"81", + "default_name":"Tarn", + "country_id":81 + }, + { + "id":264, + "country_code":"FR", + "code":"82", + "default_name":"Tarn-et-Garonne", + "country_id":81 + }, + { + "id":265, + "country_code":"FR", + "code":"83", + "default_name":"Var", + "country_id":81 + }, + { + "id":266, + "country_code":"FR", + "code":"84", + "default_name":"Vaucluse", + "country_id":81 + }, + { + "id":267, + "country_code":"FR", + "code":"85", + "default_name":"Vend\u00e9e", + "country_id":81 + }, + { + "id":268, + "country_code":"FR", + "code":"86", + "default_name":"Vienne", + "country_id":81 + }, + { + "id":269, + "country_code":"FR", + "code":"87", + "default_name":"Haute-Vienne", + "country_id":81 + }, + { + "id":270, + "country_code":"FR", + "code":"88", + "default_name":"Vosges", + "country_id":81 + }, + { + "id":271, + "country_code":"FR", + "code":"89", + "default_name":"Yonne", + "country_id":81 + }, + { + "id":272, + "country_code":"FR", + "code":"90", + "default_name":"Territoire-de-Belfort", + "country_id":81 + }, + { + "id":273, + "country_code":"FR", + "code":"91", + "default_name":"Essonne", + "country_id":81 + }, + { + "id":274, + "country_code":"FR", + "code":"92", + "default_name":"Hauts-de-Seine", + "country_id":81 + }, + { + "id":275, + "country_code":"FR", + "code":"93", + "default_name":"Seine-Saint-Denis", + "country_id":81 + }, + { + "id":276, + "country_code":"FR", + "code":"94", + "default_name":"Val-de-Marne", + "country_id":81 + }, + { + "id":277, + "country_code":"FR", + "code":"95", + "default_name":"Val-d'Oise", + "country_id":81 + }, + { + "id":278, + "country_code":"RO", + "code":"AB", + "default_name":"Alba", + "country_id":185 + }, + { + "id":279, + "country_code":"RO", + "code":"AR", + "default_name":"Arad", + "country_id":185 + }, + { + "id":280, + "country_code":"RO", + "code":"AG", + "default_name":"Arge\u015f", + "country_id":185 + }, + { + "id":281, + "country_code":"RO", + "code":"BC", + "default_name":"Bac\u0103u", + "country_id":185 + }, + { + "id":282, + "country_code":"RO", + "code":"BH", + "default_name":"Bihor", + "country_id":185 + }, + { + "id":283, + "country_code":"RO", + "code":"BN", + "default_name":"Bistri\u0163a-N\u0103s\u0103ud", + "country_id":185 + }, + { + "id":284, + "country_code":"RO", + "code":"BT", + "default_name":"Boto\u015fani", + "country_id":185 + }, + { + "id":285, + "country_code":"RO", + "code":"BV", + "default_name":"Bra\u015fov", + "country_id":185 + }, + { + "id":286, + "country_code":"RO", + "code":"BR", + "default_name":"Br\u0103ila", + "country_id":185 + }, + { + "id":287, + "country_code":"RO", + "code":"B", + "default_name":"Bucure\u015fti", + "country_id":185 + }, + { + "id":288, + "country_code":"RO", + "code":"BZ", + "default_name":"Buz\u0103u", + "country_id":185 + }, + { + "id":289, + "country_code":"RO", + "code":"CS", + "default_name":"Cara\u015f-Severin", + "country_id":185 + }, + { + "id":290, + "country_code":"RO", + "code":"CL", + "default_name":"C\u0103l\u0103ra\u015fi", + "country_id":185 + }, + { + "id":291, + "country_code":"RO", + "code":"CJ", + "default_name":"Cluj", + "country_id":185 + }, + { + "id":292, + "country_code":"RO", + "code":"CT", + "default_name":"Constan\u0163a", + "country_id":185 + }, + { + "id":293, + "country_code":"RO", + "code":"CV", + "default_name":"Covasna", + "country_id":185 + }, + { + "id":294, + "country_code":"RO", + "code":"DB", + "default_name":"D\u00e2mbovi\u0163a", + "country_id":185 + }, + { + "id":295, + "country_code":"RO", + "code":"DJ", + "default_name":"Dolj", + "country_id":185 + }, + { + "id":296, + "country_code":"RO", + "code":"GL", + "default_name":"Gala\u0163i", + "country_id":185 + }, + { + "id":297, + "country_code":"RO", + "code":"GR", + "default_name":"Giurgiu", + "country_id":185 + }, + { + "id":298, + "country_code":"RO", + "code":"GJ", + "default_name":"Gorj", + "country_id":185 + }, + { + "id":299, + "country_code":"RO", + "code":"HR", + "default_name":"Harghita", + "country_id":185 + }, + { + "id":300, + "country_code":"RO", + "code":"HD", + "default_name":"Hunedoara", + "country_id":185 + }, + { + "id":301, + "country_code":"RO", + "code":"IL", + "default_name":"Ialomi\u0163a", + "country_id":185 + }, + { + "id":302, + "country_code":"RO", + "code":"IS", + "default_name":"Ia\u015fi", + "country_id":185 + }, + { + "id":303, + "country_code":"RO", + "code":"IF", + "default_name":"Ilfov", + "country_id":185 + }, + { + "id":304, + "country_code":"RO", + "code":"MM", + "default_name":"Maramure\u015f", + "country_id":185 + }, + { + "id":305, + "country_code":"RO", + "code":"MH", + "default_name":"Mehedin\u0163i", + "country_id":185 + }, + { + "id":306, + "country_code":"RO", + "code":"MS", + "default_name":"Mure\u015f", + "country_id":185 + }, + { + "id":307, + "country_code":"RO", + "code":"NT", + "default_name":"Neam\u0163", + "country_id":185 + }, + { + "id":308, + "country_code":"RO", + "code":"OT", + "default_name":"Olt", + "country_id":185 + }, + { + "id":309, + "country_code":"RO", + "code":"PH", + "default_name":"Prahova", + "country_id":185 + }, + { + "id":310, + "country_code":"RO", + "code":"SM", + "default_name":"Satu-Mare", + "country_id":185 + }, + { + "id":311, + "country_code":"RO", + "code":"SJ", + "default_name":"S\u0103laj", + "country_id":185 + }, + { + "id":312, + "country_code":"RO", + "code":"SB", + "default_name":"Sibiu", + "country_id":185 + }, + { + "id":313, + "country_code":"RO", + "code":"SV", + "default_name":"Suceava", + "country_id":185 + }, + { + "id":314, + "country_code":"RO", + "code":"TR", + "default_name":"Teleorman", + "country_id":185 + }, + { + "id":315, + "country_code":"RO", + "code":"TM", + "default_name":"Timi\u015f", + "country_id":185 + }, + { + "id":316, + "country_code":"RO", + "code":"TL", + "default_name":"Tulcea", + "country_id":185 + }, + { + "id":317, + "country_code":"RO", + "code":"VS", + "default_name":"Vaslui", + "country_id":185 + }, + { + "id":318, + "country_code":"RO", + "code":"VL", + "default_name":"V\u00e2lcea", + "country_id":185 + }, + { + "id":319, + "country_code":"RO", + "code":"VN", + "default_name":"Vrancea", + "country_id":185 + }, + { + "id":320, + "country_code":"FI", + "code":"Lappi", + "default_name":"Lappi", + "country_id":80 + }, + { + "id":321, + "country_code":"FI", + "code":"Pohjois-Pohjanmaa", + "default_name":"Pohjois-Pohjanmaa", + "country_id":80 + }, + { + "id":322, + "country_code":"FI", + "code":"Kainuu", + "default_name":"Kainuu", + "country_id":80 + }, + { + "id":323, + "country_code":"FI", + "code":"Pohjois-Karjala", + "default_name":"Pohjois-Karjala", + "country_id":80 + }, + { + "id":324, + "country_code":"FI", + "code":"Pohjois-Savo", + "default_name":"Pohjois-Savo", + "country_id":80 + }, + { + "id":325, + "country_code":"FI", + "code":"Etel\u00e4-Savo", + "default_name":"Etel\u00e4-Savo", + "country_id":80 + }, + { + "id":326, + "country_code":"FI", + "code":"Etel\u00e4-Pohjanmaa", + "default_name":"Etel\u00e4-Pohjanmaa", + "country_id":80 + }, + { + "id":327, + "country_code":"FI", + "code":"Pohjanmaa", + "default_name":"Pohjanmaa", + "country_id":80 + }, + { + "id":328, + "country_code":"FI", + "code":"Pirkanmaa", + "default_name":"Pirkanmaa", + "country_id":80 + }, + { + "id":329, + "country_code":"FI", + "code":"Satakunta", + "default_name":"Satakunta", + "country_id":80 + }, + { + "id":330, + "country_code":"FI", + "code":"Keski-Pohjanmaa", + "default_name":"Keski-Pohjanmaa", + "country_id":80 + }, + { + "id":331, + "country_code":"FI", + "code":"Keski-Suomi", + "default_name":"Keski-Suomi", + "country_id":80 + }, + { + "id":332, + "country_code":"FI", + "code":"Varsinais-Suomi", + "default_name":"Varsinais-Suomi", + "country_id":80 + }, + { + "id":333, + "country_code":"FI", + "code":"Etel\u00e4-Karjala", + "default_name":"Etel\u00e4-Karjala", + "country_id":80 + }, + { + "id":334, + "country_code":"FI", + "code":"P\u00e4ij\u00e4t-H\u00e4me", + "default_name":"P\u00e4ij\u00e4t-H\u00e4me", + "country_id":80 + }, + { + "id":335, + "country_code":"FI", + "code":"Kanta-H\u00e4me", + "default_name":"Kanta-H\u00e4me", + "country_id":80 + }, + { + "id":336, + "country_code":"FI", + "code":"Uusimaa", + "default_name":"Uusimaa", + "country_id":80 + }, + { + "id":337, + "country_code":"FI", + "code":"It\u00e4-Uusimaa", + "default_name":"It\u00e4-Uusimaa", + "country_id":80 + }, + { + "id":338, + "country_code":"FI", + "code":"Kymenlaakso", + "default_name":"Kymenlaakso", + "country_id":80 + }, + { + "id":339, + "country_code":"FI", + "code":"Ahvenanmaa", + "default_name":"Ahvenanmaa", + "country_id":80 + }, + { + "id":340, + "country_code":"EE", + "code":"EE-37", + "default_name":"Harjumaa", + "country_id":74 + }, + { + "id":341, + "country_code":"EE", + "code":"EE-39", + "default_name":"Hiiumaa", + "country_id":74 + }, + { + "id":342, + "country_code":"EE", + "code":"EE-44", + "default_name":"Ida-Virumaa", + "country_id":74 + }, + { + "id":343, + "country_code":"EE", + "code":"EE-49", + "default_name":"J\u00f5gevamaa", + "country_id":74 + }, + { + "id":344, + "country_code":"EE", + "code":"EE-51", + "default_name":"J\u00e4rvamaa", + "country_id":74 + }, + { + "id":345, + "country_code":"EE", + "code":"EE-57", + "default_name":"L\u00e4\u00e4nemaa", + "country_id":74 + }, + { + "id":346, + "country_code":"EE", + "code":"EE-59", + "default_name":"L\u00e4\u00e4ne-Virumaa", + "country_id":74 + }, + { + "id":347, + "country_code":"EE", + "code":"EE-65", + "default_name":"P\u00f5lvamaa", + "country_id":74 + }, + { + "id":348, + "country_code":"EE", + "code":"EE-67", + "default_name":"P\u00e4rnumaa", + "country_id":74 + }, + { + "id":349, + "country_code":"EE", + "code":"EE-70", + "default_name":"Raplamaa", + "country_id":74 + }, + { + "id":350, + "country_code":"EE", + "code":"EE-74", + "default_name":"Saaremaa", + "country_id":74 + }, + { + "id":351, + "country_code":"EE", + "code":"EE-78", + "default_name":"Tartumaa", + "country_id":74 + }, + { + "id":352, + "country_code":"EE", + "code":"EE-82", + "default_name":"Valgamaa", + "country_id":74 + }, + { + "id":353, + "country_code":"EE", + "code":"EE-84", + "default_name":"Viljandimaa", + "country_id":74 + }, + { + "id":354, + "country_code":"EE", + "code":"EE-86", + "default_name":"V\u00f5rumaa", + "country_id":74 + }, + { + "id":355, + "country_code":"LV", + "code":"LV-DGV", + "default_name":"Daugavpils", + "country_id":125 + }, + { + "id":356, + "country_code":"LV", + "code":"LV-JEL", + "default_name":"Jelgava", + "country_id":125 + }, + { + "id":357, + "country_code":"LV", + "code":"J\u0113kabpils", + "default_name":"J\u0113kabpils", + "country_id":125 + }, + { + "id":358, + "country_code":"LV", + "code":"LV-JUR", + "default_name":"J\u016brmala", + "country_id":125 + }, + { + "id":359, + "country_code":"LV", + "code":"LV-LPX", + "default_name":"Liep\u0101ja", + "country_id":125 + }, + { + "id":360, + "country_code":"LV", + "code":"LV-LE", + "default_name":"Liep\u0101jas novads", + "country_id":125 + }, + { + "id":361, + "country_code":"LV", + "code":"LV-REZ", + "default_name":"R\u0113zekne", + "country_id":125 + }, + { + "id":362, + "country_code":"LV", + "code":"LV-RIX", + "default_name":"R\u012bga", + "country_id":125 + }, + { + "id":363, + "country_code":"LV", + "code":"LV-RI", + "default_name":"R\u012bgas novads", + "country_id":125 + }, + { + "id":364, + "country_code":"LV", + "code":"Valmiera", + "default_name":"Valmiera", + "country_id":125 + }, + { + "id":365, + "country_code":"LV", + "code":"LV-VEN", + "default_name":"Ventspils", + "country_id":125 + }, + { + "id":366, + "country_code":"LV", + "code":"Aglonas novads", + "default_name":"Aglonas novads", + "country_id":125 + }, + { + "id":367, + "country_code":"LV", + "code":"LV-AI", + "default_name":"Aizkraukles novads", + "country_id":125 + }, + { + "id":368, + "country_code":"LV", + "code":"Aizputes novads", + "default_name":"Aizputes novads", + "country_id":125 + }, + { + "id":369, + "country_code":"LV", + "code":"Akn\u012bstes novads", + "default_name":"Akn\u012bstes novads", + "country_id":125 + }, + { + "id":370, + "country_code":"LV", + "code":"Alojas novads", + "default_name":"Alojas novads", + "country_id":125 + }, + { + "id":371, + "country_code":"LV", + "code":"Alsungas novads", + "default_name":"Alsungas novads", + "country_id":125 + }, + { + "id":372, + "country_code":"LV", + "code":"LV-AL", + "default_name":"Al\u016bksnes novads", + "country_id":125 + }, + { + "id":373, + "country_code":"LV", + "code":"Amatas novads", + "default_name":"Amatas novads", + "country_id":125 + }, + { + "id":374, + "country_code":"LV", + "code":"Apes novads", + "default_name":"Apes novads", + "country_id":125 + }, + { + "id":375, + "country_code":"LV", + "code":"Auces novads", + "default_name":"Auces novads", + "country_id":125 + }, + { + "id":376, + "country_code":"LV", + "code":"Bab\u012btes novads", + "default_name":"Bab\u012btes novads", + "country_id":125 + }, + { + "id":377, + "country_code":"LV", + "code":"Baldones novads", + "default_name":"Baldones novads", + "country_id":125 + }, + { + "id":378, + "country_code":"LV", + "code":"Baltinavas novads", + "default_name":"Baltinavas novads", + "country_id":125 + }, + { + "id":379, + "country_code":"LV", + "code":"LV-BL", + "default_name":"Balvu novads", + "country_id":125 + }, + { + "id":380, + "country_code":"LV", + "code":"LV-BU", + "default_name":"Bauskas novads", + "country_id":125 + }, + { + "id":381, + "country_code":"LV", + "code":"Bever\u012bnas novads", + "default_name":"Bever\u012bnas novads", + "country_id":125 + }, + { + "id":382, + "country_code":"LV", + "code":"Broc\u0113nu novads", + "default_name":"Broc\u0113nu novads", + "country_id":125 + }, + { + "id":383, + "country_code":"LV", + "code":"Burtnieku novads", + "default_name":"Burtnieku novads", + "country_id":125 + }, + { + "id":384, + "country_code":"LV", + "code":"Carnikavas novads", + "default_name":"Carnikavas novads", + "country_id":125 + }, + { + "id":385, + "country_code":"LV", + "code":"Cesvaines novads", + "default_name":"Cesvaines novads", + "country_id":125 + }, + { + "id":386, + "country_code":"LV", + "code":"Ciblas novads", + "default_name":"Ciblas novads", + "country_id":125 + }, + { + "id":387, + "country_code":"LV", + "code":"LV-CE", + "default_name":"C\u0113su novads", + "country_id":125 + }, + { + "id":388, + "country_code":"LV", + "code":"Dagdas novads", + "default_name":"Dagdas novads", + "country_id":125 + }, + { + "id":389, + "country_code":"LV", + "code":"LV-DA", + "default_name":"Daugavpils novads", + "country_id":125 + }, + { + "id":390, + "country_code":"LV", + "code":"LV-DO", + "default_name":"Dobeles novads", + "country_id":125 + }, + { + "id":391, + "country_code":"LV", + "code":"Dundagas novads", + "default_name":"Dundagas novads", + "country_id":125 + }, + { + "id":392, + "country_code":"LV", + "code":"Durbes novads", + "default_name":"Durbes novads", + "country_id":125 + }, + { + "id":393, + "country_code":"LV", + "code":"Engures novads", + "default_name":"Engures novads", + "country_id":125 + }, + { + "id":394, + "country_code":"LV", + "code":"Garkalnes novads", + "default_name":"Garkalnes novads", + "country_id":125 + }, + { + "id":395, + "country_code":"LV", + "code":"Grobi\u0146as novads", + "default_name":"Grobi\u0146as novads", + "country_id":125 + }, + { + "id":396, + "country_code":"LV", + "code":"LV-GU", + "default_name":"Gulbenes novads", + "country_id":125 + }, + { + "id":397, + "country_code":"LV", + "code":"Iecavas novads", + "default_name":"Iecavas novads", + "country_id":125 + }, + { + "id":398, + "country_code":"LV", + "code":"Ik\u0161\u0137iles novads", + "default_name":"Ik\u0161\u0137iles novads", + "country_id":125 + }, + { + "id":399, + "country_code":"LV", + "code":"Il\u016bkstes novads", + "default_name":"Il\u016bkstes novads", + "country_id":125 + }, + { + "id":400, + "country_code":"LV", + "code":"In\u010dukalna novads", + "default_name":"In\u010dukalna novads", + "country_id":125 + }, + { + "id":401, + "country_code":"LV", + "code":"Jaunjelgavas novads", + "default_name":"Jaunjelgavas novads", + "country_id":125 + }, + { + "id":402, + "country_code":"LV", + "code":"Jaunpiebalgas novads", + "default_name":"Jaunpiebalgas novads", + "country_id":125 + }, + { + "id":403, + "country_code":"LV", + "code":"Jaunpils novads", + "default_name":"Jaunpils novads", + "country_id":125 + }, + { + "id":404, + "country_code":"LV", + "code":"LV-JL", + "default_name":"Jelgavas novads", + "country_id":125 + }, + { + "id":405, + "country_code":"LV", + "code":"LV-JK", + "default_name":"J\u0113kabpils novads", + "country_id":125 + }, + { + "id":406, + "country_code":"LV", + "code":"Kandavas novads", + "default_name":"Kandavas novads", + "country_id":125 + }, + { + "id":407, + "country_code":"LV", + "code":"Kokneses novads", + "default_name":"Kokneses novads", + "country_id":125 + }, + { + "id":408, + "country_code":"LV", + "code":"Krimuldas novads", + "default_name":"Krimuldas novads", + "country_id":125 + }, + { + "id":409, + "country_code":"LV", + "code":"Krustpils novads", + "default_name":"Krustpils novads", + "country_id":125 + }, + { + "id":410, + "country_code":"LV", + "code":"LV-KR", + "default_name":"Kr\u0101slavas novads", + "country_id":125 + }, + { + "id":411, + "country_code":"LV", + "code":"LV-KU", + "default_name":"Kuld\u012bgas novads", + "country_id":125 + }, + { + "id":412, + "country_code":"LV", + "code":"K\u0101rsavas novads", + "default_name":"K\u0101rsavas novads", + "country_id":125 + }, + { + "id":413, + "country_code":"LV", + "code":"Lielv\u0101rdes novads", + "default_name":"Lielv\u0101rdes novads", + "country_id":125 + }, + { + "id":414, + "country_code":"LV", + "code":"LV-LM", + "default_name":"Limba\u017eu novads", + "country_id":125 + }, + { + "id":415, + "country_code":"LV", + "code":"Lub\u0101nas novads", + "default_name":"Lub\u0101nas novads", + "country_id":125 + }, + { + "id":416, + "country_code":"LV", + "code":"LV-LU", + "default_name":"Ludzas novads", + "country_id":125 + }, + { + "id":417, + "country_code":"LV", + "code":"L\u012bgatnes novads", + "default_name":"L\u012bgatnes novads", + "country_id":125 + }, + { + "id":418, + "country_code":"LV", + "code":"L\u012bv\u0101nu novads", + "default_name":"L\u012bv\u0101nu novads", + "country_id":125 + }, + { + "id":419, + "country_code":"LV", + "code":"LV-MA", + "default_name":"Madonas novads", + "country_id":125 + }, + { + "id":420, + "country_code":"LV", + "code":"Mazsalacas novads", + "default_name":"Mazsalacas novads", + "country_id":125 + }, + { + "id":421, + "country_code":"LV", + "code":"M\u0101lpils novads", + "default_name":"M\u0101lpils novads", + "country_id":125 + }, + { + "id":422, + "country_code":"LV", + "code":"M\u0101rupes novads", + "default_name":"M\u0101rupes novads", + "country_id":125 + }, + { + "id":423, + "country_code":"LV", + "code":"Nauk\u0161\u0113nu novads", + "default_name":"Nauk\u0161\u0113nu novads", + "country_id":125 + }, + { + "id":424, + "country_code":"LV", + "code":"Neretas novads", + "default_name":"Neretas novads", + "country_id":125 + }, + { + "id":425, + "country_code":"LV", + "code":"N\u012bcas novads", + "default_name":"N\u012bcas novads", + "country_id":125 + }, + { + "id":426, + "country_code":"LV", + "code":"LV-OG", + "default_name":"Ogres novads", + "country_id":125 + }, + { + "id":427, + "country_code":"LV", + "code":"Olaines novads", + "default_name":"Olaines novads", + "country_id":125 + }, + { + "id":428, + "country_code":"LV", + "code":"Ozolnieku novads", + "default_name":"Ozolnieku novads", + "country_id":125 + }, + { + "id":429, + "country_code":"LV", + "code":"LV-PR", + "default_name":"Prei\u013cu novads", + "country_id":125 + }, + { + "id":430, + "country_code":"LV", + "code":"Priekules novads", + "default_name":"Priekules novads", + "country_id":125 + }, + { + "id":431, + "country_code":"LV", + "code":"Prieku\u013cu novads", + "default_name":"Prieku\u013cu novads", + "country_id":125 + }, + { + "id":432, + "country_code":"LV", + "code":"P\u0101rgaujas novads", + "default_name":"P\u0101rgaujas novads", + "country_id":125 + }, + { + "id":433, + "country_code":"LV", + "code":"P\u0101vilostas novads", + "default_name":"P\u0101vilostas novads", + "country_id":125 + }, + { + "id":434, + "country_code":"LV", + "code":"P\u013cavi\u0146u novads", + "default_name":"P\u013cavi\u0146u novads", + "country_id":125 + }, + { + "id":435, + "country_code":"LV", + "code":"Raunas novads", + "default_name":"Raunas novads", + "country_id":125 + }, + { + "id":436, + "country_code":"LV", + "code":"Riebi\u0146u novads", + "default_name":"Riebi\u0146u novads", + "country_id":125 + }, + { + "id":437, + "country_code":"LV", + "code":"Rojas novads", + "default_name":"Rojas novads", + "country_id":125 + }, + { + "id":438, + "country_code":"LV", + "code":"Ropa\u017eu novads", + "default_name":"Ropa\u017eu novads", + "country_id":125 + }, + { + "id":439, + "country_code":"LV", + "code":"Rucavas novads", + "default_name":"Rucavas novads", + "country_id":125 + }, + { + "id":440, + "country_code":"LV", + "code":"Rug\u0101ju novads", + "default_name":"Rug\u0101ju novads", + "country_id":125 + }, + { + "id":441, + "country_code":"LV", + "code":"Rund\u0101les novads", + "default_name":"Rund\u0101les novads", + "country_id":125 + }, + { + "id":442, + "country_code":"LV", + "code":"LV-RE", + "default_name":"R\u0113zeknes novads", + "country_id":125 + }, + { + "id":443, + "country_code":"LV", + "code":"R\u016bjienas novads", + "default_name":"R\u016bjienas novads", + "country_id":125 + }, + { + "id":444, + "country_code":"LV", + "code":"Salacgr\u012bvas novads", + "default_name":"Salacgr\u012bvas novads", + "country_id":125 + }, + { + "id":445, + "country_code":"LV", + "code":"Salas novads", + "default_name":"Salas novads", + "country_id":125 + }, + { + "id":446, + "country_code":"LV", + "code":"Salaspils novads", + "default_name":"Salaspils novads", + "country_id":125 + }, + { + "id":447, + "country_code":"LV", + "code":"LV-SA", + "default_name":"Saldus novads", + "country_id":125 + }, + { + "id":448, + "country_code":"LV", + "code":"Saulkrastu novads", + "default_name":"Saulkrastu novads", + "country_id":125 + }, + { + "id":449, + "country_code":"LV", + "code":"Siguldas novads", + "default_name":"Siguldas novads", + "country_id":125 + }, + { + "id":450, + "country_code":"LV", + "code":"Skrundas novads", + "default_name":"Skrundas novads", + "country_id":125 + }, + { + "id":451, + "country_code":"LV", + "code":"Skr\u012bveru novads", + "default_name":"Skr\u012bveru novads", + "country_id":125 + }, + { + "id":452, + "country_code":"LV", + "code":"Smiltenes novads", + "default_name":"Smiltenes novads", + "country_id":125 + }, + { + "id":453, + "country_code":"LV", + "code":"Stopi\u0146u novads", + "default_name":"Stopi\u0146u novads", + "country_id":125 + }, + { + "id":454, + "country_code":"LV", + "code":"Stren\u010du novads", + "default_name":"Stren\u010du novads", + "country_id":125 + }, + { + "id":455, + "country_code":"LV", + "code":"S\u0113jas novads", + "default_name":"S\u0113jas novads", + "country_id":125 + }, + { + "id":456, + "country_code":"LV", + "code":"LV-TA", + "default_name":"Talsu novads", + "country_id":125 + }, + { + "id":457, + "country_code":"LV", + "code":"LV-TU", + "default_name":"Tukuma novads", + "country_id":125 + }, + { + "id":458, + "country_code":"LV", + "code":"T\u0113rvetes novads", + "default_name":"T\u0113rvetes novads", + "country_id":125 + }, + { + "id":459, + "country_code":"LV", + "code":"Vai\u0146odes novads", + "default_name":"Vai\u0146odes novads", + "country_id":125 + }, + { + "id":460, + "country_code":"LV", + "code":"LV-VK", + "default_name":"Valkas novads", + "country_id":125 + }, + { + "id":461, + "country_code":"LV", + "code":"LV-VM", + "default_name":"Valmieras novads", + "country_id":125 + }, + { + "id":462, + "country_code":"LV", + "code":"Varak\u013c\u0101nu novads", + "default_name":"Varak\u013c\u0101nu novads", + "country_id":125 + }, + { + "id":463, + "country_code":"LV", + "code":"Vecpiebalgas novads", + "default_name":"Vecpiebalgas novads", + "country_id":125 + }, + { + "id":464, + "country_code":"LV", + "code":"Vecumnieku novads", + "default_name":"Vecumnieku novads", + "country_id":125 + }, + { + "id":465, + "country_code":"LV", + "code":"LV-VE", + "default_name":"Ventspils novads", + "country_id":125 + }, + { + "id":466, + "country_code":"LV", + "code":"Vies\u012btes novads", + "default_name":"Vies\u012btes novads", + "country_id":125 + }, + { + "id":467, + "country_code":"LV", + "code":"Vi\u013cakas novads", + "default_name":"Vi\u013cakas novads", + "country_id":125 + }, + { + "id":468, + "country_code":"LV", + "code":"Vi\u013c\u0101nu novads", + "default_name":"Vi\u013c\u0101nu novads", + "country_id":125 + }, + { + "id":469, + "country_code":"LV", + "code":"V\u0101rkavas novads", + "default_name":"V\u0101rkavas novads", + "country_id":125 + }, + { + "id":470, + "country_code":"LV", + "code":"Zilupes novads", + "default_name":"Zilupes novads", + "country_id":125 + }, + { + "id":471, + "country_code":"LV", + "code":"\u0100da\u017eu novads", + "default_name":"\u0100da\u017eu novads", + "country_id":125 + }, + { + "id":472, + "country_code":"LV", + "code":"\u0112rg\u013cu novads", + "default_name":"\u0112rg\u013cu novads", + "country_id":125 + }, + { + "id":473, + "country_code":"LV", + "code":"\u0136eguma novads", + "default_name":"\u0136eguma novads", + "country_id":125 + }, + { + "id":474, + "country_code":"LV", + "code":"\u0136ekavas novads", + "default_name":"\u0136ekavas novads", + "country_id":125 + }, + { + "id":475, + "country_code":"LT", + "code":"LT-AL", + "default_name":"Alytaus Apskritis", + "country_id":131 + }, + { + "id":476, + "country_code":"LT", + "code":"LT-KU", + "default_name":"Kauno Apskritis", + "country_id":131 + }, + { + "id":477, + "country_code":"LT", + "code":"LT-KL", + "default_name":"Klaip\u0117dos Apskritis", + "country_id":131 + }, + { + "id":478, + "country_code":"LT", + "code":"LT-MR", + "default_name":"Marijampol\u0117s Apskritis", + "country_id":131 + }, + { + "id":479, + "country_code":"LT", + "code":"LT-PN", + "default_name":"Panev\u0117\u017eio Apskritis", + "country_id":131 + }, + { + "id":480, + "country_code":"LT", + "code":"LT-SA", + "default_name":"\u0160iauli\u0173 Apskritis", + "country_id":131 + }, + { + "id":481, + "country_code":"LT", + "code":"LT-TA", + "default_name":"Taurag\u0117s Apskritis", + "country_id":131 + }, + { + "id":482, + "country_code":"LT", + "code":"LT-TE", + "default_name":"Tel\u0161i\u0173 Apskritis", + "country_id":131 + }, + { + "id":483, + "country_code":"LT", + "code":"LT-UT", + "default_name":"Utenos Apskritis", + "country_id":131 + }, + { + "id":484, + "country_code":"LT", + "code":"LT-VL", + "default_name":"Vilniaus Apskritis", + "country_id":131 + }, + { + "id":485, + "country_code":"BR", + "code":"AC", + "default_name":"Acre", + "country_id":31 + }, + { + "id":486, + "country_code":"BR", + "code":"AL", + "default_name":"Alagoas", + "country_id":31 + }, + { + "id":487, + "country_code":"BR", + "code":"AP", + "default_name":"Amap\u00e1", + "country_id":31 + }, + { + "id":488, + "country_code":"BR", + "code":"AM", + "default_name":"Amazonas", + "country_id":31 + }, + { + "id":489, + "country_code":"BR", + "code":"BA", + "default_name":"Bahia", + "country_id":31 + }, + { + "id":490, + "country_code":"BR", + "code":"CE", + "default_name":"Cear\u00e1", + "country_id":31 + }, + { + "id":491, + "country_code":"BR", + "code":"ES", + "default_name":"Esp\u00edrito Santo", + "country_id":31 + }, + { + "id":492, + "country_code":"BR", + "code":"GO", + "default_name":"Goi\u00e1s", + "country_id":31 + }, + { + "id":493, + "country_code":"BR", + "code":"MA", + "default_name":"Maranh\u00e3o", + "country_id":31 + }, + { + "id":494, + "country_code":"BR", + "code":"MT", + "default_name":"Mato Grosso", + "country_id":31 + }, + { + "id":495, + "country_code":"BR", + "code":"MS", + "default_name":"Mato Grosso do Sul", + "country_id":31 + }, + { + "id":496, + "country_code":"BR", + "code":"MG", + "default_name":"Minas Gerais", + "country_id":31 + }, + { + "id":497, + "country_code":"BR", + "code":"PA", + "default_name":"Par\u00e1", + "country_id":31 + }, + { + "id":498, + "country_code":"BR", + "code":"PB", + "default_name":"Para\u00edba", + "country_id":31 + }, + { + "id":499, + "country_code":"BR", + "code":"PR", + "default_name":"Paran\u00e1", + "country_id":31 + }, + { + "id":500, + "country_code":"BR", + "code":"PE", + "default_name":"Pernambuco", + "country_id":31 + }, + { + "id":501, + "country_code":"BR", + "code":"PI", + "default_name":"Piau\u00ed", + "country_id":31 + }, + { + "id":502, + "country_code":"BR", + "code":"RJ", + "default_name":"Rio de Janeiro", + "country_id":31 + }, + { + "id":503, + "country_code":"BR", + "code":"RN", + "default_name":"Rio Grande do Norte", + "country_id":31 + }, + { + "id":504, + "country_code":"BR", + "code":"RS", + "default_name":"Rio Grande do Sul", + "country_id":31 + }, + { + "id":505, + "country_code":"BR", + "code":"RO", + "default_name":"Rond\u00f4nia", + "country_id":31 + }, + { + "id":506, + "country_code":"BR", + "code":"RR", + "default_name":"Roraima", + "country_id":31 + }, + { + "id":507, + "country_code":"BR", + "code":"SC", + "default_name":"Santa Catarina", + "country_id":31 + }, + { + "id":508, + "country_code":"BR", + "code":"SP", + "default_name":"S\u00e3o Paulo", + "country_id":31 + }, + { + "id":509, + "country_code":"BR", + "code":"SE", + "default_name":"Sergipe", + "country_id":31 + }, + { + "id":510, + "country_code":"BR", + "code":"TO", + "default_name":"Tocantins", + "country_id":31 + }, + { + "id":511, + "country_code":"BR", + "code":"DF", + "default_name":"Distrito Federal", + "country_id":31 + }, + { + "id":512, + "country_code":"HR", + "code":"HR-01", + "default_name":"Zagreba\u010dka \u017eupanija", + "country_id":59 + }, + { + "id":513, + "country_code":"HR", + "code":"HR-02", + "default_name":"Krapinsko-zagorska \u017eupanija", + "country_id":59 + }, + { + "id":514, + "country_code":"HR", + "code":"HR-03", + "default_name":"Sisa\u010dko-moslava\u010dka \u017eupanija", + "country_id":59 + }, + { + "id":515, + "country_code":"HR", + "code":"HR-04", + "default_name":"Karlova\u010dka \u017eupanija", + "country_id":59 + }, + { + "id":516, + "country_code":"HR", + "code":"HR-05", + "default_name":"Vara\u017edinska \u017eupanija", + "country_id":59 + }, + { + "id":517, + "country_code":"HR", + "code":"HR-06", + "default_name":"Koprivni\u010dko-kri\u017eeva\u010dka \u017eupanija", + "country_id":59 + }, + { + "id":518, + "country_code":"HR", + "code":"HR-07", + "default_name":"Bjelovarsko-bilogorska \u017eupanija", + "country_id":59 + }, + { + "id":519, + "country_code":"HR", + "code":"HR-08", + "default_name":"Primorsko-goranska \u017eupanija", + "country_id":59 + }, + { + "id":520, + "country_code":"HR", + "code":"HR-09", + "default_name":"Li\u010dko-senjska \u017eupanija", + "country_id":59 + }, + { + "id":521, + "country_code":"HR", + "code":"HR-10", + "default_name":"Viroviti\u010dko-podravska \u017eupanija", + "country_id":59 + }, + { + "id":522, + "country_code":"HR", + "code":"HR-11", + "default_name":"Po\u017ee\u0161ko-slavonska \u017eupanija", + "country_id":59 + }, + { + "id":523, + "country_code":"HR", + "code":"HR-12", + "default_name":"Brodsko-posavska \u017eupanija", + "country_id":59 + }, + { + "id":524, + "country_code":"HR", + "code":"HR-13", + "default_name":"Zadarska \u017eupanija", + "country_id":59 + }, + { + "id":525, + "country_code":"HR", + "code":"HR-14", + "default_name":"Osje\u010dko-baranjska \u017eupanija", + "country_id":59 + }, + { + "id":526, + "country_code":"HR", + "code":"HR-15", + "default_name":"\u0160ibensko-kninska \u017eupanija", + "country_id":59 + }, + { + "id":527, + "country_code":"HR", + "code":"HR-16", + "default_name":"Vukovarsko-srijemska \u017eupanija", + "country_id":59 + }, + { + "id":528, + "country_code":"HR", + "code":"HR-17", + "default_name":"Splitsko-dalmatinska \u017eupanija", + "country_id":59 + }, + { + "id":529, + "country_code":"HR", + "code":"HR-18", + "default_name":"Istarska \u017eupanija", + "country_id":59 + }, + { + "id":530, + "country_code":"HR", + "code":"HR-19", + "default_name":"Dubrova\u010dko-neretvanska \u017eupanija", + "country_id":59 + }, + { + "id":531, + "country_code":"HR", + "code":"HR-20", + "default_name":"Me\u0111imurska \u017eupanija", + "country_id":59 + }, + { + "id":532, + "country_code":"HR", + "code":"HR-21", + "default_name":"Grad Zagreb", + "country_id":59 + }, + { + "id":533, + "country_code":"IN", + "code":"AN", + "default_name":"Andaman and Nicobar Islands", + "country_id":106 + }, + { + "id":534, + "country_code":"IN", + "code":"AP", + "default_name":"Andhra Pradesh", + "country_id":106 + }, + { + "id":535, + "country_code":"IN", + "code":"AR", + "default_name":"Arunachal Pradesh", + "country_id":106 + }, + { + "id":536, + "country_code":"IN", + "code":"AS", + "default_name":"Assam", + "country_id":106 + }, + { + "id":537, + "country_code":"IN", + "code":"BR", + "default_name":"Bihar", + "country_id":106 + }, + { + "id":538, + "country_code":"IN", + "code":"CH", + "default_name":"Chandigarh", + "country_id":106 + }, + { + "id":539, + "country_code":"IN", + "code":"CT", + "default_name":"Chhattisgarh", + "country_id":106 + }, + { + "id":540, + "country_code":"IN", + "code":"DN", + "default_name":"Dadra and Nagar Haveli", + "country_id":106 + }, + { + "id":541, + "country_code":"IN", + "code":"DD", + "default_name":"Daman and Diu", + "country_id":106 + }, + { + "id":542, + "country_code":"IN", + "code":"DL", + "default_name":"Delhi", + "country_id":106 + }, + { + "id":543, + "country_code":"IN", + "code":"GA", + "default_name":"Goa", + "country_id":106 + }, + { + "id":544, + "country_code":"IN", + "code":"GJ", + "default_name":"Gujarat", + "country_id":106 + }, + { + "id":545, + "country_code":"IN", + "code":"HR", + "default_name":"Haryana", + "country_id":106 + }, + { + "id":546, + "country_code":"IN", + "code":"HP", + "default_name":"Himachal Pradesh", + "country_id":106 + }, + { + "id":547, + "country_code":"IN", + "code":"JK", + "default_name":"Jammu and Kashmir", + "country_id":106 + }, + { + "id":548, + "country_code":"IN", + "code":"JH", + "default_name":"Jharkhand", + "country_id":106 + }, + { + "id":549, + "country_code":"IN", + "code":"KA", + "default_name":"Karnataka", + "country_id":106 + }, + { + "id":550, + "country_code":"IN", + "code":"KL", + "default_name":"Kerala", + "country_id":106 + }, + { + "id":551, + "country_code":"IN", + "code":"LD", + "default_name":"Lakshadweep", + "country_id":106 + }, + { + "id":552, + "country_code":"IN", + "code":"MP", + "default_name":"Madhya Pradesh", + "country_id":106 + }, + { + "id":553, + "country_code":"IN", + "code":"MH", + "default_name":"Maharashtra", + "country_id":106 + }, + { + "id":554, + "country_code":"IN", + "code":"MN", + "default_name":"Manipur", + "country_id":106 + }, + { + "id":555, + "country_code":"IN", + "code":"ML", + "default_name":"Meghalaya", + "country_id":106 + }, + { + "id":556, + "country_code":"IN", + "code":"MZ", + "default_name":"Mizoram", + "country_id":106 + }, + { + "id":557, + "country_code":"IN", + "code":"NL", + "default_name":"Nagaland", + "country_id":106 + }, + { + "id":558, + "country_code":"IN", + "code":"OR", + "default_name":"Odisha", + "country_id":106 + }, + { + "id":559, + "country_code":"IN", + "code":"PY", + "default_name":"Puducherry", + "country_id":106 + }, + { + "id":560, + "country_code":"IN", + "code":"PB", + "default_name":"Punjab", + "country_id":106 + }, + { + "id":561, + "country_code":"IN", + "code":"RJ", + "default_name":"Rajasthan", + "country_id":106 + }, + { + "id":562, + "country_code":"IN", + "code":"SK", + "default_name":"Sikkim", + "country_id":106 + }, + { + "id":563, + "country_code":"IN", + "code":"TN", + "default_name":"Tamil Nadu", + "country_id":106 + }, + { + "id":564, + "country_code":"IN", + "code":"TG", + "default_name":"Telangana", + "country_id":106 + }, + { + "id":565, + "country_code":"IN", + "code":"TR", + "default_name":"Tripura", + "country_id":106 + }, + { + "id":566, + "country_code":"IN", + "code":"UP", + "default_name":"Uttar Pradesh", + "country_id":106 + }, + { + "id":567, + "country_code":"IN", + "code":"UT", + "default_name":"Uttarakhand", + "country_id":106 + }, + { + "id":568, + "country_code":"IN", + "code":"WB", + "default_name":"West Bengal", + "country_id":106 + } +] \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Migrations/2018_07_20_054426_create_countries_table.php b/packages/Webkul/Core/src/Database/Migrations/2018_07_20_054426_create_countries_table.php index b740aa3b2..9ce87a9b5 100644 --- a/packages/Webkul/Core/src/Database/Migrations/2018_07_20_054426_create_countries_table.php +++ b/packages/Webkul/Core/src/Database/Migrations/2018_07_20_054426_create_countries_table.php @@ -17,8 +17,6 @@ class CreateCountriesTable extends Migration $table->increments('id'); $table->string('code'); $table->string('name'); - $table->boolean('status')->default(0); - $table->timestamps(); }); } diff --git a/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101803_create_country_translations_table.php b/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101803_create_country_translations_table.php new file mode 100644 index 000000000..a38c5bbce --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101803_create_country_translations_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('locale'); + $table->text('name')->nullable(); + + $table->integer('country_id')->unsigned(); + $table->foreign('country_id')->references('id')->on('countries')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('country_translations'); + } +} diff --git a/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101913_create_country_states_table.php b/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101913_create_country_states_table.php new file mode 100644 index 000000000..c7a159a4e --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101913_create_country_states_table.php @@ -0,0 +1,36 @@ +increments('id'); + $table->string('country_code')->nullable(); + $table->string('code')->nullable(); + $table->string('default_name')->nullable(); + + $table->integer('country_id')->nullable()->unsigned(); + $table->foreign('country_id')->references('id')->on('countries')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('country_states'); + } +} diff --git a/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101923_create_country_state_translations_table.php b/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101923_create_country_state_translations_table.php new file mode 100644 index 000000000..19b18f361 --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2018_10_12_101923_create_country_state_translations_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('locale'); + $table->text('name')->nullable(); + + $table->integer('country_state_id')->unsigned(); + $table->foreign('country_state_id')->references('id')->on('country_states')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('country_state_translations'); + } +} diff --git a/packages/Webkul/Core/src/Database/Seeders/CountriesTableSeeder.php b/packages/Webkul/Core/src/Database/Seeders/CountriesTableSeeder.php new file mode 100644 index 000000000..7822b5a75 --- /dev/null +++ b/packages/Webkul/Core/src/Database/Seeders/CountriesTableSeeder.php @@ -0,0 +1,18 @@ +delete(); + + $countries = json_decode(file_get_contents(__DIR__ . '/../../Data/countries.json'), true); + + DB::table('countries')->insert($countries); + } +} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder..php b/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder..php index c21905cca..9027e2dd5 100644 --- a/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder..php +++ b/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder..php @@ -3,16 +3,18 @@ namespace Webkul\Core\Database\Seeders; use Illuminate\Database\Seeder; -use Webkul\Core\Models\Currency; +use DB; class CurrencyTableSeeder extends Seeder { public function run() { - $currency = new Currency(); - $locale->code = 'USD'; - $locale->name = 'US Dollar'; - $locale->symbol = '$'; - $locale->save(); + DB::table('currencies')->delete(); + + DB::table('currencies')->insert([ + 'code' => 'USD', + 'name' => 'US Dollar', + 'symbol' => '$', + ]); } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Seeders/DatabaseSeeder.php b/packages/Webkul/Core/src/Database/Seeders/DatabaseSeeder.php index eef670023..3c4f95522 100644 --- a/packages/Webkul/Core/src/Database/Seeders/DatabaseSeeder.php +++ b/packages/Webkul/Core/src/Database/Seeders/DatabaseSeeder.php @@ -14,5 +14,8 @@ class DatabaseSeeder extends Seeder public function run() { $this->call(LocalesTableSeeder::class); + $this->call(LocalesTableSeeder::class); + $this->call(CountriesTableSeeder::class); + $this->call(StatesTableSeeder::class); } } diff --git a/packages/Webkul/Core/src/Database/Seeders/LocalesTableSeeder.php b/packages/Webkul/Core/src/Database/Seeders/LocalesTableSeeder.php index 2ebe3a789..3fe01c9db 100644 --- a/packages/Webkul/Core/src/Database/Seeders/LocalesTableSeeder.php +++ b/packages/Webkul/Core/src/Database/Seeders/LocalesTableSeeder.php @@ -3,22 +3,20 @@ namespace Webkul\Core\Database\Seeders; use Illuminate\Database\Seeder; -use Webkul\Core\Models\Locale; +use DB; class LocalesTableSeeder extends Seeder { public function run() { - \Illuminate\Database\Eloquent\Model::reguard(); - - $locale = new Locale(); - $locale->code = 'en'; - $locale->name = 'English'; - $locale->save(); + DB::table('locales')->delete(); - $locale = new Locale(); - $locale->code = 'fr'; - $locale->name = 'French'; - $locale->save(); + DB::table('locales')->insert([ + 'code' => 'en', + 'name' => 'English', + ], [ + 'code' => 'fr', + 'name' => 'French', + ]); } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Seeders/StatesTableSeeder.php b/packages/Webkul/Core/src/Database/Seeders/StatesTableSeeder.php new file mode 100644 index 000000000..a83812e60 --- /dev/null +++ b/packages/Webkul/Core/src/Database/Seeders/StatesTableSeeder.php @@ -0,0 +1,18 @@ +delete(); + + $states = json_decode(file_get_contents(__DIR__ . '/../../Data/states.json'), true); + + DB::table('country_states')->insert($states); + } +} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Http/Controllers/CountryController.php b/packages/Webkul/Core/src/Http/Controllers/CountryController.php deleted file mode 100644 index eeeae966e..000000000 --- a/packages/Webkul/Core/src/Http/Controllers/CountryController.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) - */ -class CountryController extends Controller -{ - /** - * Contains route related configuration - * - * @var array - */ - protected $_config; - - /** - * CountryRepository object - * - * @var array - */ - protected $country; - - /** - * Create a new controller instance. - * - * @param Webkul\Core\Repositories\CountryRepository $country - * @return void - */ - public function __construct(Country $country) - { - $this->middleware('admin'); - - $this->country = $country; - - $this->_config = request('_config'); - } - - /** - * Display a listing of the resource. - * - * @return \Illuminate\Http\Response - */ - public function index() - { - return view($this->_config['view']); - } - - /** - * Show the form for creating a new resource. - * - * @return \Illuminate\Http\Response - */ - public function create() - { - return view($this->_config['view']); - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function store(Request $request) - { - $this->validate(request(), [ - 'code' => 'required|unique:countries,code', - 'name' => 'required' - ]); - - $this->country->create(request()->all()); - - session()->flash('success', 'Country created successfully.'); - - return redirect()->route($this->_config['redirect']); - } - - /** - * Remove the specified resource from storage. - * - * @param int $id - * @return \Illuminate\Http\Response - */ - public function destroy($id) - { - // - } -} \ No newline at end of file diff --git a/packages/Webkul/Core/src/Models/Country.php b/packages/Webkul/Core/src/Models/Country.php index 02dfe326b..0ec3c07c7 100644 --- a/packages/Webkul/Core/src/Models/Country.php +++ b/packages/Webkul/Core/src/Models/Country.php @@ -6,12 +6,5 @@ use Illuminate\Database\Eloquent\Model; class Country extends Model { - /** - * The attributes that are mass assignable. - * - * @var array - */ - protected $fillable = [ - 'code', 'name' - ]; + public $timestamps = false; } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Models/CountryState.php b/packages/Webkul/Core/src/Models/CountryState.php new file mode 100644 index 000000000..2285ec9eb --- /dev/null +++ b/packages/Webkul/Core/src/Models/CountryState.php @@ -0,0 +1,10 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CountryStateRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Core\Models\CountryState'; + } +} \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/Controllers/HomeController.php b/packages/Webkul/Shop/src/Http/Controllers/HomeController.php index 8547cf847..58cb8283c 100644 --- a/packages/Webkul/Shop/src/Http/Controllers/HomeController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/HomeController.php @@ -6,7 +6,6 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Routing\Controller; use Webkul\Core\Repositories\SliderRepository as Sliders; -use Webkul\Channel\Channel as Channel; /** * Home page controller @@ -28,7 +27,6 @@ use Webkul\Channel\Channel as Channel; } public function index() { - $current_channel = core()->getCurrentChannel(); $all_sliders = $this->sliders->findWhere(['channel_id'=>$current_channel['id']]); diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index c3b84bd97..fdb844761 100644 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -186,6 +186,7 @@ return [ 'address2' => 'Address 2', 'city' => 'City', 'state' => 'State', + 'select-state' => 'Select a region, state or province.', 'postcode' => 'Zip/Postcode', 'phone' => 'Telephone', 'country' => 'Country', diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php index 22ece589d..af63858bd 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -142,6 +142,8 @@ selected_payment_method: '', disable_button: false, + + countryStates: @json(core()->groupedStatesByCountries()) }), methods: { @@ -152,6 +154,13 @@ } }, + haveStates(addressType) { + if(this.countryStates[this.address[addressType].country] && this.countryStates[this.address[addressType].country].length) + return true; + + return false; + }, + validateForm: function (scope) { this.$validator.validateAll(scope).then((result) => { if(result) { diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php index ce5ce3ba4..5c656b9a0 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php @@ -85,7 +85,18 @@ {{ __('shop::app.checkout.onepage.state') }} - + + + + @{{ errors.first('address-form.billing[state]') }} @@ -104,6 +115,26 @@
+
+ + + + + + @{{ errors.first('address-form.billing[country]') }} + +
+
-
- - - - - - @{{ errors.first('address-form.billing[country]') }} - -
-
@@ -225,7 +236,18 @@ {{ __('shop::app.checkout.onepage.state') }} - + + + + @{{ errors.first('address-form.shipping[state]') }} @@ -244,6 +266,26 @@
+
+ + + + + + @{{ errors.first('address-form.shipping[country]') }} + +
+
- -
- - - - - - @{{ errors.first('address-form.shipping[country]') }} - -
\ No newline at end of file diff --git a/packages/Webkul/Tax/src/Providers/TaxServiceProvider.php b/packages/Webkul/Tax/src/Providers/TaxServiceProvider.php index 006b45895..cdc144078 100644 --- a/packages/Webkul/Tax/src/Providers/TaxServiceProvider.php +++ b/packages/Webkul/Tax/src/Providers/TaxServiceProvider.php @@ -15,15 +15,6 @@ class TaxServiceProvider extends ServiceProvider public function boot(Router $router) { $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core'); - - $router->aliasMiddleware('locale', Locale::class); - - $router->aliasMiddleware('admin', RedirectIfNotAdmin::class); - - $router->aliasMiddleware('customer', RedirectIfNotCustomer::class); - } /** @@ -34,18 +25,4 @@ class TaxServiceProvider extends ServiceProvider public function register() { } - /** - * Register Bouncer as a singleton. - * - * @return void - */ - protected function registerFacades() - { - // $loader = AliasLoader::getInstance(); - // $loader->alias('core', CoreFacade::class); - - // $this->app->singleton('core', function () { - // return app()->make(Core::class); - // }); - } } \ No newline at end of file diff --git a/public/themes/default/assets/js/shop.js b/public/themes/default/assets/js/shop.js index 4f63bb63f..d0197a960 100644 --- a/public/themes/default/assets/js/shop.js +++ b/public/themes/default/assets/js/shop.js @@ -11535,7 +11535,7 @@ return jQuery; "use strict"; /* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! - * Vue.js v2.5.16 + * Vue.js v2.5.17 * (c) 2014-2018 Evan You * Released under the MIT License. */ @@ -16624,7 +16624,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', { value: FunctionalRenderContext }); -Vue.version = '2.5.16'; +Vue.version = '2.5.17'; /* */ @@ -31528,7 +31528,7 @@ if (false) { /* 50 */ /***/ (function(module, exports, __webpack_require__) { -!function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define("vue-slider-component",[],e):"object"==typeof exports?exports["vue-slider-component"]=e():t["vue-slider-component"]=e()}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var r=i[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,i){i(7);var s=i(5)(i(1),i(6),null,null);t.exports=s.exports},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=function(){var t="undefined"!=typeof window?window.devicePixelRatio||1:1;return function(e){return Math.round(e*t)/t}}();e.default={name:"VueSliderComponent",props:{width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:6},data:{type:Array,default:null},dotSize:{type:Number,default:16},dotWidth:{type:Number,required:!1},dotHeight:{type:Number,required:!1},min:{type:Number,default:0},max:{type:Number,default:100},interval:{type:Number,default:1},show:{type:Boolean,default:!0},disabled:{type:[Boolean,Array],default:!1},piecewise:{type:Boolean,default:!1},tooltip:{type:[String,Boolean],default:"always"},eventType:{type:String,default:"auto"},direction:{type:String,default:"horizontal"},reverse:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},clickable:{type:Boolean,default:!0},speed:{type:Number,default:.5},realTime:{type:Boolean,default:!1},stopPropagation:{type:Boolean,default:!1},value:{type:[String,Number,Array,Object],default:0},piecewiseLabel:{type:Boolean,default:!1},debug:{type:Boolean,default:!0},fixed:{type:Boolean,default:!1},processDragable:{type:Boolean,default:!1},useKeyboard:{type:Boolean,default:!1},actionsKeyboard:{type:Array,default:function(){return[function(t){return t-1},function(t){return t+1}]}},tooltipMerge:{type:Boolean,default:!0},startAnimation:{type:Boolean,default:!1},sliderStyle:[Array,Object,Function],focusStyle:[Array,Object,Function],tooltipDir:[Array,String],formatter:[String,Function],mergeFormatter:[String,Function],piecewiseStyle:Object,disabledStyle:Object,piecewiseActiveStyle:Object,processStyle:Object,bgStyle:Object,tooltipStyle:[Array,Object,Function],disabledDotStyle:[Array,Object,Function],labelStyle:Object,labelActiveStyle:Object},data:function(){return{flag:!1,keydownFlag:null,focusFlag:!1,processFlag:!1,processSign:null,size:0,fixedValue:0,focusSlider:0,currentValue:0,currentSlider:0,isComponentExists:!0,isMounted:!1}},computed:{dotWidthVal:function(){return"number"==typeof this.dotWidth?this.dotWidth:this.dotSize},dotHeightVal:function(){return"number"==typeof this.dotHeight?this.dotHeight:this.dotSize},flowDirection:function(){return"vue-slider-"+this.direction+(this.reverse?"-reverse":"")},tooltipMergedPosition:function(){if(!this.isMounted)return{};var t=this.tooltipDirection[0];if(this.$refs.dot0){if("vertical"===this.direction){var e={};return e[t]="-"+(this.dotHeightVal/2-this.width/2+9)+"px",e}var i={};return i[t]="-"+(this.dotWidthVal/2-this.height/2+9)+"px",i.left="50%",i}},tooltipDirection:function(){var t=this.tooltipDir||("vertical"===this.direction?"left":"top");return Array.isArray(t)?this.isRange?t:t[1]:this.isRange?[t,t]:t},tooltipStatus:function(){return"hover"===this.tooltip&&this.flag?"vue-slider-always":this.tooltip?"vue-slider-"+this.tooltip:""},tooltipClass:function(){return["vue-slider-tooltip-"+this.tooltipDirection,"vue-slider-tooltip"]},disabledArray:function(){return Array.isArray(this.disabled)?this.disabled:[this.disabled,this.disabled]},boolDisabled:function(){return this.disabledArray.every(function(t){return!0===t})},isDisabled:function(){return"none"===this.eventType||this.boolDisabled},disabledClass:function(){return this.boolDisabled?"vue-slider-disabled":""},stateClass:function(){return{"vue-slider-state-process-drag":this.processFlag,"vue-slider-state-drag":this.flag&&!this.processFlag&&!this.keydownFlag,"vue-slider-state-focus":this.focusFlag}},isRange:function(){return Array.isArray(this.value)},slider:function(){return this.isRange?[this.$refs.dot0,this.$refs.dot1]:this.$refs.dot},minimum:function(){return this.data?0:this.min},val:{get:function(){return this.data?this.isRange?[this.data[this.currentValue[0]],this.data[this.currentValue[1]]]:this.data[this.currentValue]:this.currentValue},set:function(t){if(this.data)if(this.isRange){var e=this.data.indexOf(t[0]),i=this.data.indexOf(t[1]);e>-1&&i>-1&&(this.currentValue=[e,i])}else{var s=this.data.indexOf(t);s>-1&&(this.currentValue=s)}else this.currentValue=t}},currentIndex:function(){return this.isRange?this.data?this.currentValue:[this.getIndexByValue(this.currentValue[0]),this.getIndexByValue(this.currentValue[1])]:this.getIndexByValue(this.currentValue)},indexRange:function(){return this.isRange?this.currentIndex:[0,this.currentIndex]},maximum:function(){return this.data?this.data.length-1:this.max},multiple:function(){var t=(""+this.interval).split(".")[1];return t?Math.pow(10,t.length):1},spacing:function(){return this.data?1:this.interval},total:function(){return this.data?this.data.length-1:(Math.floor((this.maximum-this.minimum)*this.multiple)%(this.interval*this.multiple)!=0&&this.printError("Prop[interval] is illegal, Please make sure that the interval can be divisible"),(this.maximum-this.minimum)/this.interval)},gap:function(){return this.size/this.total},position:function(){return this.isRange?[(this.currentValue[0]-this.minimum)/this.spacing*this.gap,(this.currentValue[1]-this.minimum)/this.spacing*this.gap]:(this.currentValue-this.minimum)/this.spacing*this.gap},limit:function(){return this.isRange?this.fixed?[[0,(this.total-this.fixedValue)*this.gap],[this.fixedValue*this.gap,this.size]]:[[0,this.position[1]],[this.position[0],this.size]]:[0,this.size]},valueLimit:function(){return this.isRange?this.fixed?[[this.minimum,this.maximum-this.fixedValue*(this.spacing*this.multiple)/this.multiple],[this.minimum+this.fixedValue*(this.spacing*this.multiple)/this.multiple,this.maximum]]:[[this.minimum,this.currentValue[1]],[this.currentValue[0],this.maximum]]:[this.minimum,this.maximum]},idleSlider:function(){return 0===this.currentSlider?1:0},wrapStyles:function(){return"vertical"===this.direction?{height:"number"==typeof this.height?this.height+"px":this.height,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}:{width:"number"==typeof this.width?this.width+"px":this.width,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}},sliderStyles:function(){return Array.isArray(this.sliderStyle)?this.isRange?this.sliderStyle:this.sliderStyle[1]:"function"==typeof this.sliderStyle?this.sliderStyle(this.val,this.currentIndex):this.isRange?[this.sliderStyle,this.sliderStyle]:this.sliderStyle},focusStyles:function(){return Array.isArray(this.focusStyle)?this.isRange?this.focusStyle:this.focusStyle[1]:"function"==typeof this.focusStyle?this.focusStyle(this.val,this.currentIndex):this.isRange?[this.focusStyle,this.focusStyle]:this.focusStyle},disabledDotStyles:function(){var t=this.disabledDotStyle;if(Array.isArray(t))return t;if("function"==typeof t){var e=t(this.val,this.currentIndex);return Array.isArray(e)?e:[e,e]}return t?[t,t]:[{backgroundColor:"#ccc"},{backgroundColor:"#ccc"}]},tooltipStyles:function(){return Array.isArray(this.tooltipStyle)?this.isRange?this.tooltipStyle:this.tooltipStyle[1]:"function"==typeof this.tooltipStyle?this.tooltipStyle(this.val,this.currentIndex):this.isRange?[this.tooltipStyle,this.tooltipStyle]:this.tooltipStyle},elemStyles:function(){return"vertical"===this.direction?{width:this.width+"px",height:"100%"}:{height:this.height+"px"}},dotStyles:function(){return"vertical"===this.direction?{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",left:-(this.dotWidthVal-this.width)/2+"px"}:{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",top:-(this.dotHeightVal-this.height)/2+"px"}},piecewiseDotStyle:function(){return"vertical"===this.direction?{width:this.width+"px",height:this.width+"px"}:{width:this.height+"px",height:this.height+"px"}},piecewiseDotWrap:function(){if(!this.piecewise&&!this.piecewiseLabel)return!1;for(var t=[],e=0;e<=this.total;e++){var i="vertical"===this.direction?{bottom:this.gap*e-this.width/2+"px",left:0}:{left:this.gap*e-this.height/2+"px",top:0},s=this.reverse?this.total-e:e,r=this.data?this.data[s]:this.spacing*s+this.min;t.push({style:i,label:this.formatter?this.formatting(r):r,inRange:s>=this.indexRange[0]&&s<=this.indexRange[1]})}return t}},watch:{value:function(t){this.flag||this.setValue(t,!0)},max:function(t){if(tthis.max)return this.printError("The minimum value can not be greater than the maximum value.");var e=this.limitValue(this.val);this.setValue(e),this.refresh()},show:function(t){var e=this;t&&!this.size&&this.$nextTick(function(){e.refresh()})},fixed:function(){this.computedFixedValue()}},methods:{bindEvents:function(){document.addEventListener("touchmove",this.moving,{passive:!1}),document.addEventListener("touchend",this.moveEnd,{passive:!1}),document.addEventListener("mousedown",this.blurSlider),document.addEventListener("mousemove",this.moving),document.addEventListener("mouseup",this.moveEnd),document.addEventListener("mouseleave",this.moveEnd),document.addEventListener("keydown",this.handleKeydown),document.addEventListener("keyup",this.handleKeyup),window.addEventListener("resize",this.refresh),this.isRange&&this.tooltipMerge&&(this.$refs.dot0.addEventListener("transitionend",this.handleOverlapTooltip),this.$refs.dot1.addEventListener("transitionend",this.handleOverlapTooltip))},unbindEvents:function(){document.removeEventListener("touchmove",this.moving),document.removeEventListener("touchend",this.moveEnd),document.removeEventListener("mousedown",this.blurSlider),document.removeEventListener("mousemove",this.moving),document.removeEventListener("mouseup",this.moveEnd),document.removeEventListener("mouseleave",this.moveEnd),document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("keyup",this.handleKeyup),window.removeEventListener("resize",this.refresh),this.isRange&&this.tooltipMerge&&(this.$refs.dot0.removeEventListener("transitionend",this.handleOverlapTooltip),this.$refs.dot1.removeEventListener("transitionend",this.handleOverlapTooltip))},handleKeydown:function(t){if(!this.useKeyboard||!this.focusFlag)return!1;switch(t.keyCode){case 37:case 40:t.preventDefault(),this.keydownFlag=!0,this.flag=!0,this.changeFocusSlider(this.actionsKeyboard[0]);break;case 38:case 39:t.preventDefault(),this.keydownFlag=!0,this.flag=!0,this.changeFocusSlider(this.actionsKeyboard[1])}},handleKeyup:function(){this.keydownFlag&&(this.keydownFlag=!1,this.flag=!1)},changeFocusSlider:function(t){var e=this;if(this.isRange){var i=this.currentIndex.map(function(i,s){if(s===e.focusSlider||e.fixed){var r=t(i),o=e.fixed?e.valueLimit[s]:[0,e.total];if(r<=o[1]&&r>=o[0])return r}return i});i[0]>i[1]&&(this.focusSlider=0===this.focusSlider?1:0,i=i.reverse()),this.setIndex(i)}else this.setIndex(t(this.currentIndex))},blurSlider:function(t){var e=this.isRange?this.$refs["dot"+this.focusSlider]:this.$refs.dot;if(!e||e===t.target)return!1;this.focusFlag=!1},formatting:function(t){return"string"==typeof this.formatter?this.formatter.replace(/\{value\}/,t):this.formatter(t)},mergeFormatting:function(t,e){return"string"==typeof this.mergeFormatter?this.mergeFormatter.replace(/\{(value1|value2)\}/g,function(i,s){return"value1"===s?t:e}):this.mergeFormatter(t,e)},getPos:function(t){return this.realTime&&this.getStaticData(),"vertical"===this.direction?this.reverse?t.pageY-this.offset:this.size-(t.pageY-this.offset):this.reverse?this.size-(t.clientX-this.offset):t.clientX-this.offset},processClick:function(t){this.fixed&&t.stopPropagation()},wrapClick:function(t){var e=this;if(this.isDisabled||!this.clickable||this.processFlag)return!1;var i=this.getPos(t);if(this.isRange)if(this.disabledArray.every(function(t){return!1===t}))this.currentSlider=i>(this.position[1]-this.position[0])/2+this.position[0]?1:0;else if(this.disabledArray[0]){if(ithis.position[1])return!1;this.currentSlider=0}if(this.disabledArray[this.currentSlider])return!1;if(this.setValueOnPos(i),this.isRange&&this.tooltipMerge){var s=setInterval(function(){return e.handleOverlapTooltip()},16.7);setTimeout(function(){return window.clearInterval(s)},1e3*this.speed)}},moveStart:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments[2];if(this.disabledArray[e])return!1;if(this.stopPropagation&&t.stopPropagation(),this.isRange&&(this.currentSlider=e,i)){if(!this.processDragable)return!1;this.processFlag=!0,this.processSign={pos:this.position,start:this.getPos(t.targetTouches&&t.targetTouches[0]?t.targetTouches[0]:t)}}!i&&this.useKeyboard&&(this.focusFlag=!0,this.focusSlider=e),this.flag=!0,this.$emit("drag-start",this)},moving:function(t){if(this.stopPropagation&&t.stopPropagation(),!this.flag)return!1;t.preventDefault(),t.targetTouches&&t.targetTouches[0]&&(t=t.targetTouches[0]),this.processFlag?(this.currentSlider=0,this.setValueOnPos(this.processSign.pos[0]+this.getPos(t)-this.processSign.start,!0),this.currentSlider=1,this.setValueOnPos(this.processSign.pos[1]+this.getPos(t)-this.processSign.start,!0)):this.setValueOnPos(this.getPos(t),!0),this.isRange&&this.tooltipMerge&&this.handleOverlapTooltip()},moveEnd:function(t){var e=this;if(this.stopPropagation&&t.stopPropagation(),!this.flag)return!1;this.$emit("drag-end",this),this.lazy&&this.isDiff(this.val,this.value)&&this.syncValue(),this.flag=!1,window.setTimeout(function(){e.processFlag=!1},0),this.setPosition()},setValueOnPos:function(t,e){var i=this.isRange?this.limit[this.currentSlider]:this.limit,s=this.isRange?this.valueLimit[this.currentSlider]:this.valueLimit;if(t>=i[0]&&t<=i[1]){this.setTransform(t);var r=this.getValueByIndex(Math.round(t/this.gap));this.setCurrentValue(r,e),this.isRange&&this.fixed&&(this.setTransform(t+this.fixedValue*this.gap*(0===this.currentSlider?1:-1),!0),this.setCurrentValue((r*this.multiple+this.fixedValue*this.spacing*this.multiple*(0===this.currentSlider?1:-1))/this.multiple,e,!0))}else tthis.maximum)return!1;this.isRange?this.isDiff(this.currentValue[s],t)&&(this.currentValue.splice(s,1,t),this.lazy&&this.flag||this.syncValue()):this.isDiff(this.currentValue,t)&&(this.currentValue=t,this.lazy&&this.flag||this.syncValue()),e||this.setPosition()},getValueByIndex:function(t){return(this.spacing*this.multiple*t+this.minimum*this.multiple)/this.multiple},getIndexByValue:function(t){return Math.round((t-this.minimum)*this.multiple)/(this.spacing*this.multiple)},setIndex:function(t){if(Array.isArray(t)&&this.isRange){var e=void 0;e=this.data?[this.data[t[0]],this.data[t[1]]]:[this.getValueByIndex(t[0]),this.getValueByIndex(t[1])],this.setValue(e)}else t=this.getValueByIndex(t),this.isRange&&(this.currentSlider=t>(this.currentValue[1]-this.currentValue[0])/2+this.currentValue[0]?1:0),this.setCurrentValue(t)},setValue:function(t,e,i){var s=this;if(this.isDiff(this.val,t)){var r=this.limitValue(t);this.val=this.isRange?r.concat():r,this.computedFixedValue(),this.syncValue(e)}this.$nextTick(function(){return s.setPosition(i)})},computedFixedValue:function(){if(!this.fixed)return this.fixedValue=0,!1;this.fixedValue=this.currentIndex[1]-this.currentIndex[0]},setPosition:function(t){this.flag||this.setTransitionTime(void 0===t?this.speed:t),this.isRange?(this.setTransform(this.position[0],1===this.currentSlider),this.setTransform(this.position[1],0===this.currentSlider)):this.setTransform(this.position),this.flag||this.setTransitionTime(0)},setTransform:function(t,e){var i=e?this.idleSlider:this.currentSlider,r=s(("vertical"===this.direction?this.dotHeightVal/2-t:t-this.dotWidthVal/2)*(this.reverse?-1:1)),o="vertical"===this.direction?"translateY("+r+"px)":"translateX("+r+"px)",n=this.fixed?this.fixedValue*this.gap+"px":(0===i?this.position[1]-t:t-this.position[0])+"px",l=this.fixed?(0===i?t:t-this.fixedValue*this.gap)+"px":(0===i?t:this.position[0])+"px";this.isRange?(this.slider[i].style.transform=o,this.slider[i].style.WebkitTransform=o,this.slider[i].style.msTransform=o,"vertical"===this.direction?(this.$refs.process.style.height=n,this.$refs.process.style[this.reverse?"top":"bottom"]=l):(this.$refs.process.style.width=n,this.$refs.process.style[this.reverse?"right":"left"]=l)):(this.slider.style.transform=o,this.slider.style.WebkitTransform=o,this.slider.style.msTransform=o,"vertical"===this.direction?(this.$refs.process.style.height=t+"px",this.$refs.process.style[this.reverse?"top":"bottom"]=0):(this.$refs.process.style.width=t+"px",this.$refs.process.style[this.reverse?"right":"left"]=0))},setTransitionTime:function(t){if(t||this.$refs.process.offsetWidth,this.isRange){for(var e=0;ee.max?(e.printError("The value of the slider is "+t+", the maximum value is "+e.max+", the value of this slider can not be greater than the maximum value"),e.max):i};return this.isRange?t.map(function(t){return i(t)}):i(t)},syncValue:function(t){var e=this.isRange?this.val.concat():this.val;this.$emit("input",e),t||this.$emit("callback",e)},getValue:function(){return this.val},getIndex:function(){return this.currentIndex},getStaticData:function(){this.$refs.elem&&(this.size="vertical"===this.direction?this.$refs.elem.offsetHeight:this.$refs.elem.offsetWidth,this.offset="vertical"===this.direction?this.$refs.elem.getBoundingClientRect().top+window.pageYOffset||document.documentElement.scrollTop:this.$refs.elem.getBoundingClientRect().left)},refresh:function(){this.$refs.elem&&(this.getStaticData(),this.computedFixedValue(),this.setPosition())},printError:function(t){this.debug&&console.error("[VueSlider error]: "+t)},handleOverlapTooltip:function(){var t=this.tooltipDirection[0]===this.tooltipDirection[1];if(this.isRange&&t){var e=this.reverse?this.$refs.tooltip1:this.$refs.tooltip0,i=this.reverse?this.$refs.tooltip0:this.$refs.tooltip1,s=e.getBoundingClientRect().right,r=i.getBoundingClientRect().left,o=e.getBoundingClientRect().y,n=i.getBoundingClientRect().y+i.getBoundingClientRect().height,l="horizontal"===this.direction&&s>r,a="vertical"===this.direction&&n>o;l||a?this.handleDisplayMergedTooltip(!0):this.handleDisplayMergedTooltip(!1)}},handleDisplayMergedTooltip:function(t){var e=this.$refs.tooltip0,i=this.$refs.tooltip1,s=this.$refs.process.getElementsByClassName("vue-merged-tooltip")[0];t?(e.style.visibility="hidden",i.style.visibility="hidden",s.style.visibility="visible"):(e.style.visibility="visible",i.style.visibility="visible",s.style.visibility="hidden")}},mounted:function(){var t=this;if(this.isComponentExists=!0,"undefined"==typeof window||"undefined"==typeof document)return this.printError("window or document is undefined, can not be initialization.");this.$nextTick(function(){t.isComponentExists&&(t.getStaticData(),t.setValue(t.limitValue(t.value),!0,t.startAnimation?t.speed:0),t.bindEvents())}),this.isMounted=!0},beforeDestroy:function(){this.isComponentExists=!1,this.unbindEvents()}}},function(t,e,i){"use strict";var s=i(0);t.exports=s},function(t,e,i){e=t.exports=i(4)(),e.push([t.i,'.vue-slider-component{position:relative;box-sizing:border-box;-ms-user-select:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none}.vue-slider-component.vue-slider-disabled{opacity:.5;cursor:not-allowed}.vue-slider-component.vue-slider-has-label{margin-bottom:15px}.vue-slider-component.vue-slider-disabled .vue-slider-dot{cursor:not-allowed}.vue-slider-component .vue-slider{position:relative;display:block;border-radius:15px;background-color:#ccc}.vue-slider-component .vue-slider:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}.vue-slider-component .vue-slider-process{position:absolute;border-radius:15px;background-color:#3498db;transition:all 0s;z-index:1}.vue-slider-component .vue-slider-process.vue-slider-process-dragable{cursor:pointer;z-index:3}.vue-slider-component.vue-slider-horizontal .vue-slider-process{width:0;height:100%;top:0;left:0;will-change:width}.vue-slider-component.vue-slider-vertical .vue-slider-process{width:100%;height:0;bottom:0;left:0;will-change:height}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-process{width:0;height:100%;top:0;right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-process{width:100%;height:0;top:0;left:0}.vue-slider-component .vue-slider-dot{position:absolute;border-radius:50%;background-color:#fff;box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);transition:all 0s;will-change:transform;cursor:pointer;z-index:5}.vue-slider-component .vue-slider-dot.vue-slider-dot-focus{box-shadow:0 0 2px 1px #3498db}.vue-slider-component .vue-slider-dot.vue-slider-dot-dragging{z-index:5}.vue-slider-component .vue-slider-dot.vue-slider-dot-disabled{z-index:4}.vue-slider-component.vue-slider-horizontal .vue-slider-dot{left:0}.vue-slider-component.vue-slider-vertical .vue-slider-dot{bottom:0}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-dot{right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-dot{top:0}.vue-slider-component .vue-slider-tooltip-wrap{display:none;position:absolute;z-index:9}.vue-slider-component .vue-slider-tooltip{display:block;font-size:14px;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #3498db;background-color:#3498db}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top{top:-9px;left:50%;transform:translate(-50%,-100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom{bottom:-9px;left:50%;transform:translate(-50%,100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left{top:50%;left:-9px;transform:translate(-100%,-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right{top:50%;right:-9px;transform:translate(100%,-50%)}.vue-slider-component .vue-slider-tooltip-top .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top .vue-slider-tooltip:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-top-color:inherit;transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-merged-tooltip{display:block;visibility:hidden}.vue-slider-component .vue-slider-tooltip-bottom .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom .vue-slider-tooltip:before{content:"";position:absolute;top:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-bottom-color:inherit;transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-left .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left .vue-slider-tooltip:before{content:"";position:absolute;top:50%;right:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-left-color:inherit;transform:translateY(-50%)}.vue-slider-component .vue-slider-tooltip-right .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right .vue-slider-tooltip:before{content:"";position:absolute;top:50%;left:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-right-color:inherit;transform:translateY(-50%)}.vue-slider-component .vue-slider-dot.vue-slider-hover:hover .vue-slider-tooltip-wrap{display:block}.vue-slider-component .vue-slider-dot.vue-slider-always .vue-slider-tooltip-wrap{display:block!important}.vue-slider-component .vue-slider-piecewise{position:absolute;width:100%;padding:0;margin:0;left:0;top:0;height:100%;list-style:none}.vue-slider-component .vue-slider-piecewise-item{position:absolute;width:8px;height:8px}.vue-slider-component .vue-slider-piecewise-dot{position:absolute;left:50%;top:50%;width:100%;height:100%;display:inline-block;background-color:rgba(0,0,0,.16);border-radius:50%;transform:translate(-50%,-50%);z-index:2;transition:all .3s}.vue-slider-component .vue-slider-piecewise-item:first-child .vue-slider-piecewise-dot,.vue-slider-component .vue-slider-piecewise-item:last-child .vue-slider-piecewise-dot{visibility:hidden}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-horizontal .vue-slider-piecewise-label{position:absolute;display:inline-block;top:100%;left:50%;white-space:nowrap;font-size:12px;color:#333;transform:translate(-50%,8px);visibility:visible}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-vertical .vue-slider-piecewise-label{position:absolute;display:inline-block;top:50%;left:100%;white-space:nowrap;font-size:12px;color:#333;transform:translate(8px,-50%);visibility:visible}.vue-slider-component .vue-slider-sr-only{clip:rect(1px,1px,1px,1px);height:1px;width:1px;overflow:hidden;position:absolute!important}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;ei.parts.length&&(s.parts.length=i.parts.length)}else{for(var n=[],r=0;r-1&&i>-1&&(this.currentValue=[e,i])}else{var s=this.data.indexOf(t);s>-1&&(this.currentValue=s)}else this.currentValue=t}},currentIndex:function(){return this.isRange?this.data?this.currentValue:[this.getIndexByValue(this.currentValue[0]),this.getIndexByValue(this.currentValue[1])]:this.getIndexByValue(this.currentValue)},indexRange:function(){return this.isRange?this.currentIndex:[0,this.currentIndex]},maximum:function(){return this.data?this.data.length-1:this.max},multiple:function(){var t=(""+this.interval).split(".")[1];return t?Math.pow(10,t.length):1},spacing:function(){return this.data?1:this.interval},total:function(){return this.data?this.data.length-1:(Math.floor((this.maximum-this.minimum)*this.multiple)%(this.interval*this.multiple)!=0&&this.printError("Prop[interval] is illegal, Please make sure that the interval can be divisible"),(this.maximum-this.minimum)/this.interval)},gap:function(){return this.size/this.total},position:function(){return this.isRange?[(this.currentValue[0]-this.minimum)/this.spacing*this.gap,(this.currentValue[1]-this.minimum)/this.spacing*this.gap]:(this.currentValue-this.minimum)/this.spacing*this.gap},limit:function(){return this.isRange?this.fixed?[[0,(this.total-this.fixedValue)*this.gap],[this.fixedValue*this.gap,this.size]]:[[0,this.position[1]],[this.position[0],this.size]]:[0,this.size]},valueLimit:function(){return this.isRange?this.fixed?[[this.minimum,this.maximum-this.fixedValue*(this.spacing*this.multiple)/this.multiple],[this.minimum+this.fixedValue*(this.spacing*this.multiple)/this.multiple,this.maximum]]:[[this.minimum,this.currentValue[1]],[this.currentValue[0],this.maximum]]:[this.minimum,this.maximum]},idleSlider:function(){return 0===this.currentSlider?1:0},wrapStyles:function(){return"vertical"===this.direction?{height:"number"==typeof this.height?this.height+"px":this.height,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}:{width:"number"==typeof this.width?this.width+"px":this.width,padding:this.dotHeightVal/2+"px "+this.dotWidthVal/2+"px"}},sliderStyles:function(){return Array.isArray(this.sliderStyle)?this.isRange?this.sliderStyle:this.sliderStyle[1]:"function"==typeof this.sliderStyle?this.sliderStyle(this.val,this.currentIndex):this.isRange?[this.sliderStyle,this.sliderStyle]:this.sliderStyle},focusStyles:function(){return Array.isArray(this.focusStyle)?this.isRange?this.focusStyle:this.focusStyle[1]:"function"==typeof this.focusStyle?this.focusStyle(this.val,this.currentIndex):this.isRange?[this.focusStyle,this.focusStyle]:this.focusStyle},disabledDotStyles:function(){var t=this.disabledDotStyle;if(Array.isArray(t))return t;if("function"==typeof t){var e=t(this.val,this.currentIndex);return Array.isArray(e)?e:[e,e]}return t?[t,t]:[{backgroundColor:"#ccc"},{backgroundColor:"#ccc"}]},tooltipStyles:function(){return Array.isArray(this.tooltipStyle)?this.isRange?this.tooltipStyle:this.tooltipStyle[1]:"function"==typeof this.tooltipStyle?this.tooltipStyle(this.val,this.currentIndex):this.isRange?[this.tooltipStyle,this.tooltipStyle]:this.tooltipStyle},elemStyles:function(){return"vertical"===this.direction?{width:this.width+"px",height:"100%"}:{height:this.height+"px"}},dotStyles:function(){return"vertical"===this.direction?{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",left:-(this.dotWidthVal-this.width)/2+"px"}:{width:this.dotWidthVal+"px",height:this.dotHeightVal+"px",top:-(this.dotHeightVal-this.height)/2+"px"}},piecewiseDotStyle:function(){return"vertical"===this.direction?{width:this.width+"px",height:this.width+"px"}:{width:this.height+"px",height:this.height+"px"}},piecewiseDotWrap:function(){if(!this.piecewise&&!this.piecewiseLabel)return!1;for(var t=[],e=0;e<=this.total;e++){var i="vertical"===this.direction?{bottom:this.gap*e-this.width/2+"px",left:0}:{left:this.gap*e-this.height/2+"px",top:0},s=this.reverse?this.total-e:e,r=this.data?this.data[s]:this.spacing*s+this.min;t.push({style:i,label:this.formatter?this.formatting(r):r,inRange:s>=this.indexRange[0]&&s<=this.indexRange[1]})}return t}},watch:{value:function(t){this.flag||this.setValue(t,!0)},max:function(t){if(tthis.max)return this.printError("The minimum value can not be greater than the maximum value.");var e=this.limitValue(this.val);this.setValue(e),this.refresh()},show:function(t){var e=this;t&&!this.size&&this.$nextTick(function(){e.refresh()})},fixed:function(){this.computedFixedValue()}},methods:{bindEvents:function(){document.addEventListener("touchmove",this.moving,{passive:!1}),document.addEventListener("touchend",this.moveEnd,{passive:!1}),document.addEventListener("mousedown",this.blurSlider),document.addEventListener("mousemove",this.moving),document.addEventListener("mouseup",this.moveEnd),document.addEventListener("mouseleave",this.moveEnd),document.addEventListener("keydown",this.handleKeydown),document.addEventListener("keyup",this.handleKeyup),window.addEventListener("resize",this.refresh),this.isRange&&this.tooltipMerge&&(this.$refs.dot0.addEventListener("transitionend",this.handleOverlapTooltip),this.$refs.dot1.addEventListener("transitionend",this.handleOverlapTooltip))},unbindEvents:function(){document.removeEventListener("touchmove",this.moving),document.removeEventListener("touchend",this.moveEnd),document.removeEventListener("mousedown",this.blurSlider),document.removeEventListener("mousemove",this.moving),document.removeEventListener("mouseup",this.moveEnd),document.removeEventListener("mouseleave",this.moveEnd),document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("keyup",this.handleKeyup),window.removeEventListener("resize",this.refresh),this.isRange&&this.tooltipMerge&&(this.$refs.dot0.removeEventListener("transitionend",this.handleOverlapTooltip),this.$refs.dot1.removeEventListener("transitionend",this.handleOverlapTooltip))},handleKeydown:function(t){if(!this.useKeyboard||!this.focusFlag)return!1;switch(t.keyCode){case 37:case 40:t.preventDefault(),this.keydownFlag=!0,this.flag=!0,this.changeFocusSlider(this.actionsKeyboard[0]);break;case 38:case 39:t.preventDefault(),this.keydownFlag=!0,this.flag=!0,this.changeFocusSlider(this.actionsKeyboard[1])}},handleKeyup:function(){this.keydownFlag&&(this.keydownFlag=!1,this.flag=!1)},changeFocusSlider:function(t){var e=this;if(this.isRange){var i=this.currentIndex.map(function(i,s){if(s===e.focusSlider||e.fixed){var r=t(i),o=e.fixed?e.valueLimit[s]:[0,e.total];if(r<=o[1]&&r>=o[0])return r}return i});i[0]>i[1]&&(this.focusSlider=0===this.focusSlider?1:0,i=i.reverse()),this.setIndex(i)}else this.setIndex(t(this.currentIndex))},blurSlider:function(t){var e=this.isRange?this.$refs["dot"+this.focusSlider]:this.$refs.dot;if(!e||e===t.target)return!1;this.focusFlag=!1},formatting:function(t){return"string"==typeof this.formatter?this.formatter.replace(/\{value\}/,t):this.formatter(t)},mergeFormatting:function(t,e){return"string"==typeof this.mergeFormatter?this.mergeFormatter.replace(/\{(value1|value2)\}/g,function(i,s){return"value1"===s?t:e}):this.mergeFormatter(t,e)},getPos:function(t){return this.realTime&&this.getStaticData(),"vertical"===this.direction?this.reverse?t.pageY-this.offset:this.size-(t.pageY-this.offset):this.reverse?this.size-(t.clientX-this.offset):t.clientX-this.offset},processClick:function(t){this.fixed&&t.stopPropagation()},wrapClick:function(t){var e=this;if(this.isDisabled||!this.clickable||this.processFlag)return!1;var i=this.getPos(t);if(this.isRange)if(this.disabledArray.every(function(t){return!1===t}))this.currentSlider=i>(this.position[1]-this.position[0])/2+this.position[0]?1:0;else if(this.disabledArray[0]){if(ithis.position[1])return!1;this.currentSlider=0}if(this.disabledArray[this.currentSlider])return!1;if(this.setValueOnPos(i),this.isRange&&this.tooltipMerge){var s=setInterval(function(){return e.handleOverlapTooltip()},16.7);setTimeout(function(){return window.clearInterval(s)},1e3*this.speed)}},moveStart:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments[2];if(this.disabledArray[e])return!1;if(this.stopPropagation&&t.stopPropagation(),this.isRange&&(this.currentSlider=e,i)){if(!this.processDragable)return!1;this.processFlag=!0,this.processSign={pos:this.position,start:this.getPos(t.targetTouches&&t.targetTouches[0]?t.targetTouches[0]:t)}}!i&&this.useKeyboard&&(this.focusFlag=!0,this.focusSlider=e),this.flag=!0,this.$emit("drag-start",this)},moving:function(t){if(this.stopPropagation&&t.stopPropagation(),!this.flag)return!1;t.preventDefault(),t.targetTouches&&t.targetTouches[0]&&(t=t.targetTouches[0]),this.processFlag?(this.currentSlider=0,this.setValueOnPos(this.processSign.pos[0]+this.getPos(t)-this.processSign.start,!0),this.currentSlider=1,this.setValueOnPos(this.processSign.pos[1]+this.getPos(t)-this.processSign.start,!0)):this.setValueOnPos(this.getPos(t),!0),this.isRange&&this.tooltipMerge&&this.handleOverlapTooltip()},moveEnd:function(t){var e=this;if(this.stopPropagation&&t.stopPropagation(),!this.flag)return!1;this.$emit("drag-end",this),this.lazy&&this.isDiff(this.val,this.value)&&this.syncValue(),this.flag=!1,window.setTimeout(function(){e.processFlag=!1},0),this.setPosition()},setValueOnPos:function(t,e){var i=this.isRange?this.limit[this.currentSlider]:this.limit,s=this.isRange?this.valueLimit[this.currentSlider]:this.valueLimit;if(t>=i[0]&&t<=i[1]){this.setTransform(t);var r=this.getValueByIndex(Math.round(t/this.gap));this.setCurrentValue(r,e),this.isRange&&this.fixed&&(this.setTransform(t+this.fixedValue*this.gap*(0===this.currentSlider?1:-1),!0),this.setCurrentValue((r*this.multiple+this.fixedValue*this.spacing*this.multiple*(0===this.currentSlider?1:-1))/this.multiple,e,!0))}else tthis.maximum)return!1;this.isRange?this.isDiff(this.currentValue[s],t)&&(this.currentValue.splice(s,1,t),this.lazy&&this.flag||this.syncValue()):this.isDiff(this.currentValue,t)&&(this.currentValue=t,this.lazy&&this.flag||this.syncValue()),e||this.setPosition()},getValueByIndex:function(t){return(this.spacing*this.multiple*t+this.minimum*this.multiple)/this.multiple},getIndexByValue:function(t){return Math.round((t-this.minimum)*this.multiple)/(this.spacing*this.multiple)},setIndex:function(t){if(Array.isArray(t)&&this.isRange){var e=void 0;e=this.data?[this.data[t[0]],this.data[t[1]]]:[this.getValueByIndex(t[0]),this.getValueByIndex(t[1])],this.setValue(e)}else t=this.getValueByIndex(t),this.isRange&&(this.currentSlider=t>(this.currentValue[1]-this.currentValue[0])/2+this.currentValue[0]?1:0),this.setCurrentValue(t)},setValue:function(t,e,i){var s=this;if(this.isDiff(this.val,t)){var r=this.limitValue(t);this.val=this.isRange?r.concat():r,this.computedFixedValue(),this.syncValue(e)}this.$nextTick(function(){return s.setPosition(i)})},computedFixedValue:function(){if(!this.fixed)return this.fixedValue=0,!1;this.fixedValue=this.currentIndex[1]-this.currentIndex[0]},setPosition:function(t){this.flag||this.setTransitionTime(void 0===t?this.speed:t),this.isRange?(this.setTransform(this.position[0],1===this.currentSlider),this.setTransform(this.position[1],0===this.currentSlider)):this.setTransform(this.position),this.flag||this.setTransitionTime(0)},setTransform:function(t,e){var i=e?this.idleSlider:this.currentSlider,r=s(("vertical"===this.direction?this.dotHeightVal/2-t:t-this.dotWidthVal/2)*(this.reverse?-1:1)),o="vertical"===this.direction?"translateY("+r+"px)":"translateX("+r+"px)",n=this.fixed?this.fixedValue*this.gap+"px":(0===i?this.position[1]-t:t-this.position[0])+"px",l=this.fixed?(0===i?t:t-this.fixedValue*this.gap)+"px":(0===i?t:this.position[0])+"px";this.isRange?(this.slider[i].style.transform=o,this.slider[i].style.WebkitTransform=o,this.slider[i].style.msTransform=o,"vertical"===this.direction?(this.$refs.process.style.height=n,this.$refs.process.style[this.reverse?"top":"bottom"]=l):(this.$refs.process.style.width=n,this.$refs.process.style[this.reverse?"right":"left"]=l)):(this.slider.style.transform=o,this.slider.style.WebkitTransform=o,this.slider.style.msTransform=o,"vertical"===this.direction?(this.$refs.process.style.height=t+"px",this.$refs.process.style[this.reverse?"top":"bottom"]=0):(this.$refs.process.style.width=t+"px",this.$refs.process.style[this.reverse?"right":"left"]=0))},setTransitionTime:function(t){if(t||this.$refs.process.offsetWidth,this.isRange){for(var e=0;ee.max?(e.printError("The value of the slider is "+t+", the maximum value is "+e.max+", the value of this slider can not be greater than the maximum value"),e.max):i};return this.isRange?t.map(function(t){return i(t)}):i(t)},syncValue:function(t){var e=this.isRange?this.val.concat():this.val;this.$emit("input",e),t||this.$emit("callback",e)},getValue:function(){return this.val},getIndex:function(){return this.currentIndex},getStaticData:function(){this.$refs.elem&&(this.size="vertical"===this.direction?this.$refs.elem.offsetHeight:this.$refs.elem.offsetWidth,this.offset="vertical"===this.direction?this.$refs.elem.getBoundingClientRect().top+window.pageYOffset||document.documentElement.scrollTop:this.$refs.elem.getBoundingClientRect().left)},refresh:function(){this.$refs.elem&&(this.getStaticData(),this.computedFixedValue(),this.setPosition())},printError:function(t){this.debug&&console.error("[VueSlider error]: "+t)},handleOverlapTooltip:function(){var t=this.tooltipDirection[0]===this.tooltipDirection[1];if(this.isRange&&t){var e=this.reverse?this.$refs.tooltip1:this.$refs.tooltip0,i=this.reverse?this.$refs.tooltip0:this.$refs.tooltip1,s=e.getBoundingClientRect().right,r=i.getBoundingClientRect().left,o=e.getBoundingClientRect().y,n=i.getBoundingClientRect().y+i.getBoundingClientRect().height,l="horizontal"===this.direction&&s>r,a="vertical"===this.direction&&n>o;l||a?this.handleDisplayMergedTooltip(!0):this.handleDisplayMergedTooltip(!1)}},handleDisplayMergedTooltip:function(t){var e=this.$refs.tooltip0,i=this.$refs.tooltip1,s=this.$refs.process.getElementsByClassName("vue-merged-tooltip")[0];t?(e.style.visibility="hidden",i.style.visibility="hidden",s.style.visibility="visible"):(e.style.visibility="visible",i.style.visibility="visible",s.style.visibility="hidden")}},mounted:function(){var t=this;if(this.isComponentExists=!0,"undefined"==typeof window||"undefined"==typeof document)return this.printError("window or document is undefined, can not be initialization.");this.$nextTick(function(){t.isComponentExists&&(t.getStaticData(),t.setValue(t.limitValue(t.value),!0,0),t.bindEvents())}),this.isMounted=!0},beforeDestroy:function(){this.isComponentExists=!1,this.unbindEvents()}}},function(t,e,i){"use strict";var s=i(0);t.exports=s},function(t,e,i){e=t.exports=i(4)(),e.push([t.i,'.vue-slider-component{position:relative;box-sizing:border-box;-ms-user-select:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none}.vue-slider-component.vue-slider-disabled{opacity:.5;cursor:not-allowed}.vue-slider-component.vue-slider-has-label{margin-bottom:15px}.vue-slider-component.vue-slider-disabled .vue-slider-dot{cursor:not-allowed}.vue-slider-component .vue-slider{position:relative;display:block;border-radius:15px;background-color:#ccc}.vue-slider-component .vue-slider:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}.vue-slider-component .vue-slider-process{position:absolute;border-radius:15px;background-color:#3498db;transition:all 0s;z-index:1}.vue-slider-component .vue-slider-process.vue-slider-process-dragable{cursor:pointer;z-index:3}.vue-slider-component.vue-slider-horizontal .vue-slider-process{width:0;height:100%;top:0;left:0;will-change:width}.vue-slider-component.vue-slider-vertical .vue-slider-process{width:100%;height:0;bottom:0;left:0;will-change:height}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-process{width:0;height:100%;top:0;right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-process{width:100%;height:0;top:0;left:0}.vue-slider-component .vue-slider-dot{position:absolute;border-radius:50%;background-color:#fff;box-shadow:.5px .5px 2px 1px rgba(0,0,0,.32);transition:all 0s;will-change:transform;cursor:pointer;z-index:5}.vue-slider-component .vue-slider-dot.vue-slider-dot-focus{box-shadow:0 0 2px 1px #3498db}.vue-slider-component .vue-slider-dot.vue-slider-dot-dragging{z-index:5}.vue-slider-component .vue-slider-dot.vue-slider-dot-disabled{z-index:4}.vue-slider-component.vue-slider-horizontal .vue-slider-dot{left:0}.vue-slider-component.vue-slider-vertical .vue-slider-dot{bottom:0}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-dot{right:0}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-dot{top:0}.vue-slider-component .vue-slider-tooltip-wrap{display:none;position:absolute;z-index:9}.vue-slider-component .vue-slider-tooltip{display:block;font-size:14px;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:5px;border:1px solid #3498db;background-color:#3498db}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top{top:-9px;left:50%;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom{bottom:-9px;left:50%;-webkit-transform:translate(-50%,100%);transform:translate(-50%,100%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left{top:50%;left:-9px;-webkit-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right{top:50%;right:-9px;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}.vue-slider-component .vue-slider-tooltip-top .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-top .vue-slider-tooltip:before{content:"";position:absolute;bottom:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-top-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-wrap.vue-merged-tooltip{display:block;visibility:hidden}.vue-slider-component .vue-slider-tooltip-bottom .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-bottom .vue-slider-tooltip:before{content:"";position:absolute;top:-10px;left:50%;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-bottom-color:inherit;-webkit-transform:translate(-50%);transform:translate(-50%)}.vue-slider-component .vue-slider-tooltip-left .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-left .vue-slider-tooltip:before{content:"";position:absolute;top:50%;right:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-left-color:inherit;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-component .vue-slider-tooltip-right .vue-merged-tooltip .vue-slider-tooltip:before,.vue-slider-component .vue-slider-tooltip-wrap.vue-slider-tooltip-right .vue-slider-tooltip:before{content:"";position:absolute;top:50%;left:-10px;width:0;height:0;border:5px solid transparent;border:6px solid transparent\\0;border-right-color:inherit;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-component .vue-slider-dot.vue-slider-hover:hover .vue-slider-tooltip-wrap{display:block}.vue-slider-component .vue-slider-dot.vue-slider-always .vue-slider-tooltip-wrap{display:block!important}.vue-slider-component .vue-slider-piecewise{position:absolute;width:100%;padding:0;margin:0;left:0;top:0;height:100%;list-style:none}.vue-slider-component .vue-slider-piecewise-item{position:absolute;width:8px;height:8px}.vue-slider-component .vue-slider-piecewise-dot{position:absolute;left:50%;top:50%;width:100%;height:100%;display:inline-block;background-color:rgba(0,0,0,.16);border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:2;transition:all .3s}.vue-slider-component .vue-slider-piecewise-item:first-child .vue-slider-piecewise-dot,.vue-slider-component .vue-slider-piecewise-item:last-child .vue-slider-piecewise-dot{visibility:hidden}.vue-slider-component.vue-slider-horizontal-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-horizontal .vue-slider-piecewise-label{position:absolute;display:inline-block;top:100%;left:50%;white-space:nowrap;font-size:12px;color:#333;-webkit-transform:translate(-50%,8px);transform:translate(-50%,8px);visibility:visible}.vue-slider-component.vue-slider-vertical-reverse .vue-slider-piecewise-label,.vue-slider-component.vue-slider-vertical .vue-slider-piecewise-label{position:absolute;display:inline-block;top:50%;left:100%;white-space:nowrap;font-size:12px;color:#333;-webkit-transform:translate(8px,-50%);transform:translate(8px,-50%);visibility:visible}.vue-slider-component .vue-slider-sr-only{clip:rect(1px,1px,1px,1px);height:1px;width:1px;overflow:hidden;position:absolute!important}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;ei.parts.length&&(s.parts.length=i.parts.length)}else{for(var n=[],r=0;r Date: Fri, 12 Oct 2018 18:24:13 +0530 Subject: [PATCH 2/5] Before merge --- .../Webkul/Shop/src/Resources/assets/sass/app.scss | 1 - .../Webkul/Shop/src/Resources/assets/sass/icons.scss | 12 ++++++++++++ .../Resources/views/layouts/header/index.blade.php | 10 +++++----- public/themes/default/assets/css/shop.css | 12 ++++++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 470ba1720..5212893a6 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -555,7 +555,6 @@ section.slider-block { .nav > li:hover > ul { left: auto; min-width: 100%; - } .nav > li li:hover { diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/icons.scss b/packages/Webkul/Shop/src/Resources/assets/sass/icons.scss index ba1aa8d3f..c63302cf0 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/icons.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/icons.scss @@ -55,6 +55,18 @@ height: 24px; } +.icon-menu { + background-image:URL('../images/icon-menu.svg'); + width: 24px; + height: 24px; +} + +.icon-search { + background-image:URL('../images/icon-search.svg'); + width: 24px; + height: 24px; +} + .icon-menu-back { background-image:URL('../images/icon-menu-back.svg'); width: 24px; diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php index b971dbe49..a6bcc9858 100644 --- a/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php @@ -13,7 +13,7 @@
  • - +
  • @@ -168,7 +168,7 @@
      - + - +
    @@ -245,13 +245,13 @@
    - +
    - + Designer sarees
    diff --git a/public/themes/default/assets/css/shop.css b/public/themes/default/assets/css/shop.css index 84dc4b619..4dc505346 100644 --- a/public/themes/default/assets/css/shop.css +++ b/public/themes/default/assets/css/shop.css @@ -55,6 +55,18 @@ height: 24px; } +.icon-menu { + background-image: URL("../images/icon-menu.svg"); + width: 24px; + height: 24px; +} + +.icon-search { + background-image: URL("../images/icon-search.svg"); + width: 24px; + height: 24px; +} + .icon-menu-back { background-image: URL("../images/icon-menu-back.svg"); width: 24px; From e92010f55f427e020c7610fe83dc62873ed2aa62 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 12 Oct 2018 18:34:15 +0530 Subject: [PATCH 3/5] Tax issue fixed --- packages/Webkul/Admin/src/Resources/lang/en/app.php | 3 ++- .../Resources/views/tax/tax-categories/create.blade.php | 2 +- .../src/Resources/views/tax/tax-categories/edit.blade.php | 2 +- .../src/Resources/views/tax/tax-rates/create.blade.php | 2 +- .../Admin/src/Resources/views/tax/tax-rates/edit.blade.php | 2 +- packages/Webkul/Core/src/Core.php | 7 ++----- .../views/checkout/onepage/customer-info.blade.php | 4 ++-- .../Tax/src/Http/Controllers/TaxCategoryController.php | 2 -- 8 files changed, 10 insertions(+), 14 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index c7062982d..b3ec36ae5 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -264,7 +264,7 @@ return [ 'tax-categories' => [ 'title' => 'Add Tax Category', - 'create' => 'Create Tax Category', + 'save-btn-title' => 'Save Tax Category', 'general' => 'Tax Category', 'select-channel' => 'Select Channel', 'name' => 'Name', @@ -279,6 +279,7 @@ return [ 'tax-rates' => [ 'title' => 'Add Tax Rate', + 'save-btn-title' => 'Save Tax Rate', 'general' => 'Tax Rate', 'identifier' => 'Identifier', 'is_zip' => 'Enable Zip Range', diff --git a/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php index 3c1d04b0d..e2b76362a 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/create.blade.php @@ -14,7 +14,7 @@
    diff --git a/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/edit.blade.php index 288d696d4..ac5d1227c 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-categories/edit.blade.php @@ -14,7 +14,7 @@
    diff --git a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php index 22ba1255a..75830cfc2 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php @@ -14,7 +14,7 @@
    diff --git a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php index 64692695d..8bd7ffd6c 100644 --- a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/edit.blade.php @@ -14,7 +14,7 @@
    diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index 342b6e727..b42c35fb6 100644 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -409,9 +409,7 @@ class Core // $timezonelist = \DateTimeZone::listIdentifiers(\DateTimeZone::ALL); /** - * Find all the tax - * rates associated - * with a tax category. + * Find all the tax rates associated with a tax category. * * @return Array */ @@ -421,8 +419,7 @@ class Core } /** - * To fetch all - * tax rates. + * To fetch all tax rates. * * @return Collection */ diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php index 5c656b9a0..583677659 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php @@ -92,7 +92,7 @@ - @@ -243,7 +243,7 @@ - diff --git a/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php b/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php index ade39aaff..60091a383 100644 --- a/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php +++ b/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php @@ -77,8 +77,6 @@ class TaxCategoryController extends Controller 'description' => 'required|string' ]); - dd($data); - if($currentTaxRule = $this->taxRule->create(request()->input())) { $allTaxRules = $data['taxrates']; From f5188d4b83300806e6689b464e2053ab9592e49b Mon Sep 17 00:00:00 2001 From: prashant-webkul Date: Mon, 15 Oct 2018 13:50:37 +0530 Subject: [PATCH 4/5] Customer account styles generalized --- .../src/Resources/assets/sass/_variables.scss | 9 +- .../Shop/src/Resources/assets/sass/app.scss | 394 +++++-------- .../src/Resources/assets/sass/components.scss | 120 ++-- .../account/address/address.blade.php | 10 +- .../account/address/create.blade.php | 8 +- .../customers/account/address/edit.blade.php | 8 +- .../customers/account/profile/edit.blade.php | 6 +- .../customers/account/profile/index.blade.php | 18 +- .../account/wishlist/wishlist.blade.php | 12 +- .../views/customers/session/index.blade.php | 2 +- .../signup/forgot-password.blade.php | 2 +- .../views/customers/signup/index.blade.php | 2 +- .../customers/signup/reset-password.blade.php | 2 +- .../views/products/list/card.blade.php | 3 +- public/themes/default/assets/css/shop.css | 553 ++++++++---------- public/themes/default/assets/js/shop.js | 6 +- 16 files changed, 489 insertions(+), 666 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss index 594c78d3a..1e014d502 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss @@ -11,11 +11,4 @@ $dark-background: #121212; $disc-price: #FF6472; $disc-price-pro: #A5A5A5; $other-font-color: #5E5E5E; -//shop variables ends here - - -//=======>Need to be removed -//customer variables - -//customer variables ends here -//<=======Need to be removed +//shop variables ends here \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 5212893a6..fb61d7967 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -537,7 +537,7 @@ section.slider-block { right:5px; } - /* submenu positioning*/ + /* submenu positioning */ .nav ul { position: absolute; @@ -862,220 +862,6 @@ section.slider-block { } } -//customers page css goes here -.content { - padding-top: 15%; - padding-bottom: 15%; - - .sign-up-text { - margin-bottom: 2%; - margin-left: auto; - margin-right: auto; - text-align: center; - font-size: 18px; - color: $font-color-light; - - text-align: center; - } - - .login-form { - margin-left: auto; - margin-right: auto; - display: flex; - - border: 1px solid $border-color; - flex-direction: column; - max-width: 530px; - min-width: 380px; - min-height: 345px; - padding-left: 25px; - padding-right: 25px; - - .login-text { - font-size: 24px; - font-weight: bold; - color: $font-color; - - margin-top: 5%; - margin-bottom: 3%; - } - - .control-group { - margin-bottom: 15px !important; - - .control { - width: 100% !important; - } - } - - .forgot-password-link { - font-size: 17px; - color: $brand-color; - - margin-bottom: 5%; - } - .signup-confirm { - - margin-bottom: 5%; - } - - .btn-primary { - width: 100%; - text-transform: uppercase; - border-radius: 0px; - height: 45px; - margin-bottom: 4%; - } - } -} - -//customer pages styles goes here -//account layout -.account-content { - width: 100%; - display: flex; - flex-direction: row; - margin-top: 5.5%; - margin-bottom: 5.5%; - - .account-side-menu { - display: flex; - flex-direction: column; - align-content: center; - justify-content: flex-start; - border: 1px solid $border-color; - - width: 25%; - height: 100%; - text-transform: capitalize; - color: $font-color-light; - - li { - width: 95%; - height: 50px; - margin-left: 5%; - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - border-bottom: 1px solid $border-color; - text-align: center; - } - - li:first-child { - border-top: none; - } - - li:last-child { - border-bottom: none; - } - - li.active { - color: $brand-color; - } - } - - .profile { - margin-left: 5.5%; - margin-top: 1%; - width: 100%; - - .section-head { - .profile-heading { - font-size: 28px; - color: $font-color; - text-transform: capitalize; - text-align: left; - } - - .profile-edit { - font-size: 17px; - margin-top: 1%; - color: $brand-color; - - float: right; - } - - .horizontal-rule { - margin-top: 1.1%; - width: 100%; - height: 1px; - vertical-align: middle; - background: $border-color; - } - } - } - - .profile-content { - color: $other-font-color; - margin-top: 1.4%; - - table { - tbody { - tr { - height: 45px; - - td { - width: 250px; - text-transform: capitalize; - } - } - } - } - } - - //edit form - .edit-form-content { - margin-left: 5.5%; - margin-top: 1%; - width: 100%; - - .section-head { - .profile-heading { - font-size: 28px; - color: $font-color; - text-transform: capitalize; - text-align: left; - } - - .profile-edit { - font-size: 17px; - margin-top: 1%; - color: $brand-color; - - float: right; - } - - .horizontal-rule { - margin-top: 1.1%; - width: 100%; - height: 1px; - vertical-align: middle; - background: $border-color; - } - } - - .edit-text { - margin-bottom: 2%; - margin-left: auto; - margin-right: auto; - font-size: 24px; - } - - .edit-form { - display: flex; - - border: 1px solid $border-color; - flex-direction: column; - min-height: 345px; - padding: 25px; - } - } - //edit form ends -} -//account ends here -//customers page css ends here - // product pages css starts here section.product-detail { color: $font-color; @@ -2026,54 +1812,148 @@ section.review { } // review page end here -// customer section css start here -.cusomer-section { - margin-left: 50px; - width:100%; - .customer-section-info { - display: flex; - flex-direction: row; - border-top: 1px solid $border-color; +//customers auth page css goes here +.auth-content { + padding-top: 15%; + padding-bottom: 15%; - .pro-img { - margin-top: 10px; - margin-bottom: 5px; + .sign-up-text { + margin-bottom: 2%; + margin-left: auto; + margin-right: auto; + text-align: center; + font-size: 18px; + color: $font-color-light; - img { - height: 125px; - width: 100px; - } - } - - .pro-discription { - margin-left: 20px; - width: 100%; - - .title { - color: $brand-color; - margin-top: 15px; - } - - .rating { - margin-top: 10px; - - .icon { - height: 16px; - width: 16px; - } - } - - .discription { - margin-top: 15px; - } - } + text-align: center; } - .customer-section-info:last-child { - border-bottom: 1px solid $border-color; + .login-form { + margin-left: auto; + margin-right: auto; + display: flex; + + border: 1px solid $border-color; + flex-direction: column; + max-width: 530px; + min-width: 380px; + min-height: 345px; + padding-left: 25px; + padding-right: 25px; + + .login-text { + font-size: 24px; + font-weight: bold; + color: $font-color; + + margin-top: 5%; + margin-bottom: 3%; + } + + .control-group { + margin-bottom: 15px !important; + + .control { + width: 100% !important; + } + } + + .forgot-password-link { + font-size: 17px; + color: $brand-color; + + margin-bottom: 5%; + } + .signup-confirm { + + margin-bottom: 5%; + } + + .btn-primary { + width: 100%; + text-transform: uppercase; + border-radius: 0px; + height: 45px; + margin-bottom: 4%; + } } } -// customer section css end here +//customer account pages layouts +.account-content { + width: 100%; + display: flex; + flex-direction: row; + margin-top: 5.5%; + margin-bottom: 5.5%; + .account-side-menu { + display: flex; + flex-direction: column; + align-content: center; + justify-content: flex-start; + border: 1px solid $border-color; + width: 25%; + height: 100%; + text-transform: capitalize; + color: $font-color-light; + + li { + width: 95%; + height: 50px; + margin-left: 5%; + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + border-bottom: 1px solid $border-color; + text-align: center; + } + + li:first-child { + border-top: none; + } + + li:last-child { + border-bottom: none; + } + + li.active { + color: $brand-color; + } + } + //customer account pages content + .account-layout { + margin-left: 5.5%; + margin-top: 1%; + width: 100%; + } +} + +//Account content inside a table +.account-table-content { + color: $font-color; + margin-top: 1.4%; + + table { + tbody { + tr { + height: 45px; + + td { + width: 250px; + text-transform: capitalize; + } + } + } + } +} + +.edit-form { + display: flex; + border: 1px solid $border-color; + flex-direction: column; + min-height: 345px; + padding: 25px; +} \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/components.scss b/packages/Webkul/Shop/src/Resources/assets/sass/components.scss index 10d7f0ddd..b37e216e4 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/components.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/components.scss @@ -1,15 +1,15 @@ // product card, requires no changes for responsiveness. .product-grid-4 { display: grid; - grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); - grid-column-gap: 40px; - grid-row-gap: 15px; + grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); grid-auto-rows: auto; + grid-column-gap: 48px; + grid-row-gap: 15px; } .product-grid-3 { display: grid; - grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); grid-gap: 27px; grid-auto-rows: auto; } @@ -102,46 +102,6 @@ } } -//wishlist item -.wishlist-item { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - width: 100%; - height: 125px; - - .media-info { - display: flex; - flex-direction: row; - - .media { - height: 125px; - width: 100px; - } - - .info { - display: block; - margin-left: 20px; - } - } - - .operations { - height: 120px; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: center; - - a { - width: 100%; - span { - float: right; - } - } - } -} - //product page price styles .product-price { margin-bottom: 14px; @@ -170,3 +130,75 @@ height: 1px; background: $border-color; } + +//Customer account section header +.account-head { + .account-heading { + font-size: 28px; + color: $font-color; + text-transform: capitalize; + text-align: left; + } + + .account-edit { + font-size: 17px; + margin-top: 1%; + color: $brand-color; + float: right; + } + + .horizontal-rule { + margin-top: 1.1%; + width: 100%; + height: 1px; + vertical-align: middle; + background: $border-color; + } +} + +//denotes the item card that are used in account pages +.account-item-card { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + width: 100%; + height: 125px; + + .media-info { + display: flex; + flex-direction: row; + + .media { + height: 125px; + width: 125px; + } + + .info { + display: block; + margin-left: 20px; + } + } + + .operations { + height: 120px; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: center; + + a { + width: 100%; + span { + float: right; + } + } + } +} + +//Account items list +.account-items-list { + display: block; + width: 100%; +} + diff --git a/packages/Webkul/Shop/src/Resources/views/customers/account/address/address.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/account/address/address.blade.php index 2231f3d9b..2e29b4de5 100644 --- a/packages/Webkul/Shop/src/Resources/views/customers/account/address/address.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/account/address/address.blade.php @@ -10,13 +10,13 @@ @include('shop::customers.account.partials.sidemenu') -
    +