Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
520c21a4cd
|
|
@ -9,12 +9,12 @@
|
|||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"ext-curl": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-pdo_mysql": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"barryvdh/laravel-dompdf": "^0.8.0@dev",
|
||||
"dimsav/laravel-translatable": "^9.0",
|
||||
"doctrine/dbal": "^2.9@dev",
|
||||
|
|
@ -29,7 +29,8 @@
|
|||
"maatwebsite/excel": "3.1.x-dev",
|
||||
"nwidart/laravel-modules": "^3.2",
|
||||
"prettus/l5-repository": "^2.6",
|
||||
"propaganistas/laravel-intl": "^2.0"
|
||||
"propaganistas/laravel-intl": "^2.0",
|
||||
"tymon/jwt-auth": "dev-develop"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'driver' => 'jwt',
|
||||
'provider' => 'customers',
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ return [
|
|||
|
|
||||
| Debugbar is enabled by default, when debug is set to true in app.php.
|
||||
| You can override the value by setting enable to true or false instead of null.
|
||||
|
|
||||
|
|
||||
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||
'except' => [
|
||||
'telescope*'
|
||||
//
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
@ -79,7 +79,7 @@ return [
|
|||
|
|
||||
*/
|
||||
'error_handler' => false,
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Clockwork integration
|
||||
|
|
@ -198,4 +198,4 @@ return [
|
|||
| To override default domain, specify it as a non-empty value.
|
||||
*/
|
||||
'route_domain' => null,
|
||||
];
|
||||
];
|
||||
|
|
@ -109,4 +109,4 @@ return [
|
|||
*/
|
||||
'pdf' => Excel::DOMPDF,
|
||||
],
|
||||
];
|
||||
];
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Secret
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Don't forget to set this in your .env file, as it will be used to sign
|
||||
| your tokens. A helper command is provided for this:
|
||||
| `php artisan jwt:secret`
|
||||
|
|
||||
| Note: This will be used for Symmetric algorithms only (HMAC),
|
||||
| since RSA and ECDSA use a private/public key combo (See below).
|
||||
|
|
||||
*/
|
||||
|
||||
'secret' => env('JWT_SECRET'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Keys
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The algorithm you are using, will determine whether your tokens are
|
||||
| signed with a random string (defined in `JWT_SECRET`) or using the
|
||||
| following public & private keys.
|
||||
|
|
||||
| Symmetric Algorithms:
|
||||
| HS256, HS384 & HS512 will use `JWT_SECRET`.
|
||||
|
|
||||
| Asymmetric Algorithms:
|
||||
| RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
||||
|
|
||||
*/
|
||||
|
||||
'keys' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your public key.
|
||||
|
|
||||
| E.g. 'file://path/to/public/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'public' => env('JWT_PUBLIC_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Private Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your private key.
|
||||
|
|
||||
| E.g. 'file://path/to/private/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'private' => env('JWT_PRIVATE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Passphrase
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The passphrase for your private key. Can be null if none set.
|
||||
|
|
||||
*/
|
||||
|
||||
'passphrase' => env('JWT_PASSPHRASE'),
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token will be valid for.
|
||||
| Defaults to 1 hour.
|
||||
|
|
||||
| You can also set this to null, to yield a never expiring token.
|
||||
| Some people may want this behaviour for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
| Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
|
||||
|
|
||||
*/
|
||||
|
||||
'ttl' => env('JWT_TTL', 60),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Refresh time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token can be refreshed
|
||||
| within. I.E. The user can refresh their token within a 2 week window of
|
||||
| the original token being created until they must re-authenticate.
|
||||
| Defaults to 2 weeks.
|
||||
|
|
||||
| You can also set this to null, to yield an infinite refresh time.
|
||||
| Some may want this instead of never expiring tokens for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT hashing algorithm
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the hashing algorithm that will be used to sign the token.
|
||||
|
|
||||
| See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
|
||||
| for possible values.
|
||||
|
|
||||
*/
|
||||
|
||||
'algo' => env('JWT_ALGO', 'HS256'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Required Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the required claims that must exist in any token.
|
||||
| A TokenInvalidException will be thrown if any of these claims are not
|
||||
| present in the payload.
|
||||
|
|
||||
*/
|
||||
|
||||
'required_claims' => [
|
||||
'iss',
|
||||
'iat',
|
||||
'exp',
|
||||
'nbf',
|
||||
'sub',
|
||||
'jti',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Persistent Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the claim keys to be persisted when refreshing a token.
|
||||
| `sub` and `iat` will automatically be persisted, in
|
||||
| addition to the these claims.
|
||||
|
|
||||
| Note: If a claim does not exist then it will be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'persistent_claims' => [
|
||||
// 'foo',
|
||||
// 'bar',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Lock Subject
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will determine whether a `prv` claim is automatically added to
|
||||
| the token. The purpose of this is to ensure that if you have multiple
|
||||
| authentication models e.g. `App\User` & `App\OtherPerson`, then we
|
||||
| should prevent one authentication request from impersonating another,
|
||||
| if 2 tokens happen to have the same id across the 2 different models.
|
||||
|
|
||||
| Under specific circumstances, you may want to disable this behaviour
|
||||
| e.g. if you only have one authentication model, then you would save
|
||||
| a little on token size.
|
||||
|
|
||||
*/
|
||||
|
||||
'lock_subject' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Leeway
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This property gives the jwt timestamp claims some "leeway".
|
||||
| Meaning that if you have any unavoidable slight clock skew on
|
||||
| any of your servers then this will afford you some level of cushioning.
|
||||
|
|
||||
| This applies to the claims `iat`, `nbf` and `exp`.
|
||||
|
|
||||
| Specify in seconds - only if you know you need it.
|
||||
|
|
||||
*/
|
||||
|
||||
'leeway' => env('JWT_LEEWAY', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blacklist Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| In order to invalidate tokens, you must have the blacklist enabled.
|
||||
| If you do not want or need this functionality, then set this to false.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Blacklist Grace Period
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| When multiple concurrent requests are made with the same JWT,
|
||||
| it is possible that some of them fail, due to token regeneration
|
||||
| on every request.
|
||||
|
|
||||
| Set grace period in seconds to prevent parallel request failure.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookies encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default Laravel encrypt cookies for security reason.
|
||||
| If you decide to not decrypt cookies, you will have to configure Laravel
|
||||
| to not encrypt your cookie token by adding its name into the $except
|
||||
| array available in the middleware "EncryptCookies" provided by Laravel.
|
||||
| see https://laravel.com/docs/master/responses#cookies-and-encryption
|
||||
| for details.
|
||||
|
|
||||
| Set it to true if you want to decrypt cookies.
|
||||
|
|
||||
*/
|
||||
|
||||
'decrypt_cookies' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the various providers used throughout the package.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to create and decode the tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to authenticate users.
|
||||
|
|
||||
*/
|
||||
|
||||
'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to store tokens in the blacklist.
|
||||
|
|
||||
*/
|
||||
|
||||
'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -2,21 +2,6 @@
|
|||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add additional Artisan commands that should
|
||||
| be available within the Tinker environment. Once the command is in
|
||||
| this array you may execute the command in Tinker using its name.
|
||||
|
|
||||
*/
|
||||
|
||||
'commands' => [
|
||||
// App\Console\Commands\ExampleCommand::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Alias Blacklist
|
||||
|
|
@ -30,4 +15,4 @@ return [
|
|||
|
||||
'dont_alias' => [],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
@ -54,7 +54,7 @@ return [
|
|||
| $useTranslationFallback when defined
|
||||
|
|
||||
*/
|
||||
'use_fallback' => true,
|
||||
'use_fallback' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -113,4 +113,4 @@ return [
|
|||
|
|
||||
*/
|
||||
'to_array_always_loads_translations' => true,
|
||||
];
|
||||
];
|
||||
|
|
|
|||
|
|
@ -31,15 +31,15 @@ return [
|
|||
|
||||
/*
|
||||
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
|
||||
*
|
||||
*
|
||||
* Options include:
|
||||
*
|
||||
*
|
||||
* - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
|
||||
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
|
||||
*
|
||||
*
|
||||
* @link https://symfony.com/doc/current/deployment/proxies.html
|
||||
*/
|
||||
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
|
||||
|
||||
|
||||
];
|
||||
|
||||
];
|
||||
|
|
@ -36,41 +36,81 @@ return [
|
|||
'name' => 'admin::app.acl.products',
|
||||
'route' => 'admin.catalog.products.index',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'catalog.products.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.catalog.products.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'catalog.products.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.catalog.products.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'catalog.products.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.catalog.products.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'catalog.categories',
|
||||
'name' => 'admin::app.acl.categories',
|
||||
'route' => 'admin.catalog.categories.index',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'catalog.categories.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.catalog.categories.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'catalog.categories.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.catalog.categories.edit',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'catalog.categories.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.catalog.categories.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'catalog.attributes',
|
||||
'name' => 'admin::app.acl.attributes',
|
||||
'route' => 'admin.catalog.attributes.index',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'catalog.attributes.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.catalog.attributes.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'catalog.attributes.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.catalog.attributes.edit',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'catalog.attributes.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.catalog.attributes.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'catalog.families',
|
||||
'name' => 'admin::app.acl.attribute-families',
|
||||
'route' => 'admin.catalog.families.index',
|
||||
'sort' => 4
|
||||
], [
|
||||
'key' => 'catalog.families.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.catalog.families.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'catalog.families.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.catalog.families.edit',
|
||||
'sort' => 4
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'catalog.families.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.catalog.families.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'customers',
|
||||
'name' => 'admin::app.acl.customers',
|
||||
|
|
@ -81,21 +121,41 @@ return [
|
|||
'name' => 'admin::app.acl.customers',
|
||||
'route' => 'admin.customer.index',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'customers.customers.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.customer.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'customers.customers.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.customer.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'customers.customers.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.customer.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'customers.groups',
|
||||
'name' => 'admin::app.acl.groups',
|
||||
'route' => 'admin.groups.index',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'customers.groups.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.groups.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'customers.groups.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.groups.edit',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'customers.groups.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.groups.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'customers.reviews',
|
||||
'name' => 'admin::app.acl.reviews',
|
||||
|
|
@ -105,7 +165,12 @@ return [
|
|||
'key' => 'customers.reviews.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.customer.review.edit',
|
||||
'sort' => 3
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'customers.reviews.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.customer.review.delete',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'configuration',
|
||||
'name' => 'admin::app.acl.configure',
|
||||
|
|
@ -121,51 +186,101 @@ return [
|
|||
'name' => 'admin::app.acl.locales',
|
||||
'route' => 'admin.locales.index',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.locales.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.locales.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.locales.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.locales.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.locales.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.locales.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.currencies',
|
||||
'name' => 'admin::app.acl.currencies',
|
||||
'route' => 'admin.currencies.index',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.currencies.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.currencies.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.currencies.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.currencies.edit',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.currencies.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.currencies.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.exchange_rates',
|
||||
'name' => 'admin::app.acl.exchange-rates',
|
||||
'route' => 'admin.exchange_rates.index',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.exchange_rates.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.exchange_rates.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.exchange_rates.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.exchange_rates.edit',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.exchange_rates.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.exchange_rates.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.inventory_sources',
|
||||
'name' => 'admin::app.acl.inventory-sources',
|
||||
'route' => 'admin.inventory_sources.index',
|
||||
'sort' => 4
|
||||
], [
|
||||
'key' => 'settings.inventory_sources.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.inventory_sources.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.inventory_sources.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.inventory_sources.edit',
|
||||
'sort' => 4
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.inventory_sources.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.inventory_sources.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.channels',
|
||||
'name' => 'admin::app.acl.channels',
|
||||
'route' => 'admin.channels.index',
|
||||
'sort' => 5
|
||||
], [
|
||||
'key' => 'settings.channels.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.channels.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.channels.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.channels.edit',
|
||||
'sort' => 5
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.channels.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.channels.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.users',
|
||||
'name' => 'admin::app.acl.users',
|
||||
|
|
@ -176,31 +291,61 @@ return [
|
|||
'name' => 'admin::app.acl.users',
|
||||
'route' => 'admin.users.index',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.users.users.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.users.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.users.users.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.users.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.users.users.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.users.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.users.roles',
|
||||
'name' => 'admin::app.acl.roles',
|
||||
'route' => 'admin.roles.index',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.users.roles.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.roles.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.users.roles.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.roles.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.users.roles.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.roles.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.sliders',
|
||||
'name' => 'admin::app.acl.sliders',
|
||||
'route' => 'admin.sliders.index',
|
||||
'sort' => 7
|
||||
], [
|
||||
'key' => 'settings.sliders.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.sliders.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.sliders.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.sliders.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.sliders.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.sliders.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.taxes',
|
||||
'name' => 'admin::app.acl.taxes',
|
||||
|
|
@ -211,21 +356,41 @@ return [
|
|||
'name' => 'admin::app.acl.tax-categories',
|
||||
'route' => 'admin.tax-categories.index',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-categories.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.tax-categories.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-categories.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.tax-categories.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-categories.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.tax-categories.delete',
|
||||
'sort' => 3
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-rates',
|
||||
'name' => 'admin::app.acl.tax-rates',
|
||||
'route' => 'admin.tax-rates.index',
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-rates.create',
|
||||
'name' => 'admin::app.acl.create',
|
||||
'route' => 'admin.tax-rates.create',
|
||||
'sort' => 1
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-rates.edit',
|
||||
'name' => 'admin::app.acl.edit',
|
||||
'route' => 'admin.tax-rates.edit',
|
||||
'sort' => 1
|
||||
'sort' => 2
|
||||
], [
|
||||
'key' => 'settings.taxes.tax-rates.delete',
|
||||
'name' => 'admin::app.acl.delete',
|
||||
'route' => 'admin.tax-rates.delete',
|
||||
'sort' => 3
|
||||
]
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Mail;
|
|||
use Webkul\Admin\Mail\NewOrderNotification;
|
||||
use Webkul\Admin\Mail\NewInvoiceNotification;
|
||||
use Webkul\Admin\Mail\NewShipmentNotification;
|
||||
use Webkul\Admin\Mail\NewInventorySourceNotification;
|
||||
|
||||
/**
|
||||
* Order event handler
|
||||
|
|
@ -18,7 +19,7 @@ class Order {
|
|||
/**
|
||||
* @param mixed $order
|
||||
*
|
||||
* Send new order confirmation mail to the customer
|
||||
* Send new shipment mail to the customer and inventory source
|
||||
*/
|
||||
public function sendNewOrderMail($order)
|
||||
{
|
||||
|
|
@ -52,6 +53,8 @@ class Order {
|
|||
{
|
||||
try {
|
||||
Mail::send(new NewShipmentNotification($shipment));
|
||||
|
||||
Mail::send(new NewInventorySourceNotification($shipment));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
/**
|
||||
* New InventorySource Notification Mail class
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class NewInventorySourceNotification extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* The shipment instance.
|
||||
*
|
||||
* @var Shipment
|
||||
*/
|
||||
public $shipment;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param mixed $shipment
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($shipment)
|
||||
{
|
||||
$this->shipment = $shipment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{ $order = $this->shipment->order;
|
||||
$inventory = $this->shipment->inventory_source;
|
||||
|
||||
return $this->to($inventory->contact_email, $inventory->name)
|
||||
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->id]))
|
||||
->view('shop::emails.sales.new-inventorysource-shipment');
|
||||
}
|
||||
}
|
||||
|
|
@ -69,6 +69,8 @@ return [
|
|||
'tax-categories' => 'فئات الضرائب',
|
||||
'tax-rates' => 'المعدلات الضريبية',
|
||||
'edit' => 'Edit',
|
||||
'create' => 'Add',
|
||||
'delete' => 'Delete',
|
||||
],
|
||||
'dashboard' => [
|
||||
'title' => 'لوحة العدادات',
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ return [
|
|||
'tax-categories' => 'Tax Categories',
|
||||
'tax-rates' => 'Tax Rates',
|
||||
'edit' => 'Edit',
|
||||
'create' => 'Add',
|
||||
'delete' => 'Delete',
|
||||
],
|
||||
|
||||
'dashboard' => [
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ return [
|
|||
'tax-categories' => 'Categorias de Impostos',
|
||||
'tax-rates' => 'Impostos de Impostos',
|
||||
'edit' => 'Edit',
|
||||
'create' => 'Add',
|
||||
'delete' => 'Delete',
|
||||
],
|
||||
|
||||
'dashboard' => [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<select v-validate="'{{$validations}}'" class="control" id="{{ $attribute->code }}" name="{{ $attribute->code }}[]" data-vv-as=""{{ $attribute->admin_name }}"" multiple {{ $disabled ? 'disabled' : '' }}>
|
||||
|
||||
@foreach ($attribute->options as $option)
|
||||
<option value="{{ $option->id }}" {{ in_array($option->id, explode(',', $attribute[$attribute->code])) ? 'selected' : ''}}>
|
||||
<option value="{{ $option->id }}" {{ in_array($option->id, explode(',', $product[$attribute->code])) ? 'selected' : ''}}>
|
||||
{{ $option->admin_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -144,6 +144,10 @@ class AttributeRepository extends Repository
|
|||
$data['is_filterable'] = 0;
|
||||
}
|
||||
|
||||
if (in_array($data['type'], ['select', 'multiselect', 'boolean'])) {
|
||||
unset($data['value_per_locale']);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,9 +99,18 @@ class CategoryRepository extends Repository
|
|||
*/
|
||||
public function getVisibleCategoryTree($id = null)
|
||||
{
|
||||
return $id
|
||||
? Category::orderBy('position', 'ASC')->where('status', 1)->descendantsOf($id)->toTree()
|
||||
: Category::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
|
||||
static $categories;
|
||||
|
||||
if ($categories[$id])
|
||||
return $categories[$id];
|
||||
|
||||
if ($id) {
|
||||
$categories[$id] = Category::orderBy('position', 'ASC')->where('status', 1)->descendantsOf($id)->toTree();
|
||||
} else {
|
||||
$categories[$id] = Category::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
|
||||
}
|
||||
|
||||
return $categories[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@ namespace Webkul\Customer\Models;
|
|||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||
use Webkul\Checkout\Models\CartProxy;
|
||||
use Webkul\Sales\Models\OrderProxy;
|
||||
use Webkul\Product\Models\ProductReviewProxy;
|
||||
use Webkul\Customer\Notifications\CustomerResetPassword;
|
||||
use Webkul\Customer\Contracts\Customer as CustomerContract;
|
||||
|
||||
class Customer extends Authenticatable implements CustomerContract
|
||||
class Customer extends Authenticatable implements CustomerContract, JWTSubject
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
|
|
@ -103,4 +104,24 @@ class Customer extends Authenticatable implements CustomerContract
|
|||
public function all_orders() {
|
||||
return $this->hasMany(OrderProxy::modelClass(), 'customer_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the identifier that will be stored in the subject claim of the JWT.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getJWTIdentifier()
|
||||
{
|
||||
return $this->getKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a key value array, containing any custom claims to be added to the JWT.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getJWTCustomClaims()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ class ProductImage extends AbstractProduct
|
|||
|
||||
if (! $product || (! $product->parent_id && !count($images))) {
|
||||
$images[] = [
|
||||
'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),
|
||||
'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),
|
||||
'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
|
||||
'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
|
||||
'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'),
|
||||
'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'),
|
||||
'large_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'),
|
||||
'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png')
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -61,10 +61,10 @@ class ProductImage extends AbstractProduct
|
|||
];
|
||||
} else {
|
||||
$image = [
|
||||
'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),
|
||||
'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),
|
||||
'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
|
||||
'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),
|
||||
'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'),
|
||||
'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'),
|
||||
'large_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'),
|
||||
'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,58 +14,43 @@ class View extends AbstractProduct
|
|||
{
|
||||
$data = [];
|
||||
|
||||
$attributes = $product->attribute_family->custom_attributes;
|
||||
$attributes = $product->attribute_family->custom_attributes()->where('attributes.is_visible_on_front', 1)->get();
|
||||
|
||||
$attributeOptionReposotory = app('Webkul\Attribute\Repositories\AttributeOptionRepository');
|
||||
|
||||
foreach ($attributes as $attribute) {
|
||||
if ($attribute->type == 'boolean') {
|
||||
$value = $product->{$attribute->code};
|
||||
if ($attribute->is_visible_on_front ) {
|
||||
if ($value == 1) {
|
||||
$value = 'Yes';
|
||||
} else {
|
||||
$value = 'No';
|
||||
}
|
||||
$value = $product->{$attribute->code} ? 'Yes' : 'No';
|
||||
|
||||
$data[] = [
|
||||
'code' => $attribute->code,
|
||||
'label' => $attribute->name,
|
||||
'value' => $value,
|
||||
'admin_name' => $attribute->admin_name,
|
||||
];
|
||||
}
|
||||
} else if ($attribute->is_visible_on_front && $product->{$attribute->code}) {
|
||||
$data[] = [
|
||||
'code' => $attribute->code,
|
||||
'label' => $attribute->name,
|
||||
'value' => $value,
|
||||
'admin_name' => $attribute->admin_name,
|
||||
];
|
||||
} else if ($product->{$attribute->code}) {
|
||||
$value = $product->{$attribute->code};
|
||||
|
||||
if ($attribute->type == 'select') {
|
||||
$attributeOption = $attributeOptionReposotory->find($value);
|
||||
|
||||
if ($attributeOption) {
|
||||
$value = $attributeOption->translate(app()->getLocale());
|
||||
if ($value) {
|
||||
$value = $value->label;
|
||||
}
|
||||
$value = $attributeOption->label;
|
||||
}
|
||||
}
|
||||
} else if ($attribute->type == 'multiselect') {
|
||||
$optionIds = explode(",", $value);
|
||||
|
||||
if ($attribute->type == 'multiselect') {
|
||||
$values = explode(",", $value);
|
||||
if (count($optionIds)) {
|
||||
$attributeOptions = $attributeOptionReposotory->findWhereIn('id', $optionIds);
|
||||
|
||||
$result = [];
|
||||
foreach ($values as $value) {
|
||||
$attributeOption = $attributeOptionReposotory->find($value);
|
||||
|
||||
if ($attributeOption) {
|
||||
$value = $attributeOption->translate(app()->getLocale());
|
||||
if ($value) {
|
||||
$value = $value->label;
|
||||
$result[] = $value;
|
||||
foreach ($attributeOptions as $attributeOption) {
|
||||
if ($attributeOption && $attributeOption->label) {
|
||||
$result[] = $attributeOption->label;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$value = implode(", ", $result);
|
||||
$value = implode(", ", $result);
|
||||
}
|
||||
}
|
||||
|
||||
$data[] = [
|
||||
|
|
@ -73,7 +58,7 @@ class View extends AbstractProduct
|
|||
'label' => $attribute->name,
|
||||
'value' => $value,
|
||||
'admin_name' => $attribute->admin_name,
|
||||
];
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,38 +83,42 @@ class ProductForm extends FormRequest
|
|||
$attributes = $product->attribute_family->custom_attributes;
|
||||
|
||||
foreach ($attributes as $attribute) {
|
||||
if ($attribute->code == 'sku')
|
||||
continue;
|
||||
if (! $product->super_attributes->contains($attribute)) {
|
||||
if ($attribute->code == 'sku') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($product->type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight']))
|
||||
continue;
|
||||
if ($product->type == 'configurable' && in_array($attribute->code, ['price', 'cost', 'special_price', 'special_price_from', 'special_price_to', 'width', 'height', 'depth', 'weight'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$validations = [];
|
||||
if ($attribute->is_required) {
|
||||
array_push($validations, 'required');
|
||||
} else {
|
||||
array_push($validations, 'nullable');
|
||||
$validations = [];
|
||||
if ($attribute->is_required) {
|
||||
array_push($validations, 'required');
|
||||
} else {
|
||||
array_push($validations, 'nullable');
|
||||
}
|
||||
|
||||
if ($attribute->type == 'text' && $attribute->validation) {
|
||||
array_push($validations, $attribute->validation);
|
||||
}
|
||||
|
||||
if ($attribute->type == 'price') {
|
||||
array_push($validations, 'decimal');
|
||||
}
|
||||
|
||||
if ($attribute->is_unique) {
|
||||
array_push($validations, function ($field, $value, $fail) use ($inputs, $attribute) {
|
||||
$column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
|
||||
|
||||
if (!$this->attributeValue->isValueUnique($this->id, $attribute->id, $column, $inputs[$attribute->code])) {
|
||||
$fail('The :attribute has already been taken.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$this->rules[$attribute->code] = $validations;
|
||||
}
|
||||
|
||||
if ($attribute->type == 'text' && $attribute->validation) {
|
||||
array_push($validations, $attribute->validation);
|
||||
}
|
||||
|
||||
if ($attribute->type == 'price') {
|
||||
array_push($validations, 'decimal');
|
||||
}
|
||||
|
||||
if ($attribute->is_unique) {
|
||||
array_push($validations, function ($field, $value, $fail) use ($inputs, $attribute) {
|
||||
$column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
|
||||
|
||||
if (!$this->attributeValue->isValueUnique($this->id, $attribute->id, $column, $inputs[$attribute->code])) {
|
||||
$fail('The :attribute has already been taken.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$this->rules[$attribute->code] = $validations;
|
||||
}
|
||||
|
||||
return $this->rules;
|
||||
|
|
|
|||
|
|
@ -1090,6 +1090,7 @@ section.slider-block {
|
|||
.nav > li {
|
||||
float: left;
|
||||
margin-right: 1px;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.nav > li > a {
|
||||
|
|
@ -3487,6 +3488,10 @@ section.review {
|
|||
}
|
||||
}
|
||||
|
||||
.show-wishlist {
|
||||
z-index: -1 !important;
|
||||
}
|
||||
|
||||
/// rtl css start here
|
||||
.rtl {
|
||||
direction: rtl;
|
||||
|
|
|
|||
|
|
@ -461,8 +461,8 @@ return [
|
|||
'shipping-address' => 'Shipping Address',
|
||||
'billing-address' => 'Billing Address',
|
||||
'contact' => 'Contact',
|
||||
'shipping' => 'Shipping',
|
||||
'payment' => 'Payment',
|
||||
'shipping' => 'Shipping Method',
|
||||
'payment' => 'Payment Method',
|
||||
'price' => 'Price',
|
||||
'quantity' => 'Quantity',
|
||||
'subtotal' => 'Subtotal',
|
||||
|
|
@ -479,11 +479,14 @@ return [
|
|||
'summary' => 'Summary of Invoice',
|
||||
],
|
||||
'shipment' => [
|
||||
'heading' => 'Your Shipment #:shipment_id for Order #:order_id',
|
||||
'heading' => 'Shipment #:shipment_id has been generated for Order #:order_id',
|
||||
'inventory-heading' => 'New Shipment #:shipment_id had been generated for Order #:order_id',
|
||||
'subject' => 'Shipment for your order #:order_id',
|
||||
'inventory-subject' => 'New Shipment had been generated for Order #:order_id',
|
||||
'summary' => 'Summary of Shipment',
|
||||
'carrier' => 'Carrier',
|
||||
'tracking-number' => 'Tracking Number'
|
||||
'tracking-number' => 'Tracking Number',
|
||||
'greeting' => 'An Order :order_id has been placed on :created_at',
|
||||
],
|
||||
'forget-password' => [
|
||||
'dear' => 'Dear :name',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,153 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
<img src="{{ bagisto_asset('images/logo.svg') }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php $order = $shipment->order; ?>
|
||||
<?php $inventory = $shipment->inventory_source; ?>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.shipment.inventory-heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $inventory->name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.shipment.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
<div style="font-weight: bold;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.carrier') }} : </span>{{ $shipment->carrier_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.tracking-number') }} : </span>{{ $shipment->track_number }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}, {{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">{{ $item->name }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div> --}}
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
{{ $item->qty_ordered }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
|
|
@ -164,10 +164,10 @@
|
|||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -51,10 +51,10 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
|
|
@ -93,10 +93,10 @@
|
|||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
|
|
@ -106,46 +106,48 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($shipment->items as $item)
|
||||
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px;margin-bottom: 10px">
|
||||
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||
{{ $item->name }}
|
||||
</p>
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<label style="font-size: 16px;color: #5E5E5E;">
|
||||
{{ __('shop::app.mail.order.price') }}
|
||||
</label>
|
||||
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">{{ $item->name }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<label style="font-size: 16px;color: #5E5E5E;">
|
||||
{{ __('shop::app.mail.order.quantity') }}
|
||||
</label>
|
||||
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||
{{ $item->qty }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
@if ($html = $item->getOptionDetailHtml())
|
||||
<div style="">
|
||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||
{{ $html }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<div class="product-grid-3">
|
||||
@foreach ($products as $productFlat)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $productFlat->product])
|
||||
@include ('shop::products.list.card', ['productFlat' => $productFlat])
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<div class="product-list">
|
||||
@foreach ($products as $productFlat)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $productFlat->product])
|
||||
@include ('shop::products.list.card', ['productFlat' => $productFlat])
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
|
||||
{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $productFlat->product]) !!}
|
||||
|
||||
<div class="product-card">
|
||||
|
||||
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
|
||||
|
||||
<?php $productBaseImage = $productImageHelper->getProductBaseImage($product); ?>
|
||||
<?php $productBaseImage = $productImageHelper->getProductBaseImage($productFlat->product); ?>
|
||||
|
||||
@if ($product->new)
|
||||
@if ($productFlat->new)
|
||||
<div class="sticker new">
|
||||
{{ __('shop::app.products.new') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="product-image">
|
||||
<a href="{{ route('shop.products.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<a href="{{ route('shop.products.index', $productFlat->url_key) }}" title="{{ $productFlat->name }}">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}" />
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -21,18 +21,18 @@
|
|||
<div class="product-information">
|
||||
|
||||
<div class="product-name">
|
||||
<a href="{{ url()->to('/').'/products/'.$product->url_key }}" title="{{ $product->name }}">
|
||||
<a href="{{ url()->to('/').'/products/' . $productFlat->url_key }}" title="{{ $productFlat->name }}">
|
||||
<span>
|
||||
{{ $product->name }}
|
||||
{{ $productFlat->name }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@include ('shop::products.price', ['product' => $product])
|
||||
@include ('shop::products.price', ['product' => $productFlat->product])
|
||||
|
||||
@include('shop::products.add-buttons')
|
||||
@include('shop::products.add-buttons', ['product' => $productFlat->product])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}
|
||||
{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $productFlat->product]) !!}
|
||||
|
|
@ -161,13 +161,15 @@
|
|||
});
|
||||
|
||||
$(document).mousemove(function(event) {
|
||||
if ( (event.pageX - $('.product-hero-image').offset().left > 440 ) && (event.pageX - $('.product-hero-image').offset().left < 465) && (event.pageY - $('.product-hero-image').offset().top > 16) && (event.pageY - $('.product-hero-image').offset().top < 38)) {
|
||||
if ($('.add-to-wishlist').length) {
|
||||
if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
|
||||
|
||||
$('.zoomContainer').attr('style', 'z-index: -1 !important');
|
||||
$(".zoomContainer").addClass("show-wishlist");
|
||||
|
||||
} else {
|
||||
$('.zoomContainer').css({"position": "absolute", "z-index": "999" });
|
||||
}
|
||||
} else {
|
||||
$(".zoomContainer").removeClass("show-wishlist");
|
||||
}
|
||||
};
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class TaxCategoryController extends Controller
|
|||
|
||||
Event::fire('tax.tax_category.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-failed', ['name' => 'Tax Category']));
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Tax Category']));
|
||||
|
||||
return response()->json(['message' => true], 200);
|
||||
} catch(Exception $e) {
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
|
|
@ -21,7 +21,7 @@
|
|||
{{-- Footer --}}
|
||||
@slot('footer')
|
||||
@component('mail::footer')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
{{-- Footer --}}
|
||||
@slot('footer')
|
||||
@component('mail::footer')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
'into your web browser: [:actionURL](:actionURL)',
|
||||
[
|
||||
'actionText' => $actionText,
|
||||
'actionURL' => $actionUrl,
|
||||
'actionURL' => $actionUrl
|
||||
]
|
||||
)
|
||||
@endcomponent
|
||||
|
|
|
|||
Loading…
Reference in New Issue