Merge pull request #13 from bagisto/master
This commit is contained in:
commit
8b3308bed3
|
|
@ -4,8 +4,12 @@ on: [push, pull_request]
|
|||
|
||||
jobs:
|
||||
tests:
|
||||
name: Run tests
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest]
|
||||
php-versions: ['7.3', '7.4', '8.0']
|
||||
name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}
|
||||
|
||||
services:
|
||||
mysql:
|
||||
|
|
@ -23,13 +27,13 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup php
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.3'
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: curl, gd, intl, mbstring, openssl, pdo, pdo_mysql, tokenizer, zip
|
||||
|
||||
- name: Set environment
|
||||
- name: Set Environment
|
||||
run: |
|
||||
set -e
|
||||
sed -i "s|^\(DB_HOST=\s*\).*$|\1127.0.0.1|" .env.testing
|
||||
|
|
@ -37,24 +41,33 @@ jobs:
|
|||
printf "the complete .env.testing ...\n\n"
|
||||
cat .env.testing
|
||||
|
||||
- name: Composer install
|
||||
- name: Composer Install
|
||||
run: |
|
||||
set -e
|
||||
composer install --no-interaction --ansi --no-progress --no-suggest --optimize-autoloader
|
||||
composer install --no-cache
|
||||
|
||||
- name: Migrate database
|
||||
- name: Migrate Database
|
||||
run: set -e && php artisan migrate --env=testing
|
||||
|
||||
- name: Execute unit tests
|
||||
- name: Seed Database
|
||||
run: set -e && php artisan db:seed --env=testing
|
||||
|
||||
- name: Vendor Publish
|
||||
run: set -e && php artisan vendor:publish --all --force --env=testing
|
||||
|
||||
- name: Optimize Stuffs
|
||||
run: set -e && php artisan optimize --env=testing
|
||||
|
||||
- name: Execute Unit Tests
|
||||
run: set -e && vendor/bin/codecept run unit
|
||||
|
||||
- name: Execute functional tests
|
||||
- name: Execute Functional Tests
|
||||
run: set -e && vendor/bin/codecept run functional
|
||||
|
||||
- name: Execute trigger tests
|
||||
- name: Execute Trigger Tests
|
||||
run: set -e && vendor/bin/codecept run trigger
|
||||
|
||||
- name: Persist test artifacts
|
||||
- name: Persist Test Artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
if: always()
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -164,5 +164,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|||
</div>
|
||||
|
||||
<kbd>
|
||||
<img src="https://images.opencollective.com/e-ventures1/7d61db2/logo.png" height="75">
|
||||
<a href="http://e.ventures/" target="_blank">
|
||||
<img src="https://images.opencollective.com/e-ventures1/7d61db2/logo.png" height="75">
|
||||
</a>
|
||||
</kbd>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
|
|
@ -13,8 +15,8 @@ class EventServiceProvider extends ServiceProvider
|
|||
* @var array
|
||||
*/
|
||||
// protected $listen = [
|
||||
// 'App\Events\Event' => [
|
||||
// 'App\Listeners\EventListener',
|
||||
// Registered::class => [
|
||||
// SendEmailVerificationNotification::class,
|
||||
// ],
|
||||
// ];
|
||||
|
||||
|
|
@ -26,7 +28,5 @@ class EventServiceProvider extends ServiceProvider
|
|||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'App\Http\Controllers';
|
||||
// protected $namespace = 'App\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
|
|
@ -36,8 +36,6 @@ class RouteServiceProvider extends ServiceProvider
|
|||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
101
composer.json
101
composer.json
|
|
@ -8,52 +8,47 @@
|
|||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"ext-curl": "*",
|
||||
"ext-intl": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-pdo_mysql": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^7.3|^8.0",
|
||||
"algolia/algoliasearch-client-php": "^2.2",
|
||||
"astrotomic/laravel-translatable": "^11.0.0",
|
||||
"aws/aws-sdk-php": "^3.171",
|
||||
"babenkoivan/elastic-scout-driver": "^1.1",
|
||||
"bagisto/bagisto-package-generator": "9999999-dev",
|
||||
"bagistobrasil/bagisto-product-social-share": "^0.1.2",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"barryvdh/laravel-dompdf": "0.8.6",
|
||||
"doctrine/dbal": "2.9.2",
|
||||
"barryvdh/laravel-dompdf": "^0.8",
|
||||
"doctrine/dbal": "^2.9",
|
||||
"enshrined/svg-sanitize": "^0.14.0",
|
||||
"facade/ignition": "^2.3.6",
|
||||
"fakerphp/faker": "^1.14",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"flynsarmy/db-blade-compiler": "^5.5",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"guzzlehttp/guzzle": "~6.3",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"intervention/image": "^2.4",
|
||||
"intervention/imagecache": "^2.3",
|
||||
"kalnoy/nestedset": "5.0.1",
|
||||
"kalnoy/nestedset": "^5.0",
|
||||
"khaled.alshamaa/ar-php": "^6.0.0",
|
||||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "^7.0",
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/legacy-factories": "^1.1",
|
||||
"laravel/scout": "^8.0",
|
||||
"laravel/socialite": "^4.4",
|
||||
"laravel/socialite": "^5.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0",
|
||||
"laravel/ui": "^3.0",
|
||||
"maatwebsite/excel": "^3.1.26",
|
||||
"paypal/paypal-checkout-sdk": "1.0.1",
|
||||
"prettus/l5-repository": "^2.6",
|
||||
"tymon/jwt-auth": "^1.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "4.1.1",
|
||||
"codeception/codeception": "^4.1",
|
||||
"codeception/module-asserts": "^1.1",
|
||||
"codeception/module-filesystem": "^1.0",
|
||||
"codeception/module-laravel5": "^1.0",
|
||||
"codeception/module-webdriver": "^1.0",
|
||||
"filp/whoops": "^2.0",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"nunomaduro/collision": "^4.1",
|
||||
"phpunit/phpunit": "^8.5"
|
||||
"nunomaduro/collision": "^5.3",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"replace": {
|
||||
"bagisto/laravel-user": "v0.1.0",
|
||||
|
|
@ -77,40 +72,38 @@
|
|||
"bagisto/laravel-discount": "v0.1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"database/seeds",
|
||||
"database/factories"
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Webkul\\User\\": "packages/Webkul/User/src",
|
||||
"Webkul\\Admin\\": "packages/Webkul/Admin/src",
|
||||
"Webkul\\Ui\\": "packages/Webkul/Ui/src",
|
||||
"Webkul\\Category\\": "packages/Webkul/Category/src",
|
||||
"Webkul\\Checkout\\": "packages/Webkul/Checkout/src",
|
||||
"Webkul\\Attribute\\": "packages/Webkul/Attribute/src",
|
||||
"Webkul\\Shop\\": "packages/Webkul/Shop/src",
|
||||
"Webkul\\Core\\": "packages/Webkul/Core/src",
|
||||
"Webkul\\Customer\\": "packages/Webkul/Customer/src",
|
||||
"Webkul\\Inventory\\": "packages/Webkul/Inventory/src",
|
||||
"Webkul\\Product\\": "packages/Webkul/Product/src",
|
||||
"Webkul\\Theme\\": "packages/Webkul/Theme/src",
|
||||
"Webkul\\Shipping\\": "packages/Webkul/Shipping/src",
|
||||
"Webkul\\Payment\\": "packages/Webkul/Payment/src",
|
||||
"Webkul\\Paypal\\": "packages/Webkul/Paypal/src",
|
||||
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
|
||||
"Webkul\\Tax\\": "packages/Webkul/Tax/src",
|
||||
"Webkul\\API\\": "packages/Webkul/API",
|
||||
"Webkul\\CatalogRule\\": "packages/Webkul/CatalogRule/src",
|
||||
"Webkul\\CartRule\\": "packages/Webkul/CartRule/src",
|
||||
"Webkul\\Rule\\": "packages/Webkul/Rule/src",
|
||||
"Webkul\\CMS\\": "packages/Webkul/CMS/src",
|
||||
"Webkul\\Velocity\\": "packages/Webkul/Velocity/src",
|
||||
"Webkul\\BookingProduct\\": "packages/Webkul/BookingProduct/src",
|
||||
"Webkul\\SocialLogin\\": "packages/Webkul/SocialLogin/src",
|
||||
"Webkul\\DebugBar\\": "packages/Webkul/DebugBar/src",
|
||||
"Webkul\\Marketing\\": "packages/Webkul/Marketing/src"
|
||||
}
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/",
|
||||
"Webkul\\User\\": "packages/Webkul/User/src",
|
||||
"Webkul\\Admin\\": "packages/Webkul/Admin/src",
|
||||
"Webkul\\Ui\\": "packages/Webkul/Ui/src",
|
||||
"Webkul\\Category\\": "packages/Webkul/Category/src",
|
||||
"Webkul\\Checkout\\": "packages/Webkul/Checkout/src",
|
||||
"Webkul\\Attribute\\": "packages/Webkul/Attribute/src",
|
||||
"Webkul\\Shop\\": "packages/Webkul/Shop/src",
|
||||
"Webkul\\Core\\": "packages/Webkul/Core/src",
|
||||
"Webkul\\Customer\\": "packages/Webkul/Customer/src",
|
||||
"Webkul\\Inventory\\": "packages/Webkul/Inventory/src",
|
||||
"Webkul\\Product\\": "packages/Webkul/Product/src",
|
||||
"Webkul\\Theme\\": "packages/Webkul/Theme/src",
|
||||
"Webkul\\Shipping\\": "packages/Webkul/Shipping/src",
|
||||
"Webkul\\Payment\\": "packages/Webkul/Payment/src",
|
||||
"Webkul\\Paypal\\": "packages/Webkul/Paypal/src",
|
||||
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
|
||||
"Webkul\\Tax\\": "packages/Webkul/Tax/src",
|
||||
"Webkul\\API\\": "packages/Webkul/API",
|
||||
"Webkul\\CatalogRule\\": "packages/Webkul/CatalogRule/src",
|
||||
"Webkul\\CartRule\\": "packages/Webkul/CartRule/src",
|
||||
"Webkul\\Rule\\": "packages/Webkul/Rule/src",
|
||||
"Webkul\\CMS\\": "packages/Webkul/CMS/src",
|
||||
"Webkul\\Velocity\\": "packages/Webkul/Velocity/src",
|
||||
"Webkul\\BookingProduct\\": "packages/Webkul/BookingProduct/src",
|
||||
"Webkul\\SocialLogin\\": "packages/Webkul/SocialLogin/src",
|
||||
"Webkul\\DebugBar\\": "packages/Webkul/DebugBar/src",
|
||||
"Webkul\\Marketing\\": "packages/Webkul/Marketing/src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -69,20 +69,8 @@ return [
|
|||
],
|
||||
|
||||
'redis' => [
|
||||
|
||||
'client' => 'predis',
|
||||
|
||||
'clusters' => [
|
||||
'default' => [
|
||||
[
|
||||
'host' => env('REDIS_HOST', 'localhost'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => 0,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'driver' => 'redis',
|
||||
'connection' => env('CACHE_CONNECTION', 'cache'),
|
||||
],
|
||||
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|
|
@ -112,7 +114,21 @@ return [
|
|||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => 0,
|
||||
'database' => env('REDIS_DEFAULT_DATABASE', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_CACHE_DATABASE', '1'),
|
||||
],
|
||||
|
||||
'session' => [
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_SESSION_DATABASE', '2'),
|
||||
],
|
||||
|
||||
],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Flare API key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify Flare's API key below to enable error reporting to the service.
|
||||
|
|
||||
| More info: https://flareapp.io/docs/general/projects
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('FLARE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options determine which information will be transmitted to Flare.
|
||||
|
|
||||
*/
|
||||
|
||||
'reporting' => [
|
||||
'anonymize_ips' => true,
|
||||
'collect_git_information' => false,
|
||||
'report_queries' => true,
|
||||
'maximum_number_of_collected_queries' => 200,
|
||||
'report_query_bindings' => true,
|
||||
'report_view_data' => true,
|
||||
'grouping_type' => null,
|
||||
'report_logs' => true,
|
||||
'maximum_number_of_collected_logs' => 200,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting Log statements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If this setting is `false` log statements won't be send as events to Flare,
|
||||
| no matter which error level you specified in the Flare log channel.
|
||||
|
|
||||
*/
|
||||
|
||||
'send_logs_as_events' => true,
|
||||
];
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Editor
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Choose your preferred editor to use when clicking any edit button.
|
||||
|
|
||||
| Supported: "phpstorm", "vscode", "vscode-insiders",
|
||||
| "sublime", "atom", "nova"
|
||||
|
|
||||
*/
|
||||
|
||||
'editor' => env('IGNITION_EDITOR', 'phpstorm'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which theme Ignition should use.
|
||||
|
|
||||
| Supported: "light", "dark", "auto"
|
||||
|
|
||||
*/
|
||||
|
||||
'theme' => env('IGNITION_THEME', 'light'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sharing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can share local errors with colleagues or others around the world.
|
||||
| Sharing is completely free and doesn't require an account on Flare.
|
||||
|
|
||||
| If necessary, you can completely disable sharing below.
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_share_button' => env('IGNITION_SHARING_ENABLED', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Ignition commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition comes with an additional make command that lets you create
|
||||
| new solution classes more easily. To keep your default Laravel
|
||||
| installation clean, this command is not registered by default.
|
||||
|
|
||||
| You can enable the command registration below.
|
||||
|
|
||||
*/
|
||||
'register_commands' => env('REGISTER_IGNITION_COMMANDS', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignored Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_solution_providers' => [
|
||||
\Facade\Ignition\SolutionProviders\MissingPackageSolutionProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Runnable Solutions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some solutions that Ignition displays are runnable and can perform
|
||||
| various tasks. Runnable solutions are enabled when your app has
|
||||
| debug mode enabled. You may also fully disable this feature.
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Remote Path Mapping
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using a remote dev server, like Laravel Homestead, Docker, or
|
||||
| even a remote VPS, it will be necessary to specify your path mapping.
|
||||
|
|
||||
| Leaving one, or both of these, empty or null will not trigger the remote
|
||||
| URL changes and Ignition will treat your editor links as local files.
|
||||
|
|
||||
| "remote_sites_path" is an absolute base path for your sites or projects
|
||||
| in Homestead, Vagrant, Docker, or another remote development server.
|
||||
|
|
||||
| Example value: "/home/vagrant/Code"
|
||||
|
|
||||
| "local_sites_path" is an absolute base path for your sites or projects
|
||||
| on your local computer where your IDE or code editor is running on.
|
||||
|
|
||||
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
|
||||
|
|
||||
*/
|
||||
|
||||
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''),
|
||||
'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Housekeeping Endpoint Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of routes when it is enabled. Below you may
|
||||
| specify a route prefix that will be used to host all internal links.
|
||||
|
|
||||
*/
|
||||
'housekeeping_endpoint_prefix' => '_ignition',
|
||||
|
||||
];
|
||||
|
|
@ -70,7 +70,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'connection' => null,
|
||||
'connection' => env('SESSION_CONNECTION', 'session'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -96,7 +96,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'store' => null,
|
||||
'store' => env('SESSION_STORE', NULL),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Webkul\Velocity\Database\Seeders\VelocityMetaDataSeeder;
|
||||
use Webkul\Admin\Database\Seeders\DatabaseSeeder as BagistoDatabaseSeeder;
|
||||
|
|
@ -176,7 +176,7 @@ class CheckoutController extends Controller
|
|||
'status' => ! $status ? false : true,
|
||||
'message' => ! $status ? trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]) : 'Success',
|
||||
'data' => [
|
||||
'cart' => new CartResource($cart),
|
||||
'cart' => new CartResource(Cart::getCart()),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,106 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains current guard.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guard;
|
||||
|
||||
/**
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* Repository object.
|
||||
*
|
||||
* @var \Webkul\Core\Eloquent\Repository
|
||||
*/
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->guard = request()->has('token') ? 'api' : 'customer';
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
if (isset($this->_config['authorization_required']) && $this->_config['authorization_required']) {
|
||||
|
||||
auth()->setDefaultDriver($this->guard);
|
||||
|
||||
$this->middleware('auth:' . $this->guard);
|
||||
}
|
||||
|
||||
if ($this->_config) {
|
||||
$this->repository = app($this->_config['repository']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a listing of the Order Transactions.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$query = $this->repository->scopeQuery(function($query) {
|
||||
$query = $query->leftJoin('orders', 'order_transactions.order_id', '=', 'orders.id')->select('order_transactions.*', 'orders.customer_id');
|
||||
|
||||
if (isset($this->_config['authorization_required']) && $this->_config['authorization_required']) {
|
||||
$query = $query->where('customer_id', auth()->user()->id);
|
||||
}
|
||||
|
||||
foreach (request()->except(['page', 'limit', 'pagination', 'sort', 'order', 'token']) as $input => $value) {
|
||||
$query = $query->whereIn($input, array_map('trim', explode(',', $value)));
|
||||
}
|
||||
|
||||
if ($sort = request()->input('sort')) {
|
||||
$query = $query->orderBy($sort, request()->input('order') ?? 'desc');
|
||||
} else {
|
||||
$query = $query->orderBy('id', 'desc');
|
||||
}
|
||||
|
||||
return $query;
|
||||
});
|
||||
|
||||
if (is_null(request()->input('pagination')) || request()->input('pagination')) {
|
||||
$results = $query->paginate(request()->input('limit') ?? 10);
|
||||
} else {
|
||||
$results = $query->get();
|
||||
}
|
||||
|
||||
return $this->_config['resource']::collection($results);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an individual invoice.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
if (isset($this->_config['authorization_required']) && $this->_config['authorization_required']) {
|
||||
$query = $this->repository->leftJoin('orders', 'order_transactions.order_id', '=', 'orders.id')
|
||||
->select('order_transactions.*', 'orders.customer_id')
|
||||
->where('customer_id', auth()->user()->id)
|
||||
->findOrFail($id);
|
||||
} else {
|
||||
$query = $this->repository->findOrFail($id);
|
||||
}
|
||||
|
||||
return new $this->_config['resource']($query);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Resources\Sales;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class OrderTransaction extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'transaction_id' => $this->transaction_id,
|
||||
'status' => $this->status,
|
||||
'type' => $this->type,
|
||||
'payment_method' => $this->payment_method,
|
||||
'data' => $this->data,
|
||||
'updated_at' => $this->updated_at,
|
||||
'created_at' => $this->created_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ Route::group(['prefix' => 'api'], function ($router) {
|
|||
]);
|
||||
|
||||
|
||||
//Invoice routes
|
||||
//Shipment routes
|
||||
Route::get('shipments', 'ResourceController@index')->defaults('_config', [
|
||||
'repository' => 'Webkul\Sales\Repositories\ShipmentRepository',
|
||||
'resource' => 'Webkul\API\Http\Resources\Sales\Shipment',
|
||||
|
|
@ -228,6 +228,18 @@ Route::group(['prefix' => 'api'], function ($router) {
|
|||
'authorization_required' => true
|
||||
]);
|
||||
|
||||
//Transaction routes
|
||||
Route::get('transactions', 'TransactionController@index')->defaults('_config', [
|
||||
'repository' => 'Webkul\Sales\Repositories\OrderTransactionRepository',
|
||||
'resource' => 'Webkul\API\Http\Resources\Sales\OrderTransaction',
|
||||
'authorization_required' => true
|
||||
]);
|
||||
|
||||
Route::get('transactions/{id}', 'TransactionController@get')->defaults('_config', [
|
||||
'repository' => 'Webkul\Sales\Repositories\OrderTransactionRepository',
|
||||
'resource' => 'Webkul\API\Http\Resources\Sales\OrderTransaction',
|
||||
'authorization_required' => true
|
||||
]);
|
||||
|
||||
//Wishlist routes
|
||||
Route::get('wishlist', 'ResourceController@index')->defaults('_config', [
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=e4c3d46b82083613b407",
|
||||
"/css/admin.css": "/css/admin.css?id=f2b20e4283a639808ef6"
|
||||
"/js/admin.js": "/js/admin.js?id=f3d20a6568f3b4473dcc",
|
||||
"/css/admin.css": "/css/admin.css?id=9f04992b0f1ac9f91e6c"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@ return [
|
|||
'route' => 'admin.sales.refunds.index',
|
||||
'sort' => 4,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'sales.transactions',
|
||||
'name' => 'admin::app.layouts.transactions',
|
||||
'route' => 'admin.sales.transactions.index',
|
||||
'sort' => 5,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'catalog',
|
||||
'name' => 'admin::app.layouts.catalog',
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
{
|
||||
$queryBuilder = DB::table('product_reviews as pr')
|
||||
->leftjoin('product_flat as pf', 'pr.product_id', '=', 'pf.product_id')
|
||||
->select('pr.id as product_review_id', 'pr.title', 'pr.comment', 'pf.name as product_name', 'pr.status as product_review_status')
|
||||
->select('pr.id as product_review_id', 'pr.title', 'pr.comment', 'pf.name as product_name', 'pr.status as product_review_status', 'pr.rating')
|
||||
->where('channel', core()->getCurrentChannelCode())
|
||||
->where('locale', app()->getLocale());
|
||||
|
||||
|
|
@ -55,6 +55,15 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'rating',
|
||||
'label' => trans('admin::app.customers.reviews.rating'),
|
||||
'type' => 'number',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'product_name',
|
||||
'label' => trans('admin::app.datagrid.product-name'),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\DataGrids;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Ui\DataGrid\DataGrid;
|
||||
|
||||
class OrderTransactionsDataGrid extends DataGrid
|
||||
{
|
||||
protected $index = 'id';
|
||||
|
||||
protected $sortOrder = 'desc';
|
||||
|
||||
public function prepareQueryBuilder()
|
||||
{
|
||||
$queryBuilder = DB::table('order_transactions')
|
||||
->leftJoin('orders as ors', 'order_transactions.order_id', '=', 'ors.id')
|
||||
->select('order_transactions.id as id', 'order_transactions.transaction_id as transaction_id', 'ors.increment_id as order_id', 'order_transactions.created_at as created_at');
|
||||
|
||||
$this->addFilter('id', 'order_transactions.id');
|
||||
$this->addFilter('transaction_id', 'order_transactions.transaction_id');
|
||||
$this->addFilter('order_id', 'ors.increment_id');
|
||||
$this->addFilter('created_at', 'order_transactions.created_at');
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
}
|
||||
|
||||
public function addColumns()
|
||||
{
|
||||
$this->addColumn([
|
||||
'index' => 'id',
|
||||
'label' => trans('admin::app.datagrid.id'),
|
||||
'type' => 'number',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'transaction_id',
|
||||
'label' => trans('admin::app.datagrid.transaction-id'),
|
||||
'type' => 'string',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'order_id',
|
||||
'label' => trans('admin::app.datagrid.order-id'),
|
||||
'type' => 'number',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'created_at',
|
||||
'label' => trans('admin::app.datagrid.transaction-date'),
|
||||
'type' => 'datetime',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function prepareActions()
|
||||
{
|
||||
$this->addAction([
|
||||
'title' => trans('admin::app.datagrid.view'),
|
||||
'method' => 'GET',
|
||||
'route' => 'admin.sales.transactions.view',
|
||||
'icon' => 'icon eye-icon',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ class SliderDataGrid extends DataGrid
|
|||
->where('ct.locale', app()->getLocale());
|
||||
|
||||
if ($this->locale !== 'all') {
|
||||
$queryBuilder->where('sl.locale', $this->locale);
|
||||
$queryBuilder->whereRaw("find_in_set(?, sl.locale)", [$this->locale]);
|
||||
}
|
||||
|
||||
if ($this->channel !== 'all') {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\Controllers\Sales;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Admin\Http\Controllers\Controller;
|
||||
use Webkul\Sales\Repositories\OrderTransactionRepository;
|
||||
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* OrderRepository object
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderTransactionRepository
|
||||
*/
|
||||
protected $orderTransactionRepository;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param \Webkul\Sales\Repositories\OrderTransactionRepository $orderTransactionRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(OrderTransactionRepository $orderTransactionRepository)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->orderTransactionRepository = $orderTransactionRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the view for the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function view($id)
|
||||
{
|
||||
$transaction = $this->orderTransactionRepository->findOrFail($id);
|
||||
|
||||
$transData = json_decode(json_encode(json_decode($transaction['data'])), true);
|
||||
|
||||
$transactionDeatilsData = $this->convertIntoSingleDimArray($transData);
|
||||
|
||||
return view($this->_config['view'], compact('transaction', 'transactionDeatilsData'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Transaction Details Data into single Dim Array.
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public function convertIntoSingleDimArray($transData) {
|
||||
static $detailsData = [];
|
||||
|
||||
foreach ($transData as $key => $data) {
|
||||
if (is_array($data)) {
|
||||
$this->convertIntoSingleDimArray($data);
|
||||
} else {
|
||||
$skipAttributes = ['sku', 'name', 'category', 'quantity'];
|
||||
|
||||
if (gettype($key) == 'integer' || in_array($key, $skipAttributes)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$detailsData[$key] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
return $detailsData;
|
||||
}
|
||||
}
|
||||
|
|
@ -250,6 +250,15 @@ Route::group(['middleware' => ['web']], function () {
|
|||
Route::get('/refunds/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\RefundController@view')->defaults('_config', [
|
||||
'view' => 'admin::sales.refunds.view',
|
||||
])->name('admin.sales.refunds.view');
|
||||
|
||||
// Sales Transactions Routes
|
||||
Route::get('/transactions', 'Webkul\Admin\Http\Controllers\Sales\TransactionController@index')->defaults('_config', [
|
||||
'view' => 'admin::sales.transactions.index',
|
||||
])->name('admin.sales.transactions.index');
|
||||
|
||||
Route::get('/transactions/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\TransactionController@view')->defaults('_config', [
|
||||
'view' => 'admin::sales.transactions.view',
|
||||
])->name('admin.sales.transactions.view');
|
||||
});
|
||||
|
||||
// Catalog Routes
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Vue.use(VeeValidate, {
|
|||
});
|
||||
Vue.prototype.$http = axios
|
||||
|
||||
Vue.component('nav-slide-button', require('./components/navigation/nav-slide-button').default);
|
||||
Vue.component('required-if', require('./components/validators/required-if').default);
|
||||
|
||||
window.eventBus = new Vue();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
<template>
|
||||
<span class="toggle-aside-nav" @click="toggle">
|
||||
<i class="icon" :class="iconClass"></i>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.toggle-aside-nav {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: -12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
'iconClass',
|
||||
],
|
||||
|
||||
methods: {
|
||||
toggle: function () {
|
||||
if ($('.aside-nav').is(':visible')) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
let self = this;
|
||||
|
||||
$('.aside-nav').hide(function () {
|
||||
$('.content-wrapper').css({
|
||||
marginLeft: 'unset'
|
||||
});
|
||||
|
||||
$('#nav-expand-button').show();
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
let self = this;
|
||||
|
||||
$('#nav-expand-button').hide();
|
||||
|
||||
$('.aside-nav').show(function () {
|
||||
$('.content-wrapper').css({
|
||||
marginLeft: '280px'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -108,7 +108,7 @@ body {
|
|||
border-right: 1px solid rgba(162, 162, 162, 0.2);
|
||||
height: auto;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
z-index: 1;
|
||||
background-color: $white;
|
||||
|
||||
ul.menubar {
|
||||
|
|
@ -341,6 +341,25 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
.variant-image {
|
||||
.image-item {
|
||||
height: 100px !important;
|
||||
width: 100px !important;
|
||||
background-size: 100px 100px !important;
|
||||
}
|
||||
|
||||
.trash-icon {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
margin-top: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.btn.add-image {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.rtl {
|
||||
.ticket-list {
|
||||
.control-group {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'خصم',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -240,7 +241,9 @@ return [
|
|||
'view' => 'رأي',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'تحديث الحالة'
|
||||
'update-status' => 'تحديث الحالة',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -392,6 +395,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -468,6 +472,20 @@ return [
|
|||
'action' => 'عمل',
|
||||
'view-title' => '#:refund_id إعادة مال',
|
||||
'invalid-refund-amount-error' => 'يجب ألا يكون المبلغ المسترد صفرًا'
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -844,7 +862,9 @@ return [
|
|||
'update-success' => 'تم تحديث عنصر المزلق بنجاح',
|
||||
'update-fail' => 'المنزلق لا يمكن تحديثه',
|
||||
'delete-success' => 'لا يستطيع حذف الأخير عنصر',
|
||||
'delete-fail' => 'تم حذف عنصر المزلق بنجاح'
|
||||
'delete-fail' => 'تم حذف عنصر المزلق بنجاح',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ return [
|
|||
'tax-rates' => 'Steuersätze',
|
||||
'discount' => 'Rabatt',
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
'acl' =>
|
||||
[
|
||||
|
|
@ -240,6 +241,8 @@ return [
|
|||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Update-Status',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
'account' =>
|
||||
[
|
||||
|
|
@ -388,6 +391,7 @@ return [
|
|||
'cancel-confirm-msg' => 'Sind Sie sicher, dass Sie diese Bestellung stornieren möchten?',
|
||||
'refund-btn-title' => 'Rückerstattung',
|
||||
'refunds' => 'Erstattungen',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
'invoices' =>
|
||||
[
|
||||
|
|
@ -462,6 +466,20 @@ return [
|
|||
'view-title' => 'Rückerstattung #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Der Rückerstattungsbetrag sollte nicht Null sein.',
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
'catalog' =>
|
||||
[
|
||||
|
|
@ -844,6 +862,8 @@ return [
|
|||
'update-fail' => 'Slider kann nicht aktualisiert werden',
|
||||
'delete-success' => 'Der letzte Slider kann nicht gelöscht werden',
|
||||
'delete-fail' => 'Slider erfolgreich gelöscht',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
'tax-categories' =>
|
||||
[
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
return [
|
||||
'save' => 'Guardar',
|
||||
'copy-of' => 'Copia de ',
|
||||
'copy-of-slug' => 'copia-de-',
|
||||
'create' => 'Crear',
|
||||
'update' => 'Actualizar',
|
||||
'delete' => 'Borrar',
|
||||
|
|
@ -13,13 +15,12 @@ return [
|
|||
'attribute' => 'Atributo',
|
||||
'actions' => 'Acciones',
|
||||
'id' => 'ID',
|
||||
'action' => 'acción',
|
||||
'action' => 'Acción',
|
||||
'yes' => 'Sí',
|
||||
'no' => 'No',
|
||||
'true' => 'Verdadero',
|
||||
'false' => 'Falso',
|
||||
'apply' => 'Aplicar',
|
||||
'action' => 'Acción',
|
||||
'label' => 'Etiqueta',
|
||||
'name' => 'Nombre',
|
||||
'title' => 'Título',
|
||||
|
|
@ -27,7 +28,7 @@ return [
|
|||
'type' => 'Tipo',
|
||||
'required' => 'Requerido',
|
||||
'unique' => 'Único',
|
||||
'locale-based' => 'Basado en lugar',
|
||||
'locale-based' => 'Basado en idioma',
|
||||
'channel-based' => 'Basado en canal',
|
||||
'status' => 'Estado',
|
||||
'select-option' => 'Seleccione opción',
|
||||
|
|
@ -42,6 +43,7 @@ return [
|
|||
],
|
||||
|
||||
'layouts' => [
|
||||
'app-version' => 'Versión : :version',
|
||||
'my-account' => 'Mi cuenta',
|
||||
'logout' => 'Desconectar',
|
||||
'visit-shop' => 'Visitar tienda',
|
||||
|
|
@ -59,10 +61,10 @@ return [
|
|||
'customers' => 'Clientes',
|
||||
'groups' => 'Grupos',
|
||||
'reviews' => 'Opiniones',
|
||||
'newsletter-subscriptions' => 'Suscripciones a newsletter por correo',
|
||||
'newsletter-subscriptions' => 'Suscripciones a los Boletines',
|
||||
'configure' => 'Configurar',
|
||||
'settings' => 'Ajustes',
|
||||
'locales' => 'Lugares',
|
||||
'locales' => 'Idiomas',
|
||||
'currencies' => 'Monedas',
|
||||
'exchange-rates' => 'Tasas de cambio',
|
||||
'inventory-sources' => 'Fuentes de inventario',
|
||||
|
|
@ -73,38 +75,40 @@ return [
|
|||
'taxes' => 'Impuestos',
|
||||
'tax-categories' => 'Categorías de impuestos',
|
||||
'tax-rates' => 'Tasas de impuestos',
|
||||
'marketing' => 'Marketing',
|
||||
'marketing' => 'Márketing',
|
||||
'promotions' => 'Promociones',
|
||||
'email-marketing' => 'Email Marketing',
|
||||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'email-marketing' => 'Email Márketing',
|
||||
'campaigns' => 'Campañas',
|
||||
'email-templates' => 'Plantillas de Email',
|
||||
'events' => 'Eventos',
|
||||
'discount' => 'Descuento',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transacciones'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
'dashboard' => 'Tablero',
|
||||
'sales' => 'Ventas',
|
||||
'cancel' => 'Cancel',
|
||||
'cancel' => 'Cancelar',
|
||||
'orders' => 'Pedidos',
|
||||
'shipments' => 'Envíos',
|
||||
'invoices' => 'Facturas',
|
||||
'refunds' => 'Refunds',
|
||||
'refunds' => 'Reembolsos',
|
||||
'catalog' => 'Catálogo',
|
||||
'products' => 'Productos',
|
||||
'copy' => 'Copy',
|
||||
'copy' => 'Copiar',
|
||||
'categories' => 'Categorías',
|
||||
'attributes' => 'Atributos',
|
||||
'attribute-families' => 'Familias de atributos',
|
||||
'customers' => 'Clientes',
|
||||
'addresses' => 'Addresses',
|
||||
'note' => 'Note',
|
||||
'addresses' => 'Direcciones',
|
||||
'note' => 'Nota',
|
||||
'groups' => 'Grupos',
|
||||
'reviews' => 'Opiniones',
|
||||
'newsletter-subscriptions' => 'Suscripciones a newsletter por correo',
|
||||
'newsletter-subscriptions' => 'Suscripciones a los Boletines',
|
||||
'configure' => 'Configurar',
|
||||
'settings' => 'Ajustes',
|
||||
'locales' => 'Lugares',
|
||||
'locales' => 'Idiomas',
|
||||
'currencies' => 'Monedas',
|
||||
'exchange-rates' => 'Tasas de cambio',
|
||||
'inventory-sources' => 'Fuentes de inventario',
|
||||
|
|
@ -115,16 +119,21 @@ return [
|
|||
'taxes' => 'Impuestos',
|
||||
'tax-categories' => 'Categorías de impuestos',
|
||||
'tax-rates' => 'Tasas de impuestos',
|
||||
'view' => 'View',
|
||||
'view' => 'Vista',
|
||||
'edit' => 'Editar',
|
||||
'create' => 'Agregar',
|
||||
'delete' => 'Borrar',
|
||||
'mass-delete' => 'Mass Delete',
|
||||
'mass-update' => 'Mass Update',
|
||||
'marketing' => 'Marketing',
|
||||
'mass-delete' => 'Eliminar Masivamente',
|
||||
'mass-update' => 'Actualizar Masivamente',
|
||||
'marketing' => 'Márketing',
|
||||
'promotions' => 'Promociones',
|
||||
'cart-rules' => 'Reglas del carrito',
|
||||
'catalog-rules' => 'Reglas del catálogo',
|
||||
'email-marketing' => 'Email Márketing',
|
||||
'email-templates' => 'Plantillas de Email',
|
||||
'campaigns' => 'Campañas',
|
||||
'subscribers' => 'Suscriptores del Boletín',
|
||||
'events' => 'Eventos'
|
||||
],
|
||||
|
||||
'dashboard' => [
|
||||
|
|
@ -163,15 +172,16 @@ return [
|
|||
'code' => 'Código',
|
||||
'admin-name' => 'Nombre',
|
||||
'name' => 'Nombre',
|
||||
'copy' => 'Copiar',
|
||||
'direction' => 'Dirección',
|
||||
'fullname' => 'Nombre completo',
|
||||
'type' => 'Tipo',
|
||||
'required' => 'Requerido',
|
||||
'unique' => 'Único',
|
||||
'per-locale' => 'Lugar ubicado',
|
||||
'per-locale' => 'Idioma ubicado',
|
||||
'per-channel' => 'Canal ubicado',
|
||||
'position' => 'Posición',
|
||||
'locale' => 'Lugar',
|
||||
'locale' => 'Idioma',
|
||||
'hostname' => 'Hostname',
|
||||
'email' => 'Email',
|
||||
'group' => 'Grupo',
|
||||
|
|
@ -223,13 +233,14 @@ return [
|
|||
'end' => 'Fin',
|
||||
'active' => 'Activo',
|
||||
'inactive' => 'Inactivo',
|
||||
'draft' => 'Borrador',
|
||||
'true' => 'Verdadero',
|
||||
'false' => 'Falso',
|
||||
'approved' => 'Aprobado',
|
||||
'pending' => 'Pendiente',
|
||||
'disapproved' => 'Rechazado',
|
||||
'coupon-code' => 'Código de cupón',
|
||||
'times-used' => 'Times Used',
|
||||
'times-used' => 'Veces Usados',
|
||||
'created-date' => 'Creado en',
|
||||
'expiration-date' => 'Fecha expiración',
|
||||
'edit' => 'Editar',
|
||||
|
|
@ -237,7 +248,11 @@ return [
|
|||
'view' => 'Ver',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Actualizar Estado'
|
||||
'update-status' => 'Actualizar Estado',
|
||||
'subject' => 'Asunto',
|
||||
'date' => 'Fecha',
|
||||
'transaction-id' => 'Transacción #',
|
||||
'transaction-date' => 'Fecha de Transacción',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -362,12 +377,12 @@ return [
|
|||
'SKU' => 'SKU',
|
||||
'product-name' => 'Nombre del producto',
|
||||
'qty' => 'Cant',
|
||||
'artículo-status' => 'Estado del articulo',
|
||||
'artículo-ordered' => 'Pedido (:qty_ordered)',
|
||||
'artículo-invoice' => 'Facturado (:qty_invoiced)',
|
||||
'artículo-shipped' => 'Enviado (:qty_shipped)',
|
||||
'artículo-canceled' => 'Cancelado (:qty_canceled)',
|
||||
'artículo-refunded' => 'Reembolsado (:qty_refunded)',
|
||||
'item-status' => 'Estado del articulo',
|
||||
'item-ordered' => 'Pedido (:qty_ordered)',
|
||||
'item-invoice' => 'Facturado (:qty_invoiced)',
|
||||
'item-shipped' => 'Enviado (:qty_shipped)',
|
||||
'item-canceled' => 'Cancelado (:qty_canceled)',
|
||||
'item-refunded' => 'Reembolsado (:qty_refunded)',
|
||||
'price' => 'Precio',
|
||||
'total' => 'Total',
|
||||
'subtotal' => 'Subtotal',
|
||||
|
|
@ -376,15 +391,21 @@ return [
|
|||
'tax' => 'Impuesto',
|
||||
'tax-percent' => 'Porcentaje impuesto',
|
||||
'tax-amount' => 'Monto impuesto',
|
||||
'discount-amount' => 'Monto descuento',
|
||||
'discount-amount' => 'Monto descuento',
|
||||
'discount-amount' => 'Monto de Descuento',
|
||||
'grand-total' => 'Gran total',
|
||||
'total-paid' => 'Total Pagado',
|
||||
'total-refunded' => 'Total reembolsado',
|
||||
'total-due' => 'Total adeudado',
|
||||
'cancel-confirm-msg' => '¿Está seguro que desea cancelar este pedido?',
|
||||
'refund-btn-title' => 'El monto del reembolso no debe ser cero',
|
||||
'refunds' => 'Reembolsos'
|
||||
'refund-btn-title' => 'Reembolso',
|
||||
'refunds' => 'Reembolsos',
|
||||
'comment-added-success' => 'Comentario agregado exitosamente.',
|
||||
'comment' => 'Comentario',
|
||||
'submit-comment' => 'Enviar Comentario',
|
||||
'notify-customer' => 'Notificar al Cliente',
|
||||
'customer-notified' => ':date | Cliente <b>Notificado</b>',
|
||||
'customer-not-notified' => ':date | Cliente <b>No Notificado</b>',
|
||||
'transactions' => 'Transacciones'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -408,7 +429,7 @@ return [
|
|||
'ship-to' => 'Enviar a',
|
||||
'print' => 'Imprimir',
|
||||
'order-date' => 'Fecha del pedido',
|
||||
'creation-error' => 'La creaciónd e facturas al pedido no está permitida.',
|
||||
'creation-error' => 'La creación de facturas al pedido no está permitida.',
|
||||
'product-error' => 'La factura no puede ser creada sin productos.'
|
||||
],
|
||||
|
||||
|
|
@ -432,7 +453,7 @@ return [
|
|||
'qty-available' => 'Cant disponible',
|
||||
'inventory-source' => 'Fuente de inventario',
|
||||
'carrier-title' => 'Nombre transportista',
|
||||
'tracking-number' => 'Número de tracking',
|
||||
'tracking-number' => 'Número de Seguimiento',
|
||||
'view-title' => 'Envío #:shipment_id',
|
||||
'creation-error' => 'El envío no puede ser creado para este pedido.',
|
||||
'order-error' => 'La creación de envíos no está permitido.',
|
||||
|
|
@ -443,7 +464,7 @@ return [
|
|||
'title' => 'Reembolsos',
|
||||
'id' => 'Id',
|
||||
'add-title' => 'Crear reembolso',
|
||||
'save-btn-title' => 'El monto del reembolso no debe ser cero',
|
||||
'save-btn-title' => 'Reembolso',
|
||||
'order-id' => 'Pedido #',
|
||||
'qty-ordered' => 'Cant pedido',
|
||||
'qty-to-refund' => 'Cant a reembolsar',
|
||||
|
|
@ -461,6 +482,20 @@ return [
|
|||
'view-title' => 'Reembolso #:refund_id',
|
||||
'invalid-refund-amount-error' => 'El monto del reembolso no debe ser cero.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transacciones',
|
||||
'id' => 'ID',
|
||||
'transaction-id' => 'Transacción #',
|
||||
'payment-method' => 'Método de Pago',
|
||||
'action' => 'Accción',
|
||||
'view-title' => 'Transacciónn #:transaction_id',
|
||||
'transaction-data' => 'Fecha de Transacción',
|
||||
'order-id' => 'Pedido #',
|
||||
'status' => 'Estado',
|
||||
'created-at' => 'Creado En',
|
||||
'transaction-details' => 'Detalles de la Transacción'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -490,8 +525,6 @@ return [
|
|||
'price' => 'Precio',
|
||||
'weight' => 'Peso',
|
||||
'status' => 'Estado',
|
||||
'enabled' => 'Habilitado',
|
||||
'disabled' => 'Deshabilitado',
|
||||
'add-variant-title' => 'Agregar variante',
|
||||
'variant-already-exist-message' => 'Una variante con las mismas opciones de atributos ya existe.',
|
||||
'add-image-btn-title' => 'Agregar imagen',
|
||||
|
|
@ -516,14 +549,13 @@ return [
|
|||
'browse-file' => 'Buscar archivo',
|
||||
'product-link' => 'Productos enlazados',
|
||||
'cross-selling' => 'Venta cruzada',
|
||||
'up-selling' => 'Up Selling',
|
||||
'up-selling' => 'Vendiendo',
|
||||
'related-products' => 'Productos relacionados',
|
||||
'product-search-hint' => 'Inicie escribiendo un nombre de producto',
|
||||
'no-result-found' => 'Productos con el mismo nombre no fueron encontrados.',
|
||||
'searching' => 'Buscaring ...',
|
||||
'grouped-products' => 'Grouped Productos',
|
||||
'searching' => 'Buscando ...',
|
||||
'grouped-products' => 'Productos Agrupados',
|
||||
'search-products' => 'Buscar Productos',
|
||||
'no-result-found' => 'Productos con el mismo nombre no fueron encontrados.',
|
||||
'channel' => 'Canales',
|
||||
'bundle-item' => 'Paquete de artículos',
|
||||
'add-option-btn-title' => 'Agregar opción',
|
||||
|
|
@ -536,12 +568,17 @@ return [
|
|||
'multiselect' => 'Lista de selección múltiple',
|
||||
'new-option' => 'Nueva opción',
|
||||
'is-default' => 'Es predeterminada',
|
||||
'remove-image-btn-title' => 'Remove Image',
|
||||
'customer-group' => 'Grupo de Clientes',
|
||||
'add-group-price' => 'Agregar Precio de Grupo de Clientes',
|
||||
'all-group' => 'Todos los Grupos',
|
||||
'fixed' => 'Reparado',
|
||||
'discount' => 'Descuento',
|
||||
'remove-image-btn-title' => 'Remover Imágen',
|
||||
'videos' => 'Videos',
|
||||
'video' => 'Video',
|
||||
'add-video-btn-title' => 'Add Video',
|
||||
'remove-video-btn-title' => 'Remove Video',
|
||||
'not-support-video' => 'Your browser does not support the video tag.',
|
||||
'add-video-btn-title' => 'Agregar Video',
|
||||
'remove-video-btn-title' => 'Remover Video',
|
||||
'not-support-video' => 'Su navegador no soporta la etiqueta video.',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
@ -577,8 +614,7 @@ return [
|
|||
'status' => 'Estado',
|
||||
'yes' => 'Sí',
|
||||
'no' => 'No',
|
||||
'value_per_locale' => 'Valor por lugar',
|
||||
'value_per_channel' => 'Valor por canal',
|
||||
'value_per_locale' => 'Valor por idioma',
|
||||
'value_per_channel' => 'Valor por canal',
|
||||
'is_filterable' => 'Usar en navegación por capas',
|
||||
'is_configurable' => 'Usar para crear producto configurable',
|
||||
|
|
@ -676,9 +712,9 @@ return [
|
|||
'save-btn-title' => 'Guardar tasa de impuesto',
|
||||
'general' => 'Tasa de impuesto',
|
||||
'identifier' => 'Identificador',
|
||||
'is_zip' => 'Habilitar rango Zip',
|
||||
'zip_from' => 'Zip desde',
|
||||
'zip_to' => 'Zip hasta',
|
||||
'is_zip' => 'Habilitar Rango de Código Postal',
|
||||
'zip_from' => 'Código Postal Desde',
|
||||
'zip_to' => 'Código Postal Hasta',
|
||||
'state' => 'Departamento',
|
||||
'select-state' => 'Seleccione un departamento.',
|
||||
'country' => 'País',
|
||||
|
|
@ -687,8 +723,7 @@ return [
|
|||
'title' => 'Editar tasa de impuesto',
|
||||
'edit-button-title' => 'Editar tasa'
|
||||
],
|
||||
'zip_code' => 'Código Zip',
|
||||
'is_zip' => 'Habilitar rango Zip',
|
||||
'zip_code' => 'Código Postal',
|
||||
],
|
||||
|
||||
'sales' => [
|
||||
|
|
@ -704,19 +739,18 @@ return [
|
|||
|
||||
'settings' => [
|
||||
'locales' => [
|
||||
'title' => 'Lugares',
|
||||
'add-title' => 'Agregar lugar',
|
||||
'edit-title' => 'Editar lugar',
|
||||
'add-title' => 'Agregar lugar',
|
||||
'save-btn-title' => 'Guardar lugar',
|
||||
'title' => 'Idiomas',
|
||||
'add-title' => 'Agregar idioma',
|
||||
'edit-title' => 'Editar idioma',
|
||||
'save-btn-title' => 'Guardar idioma',
|
||||
'general' => 'General',
|
||||
'code' => 'Código',
|
||||
'name' => 'Nombre',
|
||||
'direction' => 'Dirección',
|
||||
'create-success' => 'Lugar creado con éxito.',
|
||||
'update-success' => 'Lugar actualizado con éxito.',
|
||||
'delete-success' => 'Lugar borrado con éxito.',
|
||||
'last-delete-error' => 'Se requiere al menos un lugar.',
|
||||
'create-success' => 'Idioma creado con éxito.',
|
||||
'update-success' => 'Idioma actualizado con éxito.',
|
||||
'delete-success' => 'Idioma borrado con éxito.',
|
||||
'last-delete-error' => 'Se requiere al menos un idioma.',
|
||||
],
|
||||
'countries' => [
|
||||
'title' => 'Países',
|
||||
|
|
@ -796,9 +830,9 @@ return [
|
|||
'name' => 'Nombre',
|
||||
'description' => 'Descripción',
|
||||
'hostname' => 'Hostname',
|
||||
'currencies-and-locales' => 'Monedas y lugares',
|
||||
'locales' => 'Lugares',
|
||||
'default-locale' => 'Lugar predeterminado',
|
||||
'currencies-and-locales' => 'Monedas e Idiomas',
|
||||
'locales' => 'Idiomas',
|
||||
'default-locale' => 'Idioma predeterminado',
|
||||
'currencies' => 'Monedas',
|
||||
'base-currency' => 'Moneda predeterminada',
|
||||
'root-category' => 'Categoría raíz',
|
||||
|
|
@ -817,9 +851,9 @@ return [
|
|||
'seo-title' => 'Meta title',
|
||||
'seo-description' => 'Meta description',
|
||||
'seo-keywords' => 'Meta keywords',
|
||||
'maintenance-mode' => 'Maintenance Mode',
|
||||
'maintenance-mode-text' => 'Message',
|
||||
'allowed-ips' => 'Allowed IPs'
|
||||
'maintenance-mode' => 'Modo de Mantenimiento',
|
||||
'maintenance-mode-text' => 'Mensaje',
|
||||
'allowed-ips' => 'IP Permitidas'
|
||||
],
|
||||
|
||||
'sliders' => [
|
||||
|
|
@ -837,7 +871,9 @@ return [
|
|||
'update-success' => 'Slider actualizado con éxito',
|
||||
'update-fail' => 'El slider no pudo ser actualizado',
|
||||
'delete-success' => 'No puede borrar el último slider',
|
||||
'delete-fail' => 'Slider borrado con éxito'
|
||||
'delete-fail' => 'Slider borrado con éxito',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
@ -870,9 +906,9 @@ return [
|
|||
'save-btn-title' => 'Guardar tasa de impuesto',
|
||||
'general' => 'Tasa de impuesto',
|
||||
'identifier' => 'Identificador',
|
||||
'is_zip' => 'Habilitar rango Zip',
|
||||
'zip_from' => 'Zip desde',
|
||||
'zip_to' => 'Zip hasta',
|
||||
'is_zip' => 'Habilitar Rango de Código Postal',
|
||||
'zip_from' => 'Código Postal Desde',
|
||||
'zip_to' => 'Código Postal Hasta',
|
||||
'state' => 'Departamento',
|
||||
'select-state' => 'Seleccione un departamento.',
|
||||
'country' => 'País',
|
||||
|
|
@ -881,8 +917,7 @@ return [
|
|||
'title' => 'Editar tasa de impuesto',
|
||||
'edit-button-title' => 'Editar tasa'
|
||||
],
|
||||
'zip_code' => 'Código Zip',
|
||||
'is_zip' => 'Habilitar rango Zip',
|
||||
'zip_code' => 'Código Postal',
|
||||
'create-success' => 'Tasa de impuesto creada con éxito',
|
||||
'create-error' => 'No se puede crear la tasa de impuesto',
|
||||
'update-success' => 'Tasa de impuesto actualizada con éxito',
|
||||
|
|
@ -917,6 +952,7 @@ return [
|
|||
'address-list' => 'Lista de direcciones',
|
||||
'order-list' => 'Lista de pedidos',
|
||||
'address-id' => 'Dirección ID',
|
||||
'company-name' => 'Nombre de la Empresa',
|
||||
'address-1' => 'Dirección 1',
|
||||
'city' => 'Ciudad',
|
||||
'state-name' => 'Departamento',
|
||||
|
|
@ -954,6 +990,7 @@ return [
|
|||
'gender' => 'Género',
|
||||
'email' => 'Email',
|
||||
'date_of_birth' => 'Fecha de nacimiento',
|
||||
'date_of_birth_placeholder' => 'aaaa-mm-dd',
|
||||
'phone' => 'Teléfono',
|
||||
'customer_group' => 'Grupo',
|
||||
'save-btn-title' => 'Guardar cliente',
|
||||
|
|
@ -964,7 +1001,6 @@ return [
|
|||
'other' => 'Otro',
|
||||
'male' => 'Masculino',
|
||||
'female' => 'Femenino',
|
||||
'phone' => 'Teléfono',
|
||||
'group-default' => 'No puede borrar el grupo predeterminado.',
|
||||
'edit-help-title' => 'Editar cliente',
|
||||
'delete-help-title' => 'Borrar cliente',
|
||||
|
|
@ -988,8 +1024,8 @@ return [
|
|||
],
|
||||
|
||||
'subscribers' => [
|
||||
'title' => 'Suscriptores',
|
||||
'title-edit' => 'Editar suscriptor',
|
||||
'title' => 'Suscriptores del Boletín',
|
||||
'title-edit' => 'Editar Suscriptor del Boletín',
|
||||
'email' => 'Email',
|
||||
'is_subscribed' => 'Suscrito',
|
||||
'edit-btn-title' => 'Actualizar suscriptor',
|
||||
|
|
@ -1034,11 +1070,12 @@ return [
|
|||
'choose-condition-to-add' => 'Elija una condición para agregar',
|
||||
'cart-attribute' => 'Atributo de carrito',
|
||||
'subtotal' => 'Subtotal',
|
||||
'additional' => 'Información Adicional',
|
||||
'total-item-qty' => 'Cant total artículos',
|
||||
'total-weight' => 'Peso total',
|
||||
'payment-method' => 'Método de pago',
|
||||
'shipping-method' => 'Método de envío',
|
||||
'shipping-postcode' => 'Código postal/Zip de envío',
|
||||
'shipping-postcode' => 'Código Postal de envío',
|
||||
'shipping-state' => 'Departamento de envío',
|
||||
'shipping-country' => 'País de envío',
|
||||
'cart-item-attribute' => 'Atributo del artículo del carrito',
|
||||
|
|
@ -1137,63 +1174,63 @@ return [
|
|||
|
||||
'marketing' => [
|
||||
'templates' => [
|
||||
'title' => 'Email Templates',
|
||||
'add-title' => 'Add Email Template',
|
||||
'edit-title' => 'Edit Email Template',
|
||||
'save-btn-title' => 'Save',
|
||||
'title' => 'Plantilla de Email',
|
||||
'add-title' => 'Agregar Plantilla de Email',
|
||||
'edit-title' => 'Editar Plantilla de Email',
|
||||
'save-btn-title' => 'Guardar',
|
||||
'general' => 'General',
|
||||
'name' => 'Name',
|
||||
'status' => 'Status',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'draft' => 'Draft',
|
||||
'content' => 'Content',
|
||||
'create-success' => 'Email template created successfully.',
|
||||
'update-success' => 'Email template updated successfully.',
|
||||
'delete-success' => 'Email template deleted successfully',
|
||||
'name' => 'Nombre',
|
||||
'status' => 'Estado',
|
||||
'active' => 'Activo',
|
||||
'inactive' => 'Inactivo',
|
||||
'draft' => 'Borrador',
|
||||
'content' => 'Contenido',
|
||||
'create-success' => 'Plantilla de Email creada correctamente.',
|
||||
'update-success' => 'Plantilla de Email actualizada correctamente.',
|
||||
'delete-success' => 'Plantilla de Email eliminada correctamente.',
|
||||
],
|
||||
|
||||
'campaigns' => [
|
||||
'title' => 'Campaigns',
|
||||
'add-title' => 'Add Campaign',
|
||||
'edit-title' => 'Edit Campaign',
|
||||
'save-btn-title' => 'Save',
|
||||
'title' => 'Campañas',
|
||||
'add-title' => 'Agregar Campaña',
|
||||
'edit-title' => 'Editar Campaña',
|
||||
'save-btn-title' => 'Guardar',
|
||||
'general' => 'General',
|
||||
'name' => 'Name',
|
||||
'status' => 'Status',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'subject' => 'Subject',
|
||||
'email-template' => 'Email Template',
|
||||
'audience' => 'Audience',
|
||||
'channel' => 'Channel',
|
||||
'customer-group' => 'Customer Group',
|
||||
'schedule' => 'Schedule',
|
||||
'schedule-type' => 'Schedule Type',
|
||||
'once' => 'Once',
|
||||
'events' => 'Events',
|
||||
'schedule-date' => 'Schedule Date',
|
||||
'name' => 'Nombre',
|
||||
'status' => 'Estado',
|
||||
'active' => 'Activo',
|
||||
'inactive' => 'Inactivo',
|
||||
'subject' => 'Asunto',
|
||||
'email-template' => 'Plantilla de Email',
|
||||
'audience' => 'Audiencia',
|
||||
'channel' => 'Canal',
|
||||
'customer-group' => 'Grupo de Clientes',
|
||||
'schedule' => 'Programación',
|
||||
'schedule-type' => 'Tipo de Programación',
|
||||
'once' => 'Una vez',
|
||||
'events' => 'Eventos',
|
||||
'schedule-date' => 'Fecha Programada',
|
||||
'spooling' => 'Spooling',
|
||||
'event' => 'Event',
|
||||
'birthday' => 'Birthday',
|
||||
'create-success' => 'Campaign created successfully.',
|
||||
'update-success' => 'Campaign updated successfully.',
|
||||
'delete-success' => 'Campaign deleted successfully',
|
||||
'event' => 'Evento',
|
||||
'birthday' => 'Cumpleaños',
|
||||
'create-success' => 'Campaña creada correctamente.',
|
||||
'update-success' => 'Campaña actualizada correctamente.',
|
||||
'delete-success' => 'Campaña eliminada correctamente.',
|
||||
],
|
||||
|
||||
'events' => [
|
||||
'title' => 'Events',
|
||||
'add-title' => 'Add Event',
|
||||
'edit-title' => 'Edit Event',
|
||||
'save-btn-title' => 'Save',
|
||||
'title' => 'Eventos',
|
||||
'add-title' => 'Agregar Evento',
|
||||
'edit-title' => 'Editar Evento',
|
||||
'save-btn-title' => 'Guardar',
|
||||
'general' => 'General',
|
||||
'name' => 'Name',
|
||||
'description' => 'Description',
|
||||
'date' => 'Date',
|
||||
'create-success' => 'Event created successfully.',
|
||||
'update-success' => 'Event updated successfully.',
|
||||
'delete-success' => 'Event deleted successfully.',
|
||||
'edit-error' => 'Can not edit this event.'
|
||||
'name' => 'Nombre',
|
||||
'description' => 'Descripción',
|
||||
'date' => 'Fecha',
|
||||
'create-success' => 'Evento creado con éxito.',
|
||||
'update-success' => 'Evento actualizado con éxito.',
|
||||
'delete-success' => 'Evento borrado con éxito.',
|
||||
'edit-error' => 'No se puede editar este evento.'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -1256,7 +1293,7 @@ return [
|
|||
'content' => 'Contenido',
|
||||
'url-key' => 'URL clave',
|
||||
'channel' => 'Canales',
|
||||
'locale' => 'Lugares',
|
||||
'locale' => 'Idiomas',
|
||||
'create-btn-title' => 'Guardar página',
|
||||
'edit-title' => 'Editar Page',
|
||||
'edit-btn-title' => 'Guardar página',
|
||||
|
|
@ -1267,9 +1304,9 @@ return [
|
|||
'update-failure' => 'La página no pudo ser actualizada',
|
||||
'page-title' => 'Título de la página',
|
||||
'layout' => 'Diseño',
|
||||
'meta_keywords' => 'Meta Keywords',
|
||||
'meta_description' => 'Meta Description',
|
||||
'meta_title' => 'Meta Title',
|
||||
'meta_keywords' => 'Meta Palabras Claves',
|
||||
'meta_description' => 'Meta Descripción',
|
||||
'meta_title' => 'Meta Título',
|
||||
'delete-success' => 'Página CMS borrada con éxito',
|
||||
'delete-failure' => 'Página CMS no pudo ser borrada',
|
||||
'preview' => 'Previsualización',
|
||||
|
|
@ -1282,6 +1319,9 @@ return [
|
|||
|
||||
'response' => [
|
||||
'being-used' => 'Este recurso: :name está siendo usado en :source',
|
||||
'product-copied' => 'El Producto ha sido copiado',
|
||||
'error-while-copying' => 'Se produjo un error al intentar copiar el producto',
|
||||
'product-can-not-be-copied' => 'Productos del tipo :type no se pueden copiar',
|
||||
'cannot-delete-default' => 'No puede borrar el canal predeterminado',
|
||||
'create-success' => ':name :name creado con éxito.',
|
||||
'update-success' => ':name actualizado con éxito.',
|
||||
|
|
@ -1326,14 +1366,17 @@ return [
|
|||
],
|
||||
'system' => [
|
||||
'catalog' => 'Catálogo',
|
||||
'homepage' => 'Homepage configuration',
|
||||
'allow-no-of-new-product-homepage' => 'Allowed No of New Product in Homepage',
|
||||
'allow-no-of-featured-product-homepage' => 'Allowed No of Featured Product in Homepage',
|
||||
'allow-out-of-stock-items' => 'Allow out of stock items',
|
||||
'homepage' => 'Configuración de Página de Inicio',
|
||||
'allow-no-of-new-product-homepage' => 'No permitido Nuevo Producto en la Página de Inicio',
|
||||
'allow-no-of-featured-product-homepage' => 'No Permitido Producto Destacado en Página de Inicio',
|
||||
'allow-out-of-stock-items' => 'Permitir Artículos Agotados',
|
||||
'products' => 'Productos',
|
||||
'guest-checkout' => 'Compras como invitado',
|
||||
'allow-guest-checkout' => 'Permitir compras como invitado',
|
||||
'allow-guest-checkout-hint' => 'Aviso: Si eligió permitir, esta opción puede ser configurada específicamente para cada producto.',
|
||||
'attribute' => 'Atributo',
|
||||
'image-upload-size' => 'Tamaño de Carga de Imagen Permitido (en Kb)',
|
||||
'file-upload-size' => 'Tamaño de Carga de Archivo Permitido (en Kb)',
|
||||
'review' => 'Opiniones',
|
||||
'allow-guest-review' => 'Permitir opiniones como invitado',
|
||||
'inventory' => 'Inventario',
|
||||
|
|
@ -1351,7 +1394,7 @@ return [
|
|||
'origin' => 'Origen',
|
||||
'country' => 'País',
|
||||
'state' => 'Departamento',
|
||||
'zip' => 'Zip',
|
||||
'zip' => 'Código Postal',
|
||||
'city' => 'Ciudad',
|
||||
'street-address' => 'Dirección',
|
||||
'title' => 'Título',
|
||||
|
|
@ -1365,11 +1408,11 @@ return [
|
|||
'money-transfer' => 'Transferencia',
|
||||
'paypal-standard' => 'PayPal',
|
||||
'business-account' => 'Cuenta de negocio',
|
||||
'newsletter' => 'Suscripción a newsletter',
|
||||
'newsletter-subscription' => 'Permitir suscripciones a newsletter',
|
||||
'newsletter' => 'Boletín de Suscripción',
|
||||
'newsletter-subscription' => 'Permitir Suscripciones al Boletín',
|
||||
'email' => 'Verificación de email',
|
||||
'email-verification' => 'Permitir verificación de email',
|
||||
'sort_order' => 'Orden de clasificación',
|
||||
'sort_order' => 'Orden de Clasificación',
|
||||
'general' => 'General',
|
||||
'footer' => 'Pie de página',
|
||||
'content' => 'Contenido',
|
||||
|
|
@ -1394,31 +1437,59 @@ return [
|
|||
'order-number-prefix' => 'Prefijo para Pedido #',
|
||||
'order-number-length' => 'Largo para Pedido #',
|
||||
'order-number-suffix' => 'Sufijo para Pedido #',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'order-number-generator-class' => 'Generado de Números de Pedido',
|
||||
'minimum-order' => 'Configuración de Pedido Mínimo',
|
||||
'minimum-order-amount' => 'Cantidad Mínima de Pedido',
|
||||
'default' => 'Predeterminado',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Todos',
|
||||
'all-locales' => 'Todos',
|
||||
'invoice-slip-design' => 'Diseño parte trasera factura',
|
||||
'logo' => 'logo',
|
||||
'all-channels' => 'Todos los Canales',
|
||||
'all-locales' => 'Todos los Idiomas',
|
||||
'all-customer-groups' => 'Todos los grupos de Clientes',
|
||||
'invoice-slip-design' => 'Diseño de Comprobande de Factura',
|
||||
'logo' => 'Logo',
|
||||
'storefront' => 'Storefront',
|
||||
'default-list-mode' => 'Modo de Lista Predeterminado',
|
||||
'grid' => 'Cuadrícula',
|
||||
'list' => 'Lista',
|
||||
'products-per-page' => 'Productos Por Página',
|
||||
'sort-by' => 'Ordenar Por',
|
||||
'from-z-a' => 'Desde Z-A',
|
||||
'from-a-z' => 'Desde A-Z',
|
||||
'newest-first' => 'Más Nuevos Primero',
|
||||
'oldest-first' => 'Más Viejos Primero',
|
||||
'cheapest-first' => 'Más Barato Primero',
|
||||
'expensive-first' => 'Más Caro Primero',
|
||||
'comma-seperated' => 'Separado por Comas',
|
||||
'favicon' => 'Favicon',
|
||||
'seo' => 'SEO',
|
||||
'rich-snippets' => 'Fragmentos Enriquecidos',
|
||||
'enable' => 'Habilitar',
|
||||
'show-weight' => 'Mostrar Peso',
|
||||
'show-categories' => 'Mostrar Categorías',
|
||||
'show-images' => 'Mostrar Imágenes',
|
||||
'show-reviews' => 'Mostrar Reseñas',
|
||||
'show-ratings' => 'Mostrar Calificaciones',
|
||||
'show-offers' => 'Mostrar Ofertas',
|
||||
'show-sku' => 'Mostrar SKU',
|
||||
'categories' => 'Categorías',
|
||||
'show-search-input-field' => 'Mostrar Campo de Entrada de Búsqueda',
|
||||
'store-name' => 'Nombre de la tienda',
|
||||
'vat-number' => 'Número de valor agregado',
|
||||
'contact-number' => 'Número de contacto',
|
||||
'bank-details' => 'Detalles del banco',
|
||||
'mailing-address' => 'Send Check to',
|
||||
'instructions' => 'Instructions',
|
||||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'mailing-address' => 'Dirección de Envío',
|
||||
'instructions' => 'Instrucciones',
|
||||
'custom-scripts' => 'Scripts Personalizados',
|
||||
'custom-css' => 'CSS Personalizados',
|
||||
'custom-javascript' => 'Javascript Personalizado',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.',
|
||||
'client-secret' => 'Client Secret',
|
||||
'client-secret-info' => 'Add your secret key here',
|
||||
'accepted-currencies' => 'Accepted currencies',
|
||||
'accepted-currencies-info' => 'Add currency code comma seperated e.g. USD,INR,...',
|
||||
'buy-now-button-display' => 'Allow customers to directly buy products'
|
||||
'client-id' => 'Id del Cliente',
|
||||
'client-id-info' => 'Utilice "sb" para realizar pruebas.',
|
||||
'client-secret' => 'Secreto del Cliente',
|
||||
'client-secret-info' => 'Agrega tu clave secreta aquí',
|
||||
'accepted-currencies' => 'Monedas aceptadas',
|
||||
'accepted-currencies-info' => 'Agregue el código de moneda separado por comas, por ej. USD,INR,...',
|
||||
'buy-now-button-display' => 'Permitir que los clientes compren productos directamente'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'تخفیف',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -238,7 +239,9 @@ return [
|
|||
'view' => 'چشم انداز',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'وضعیت به روز رسانی'
|
||||
'update-status' => 'وضعیت به روز رسانی',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -390,6 +393,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -466,6 +470,20 @@ return [
|
|||
'view-title' => ' #:refund_id بازپرداخت',
|
||||
'invalid-refund-amount-error' => 'مبلغ بازپرداخت باید صفر نباشد.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -842,7 +860,9 @@ return [
|
|||
'update-success' => 'اسلایدر با موفقیت به روز شد',
|
||||
'update-fail' => 'امکان بروزرسانی اسلایدر وجود ندارد',
|
||||
'delete-success' => 'آخرین اسلایدر حذف نمی شود',
|
||||
'delete-fail' => 'اسلایدر با موفقیت حذف شد'
|
||||
'delete-fail' => 'اسلایدر با موفقیت حذف شد',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Sconti',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -239,7 +240,9 @@ return [
|
|||
'view' => 'Vedi',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Update Stato'
|
||||
'update-status' => 'Update Stato',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -392,7 +395,8 @@ return [
|
|||
'submit-comment' => 'Invia Commento',
|
||||
'notify-customer' => 'Notifica Cliente',
|
||||
'customer-notified' => ':date | Cliente <b>Notificato</b>',
|
||||
'customer-not-notified' => ':date | Cliente <b>Non Notificato</b>'
|
||||
'customer-not-notified' => ':date | Cliente <b>Non Notificato</b>',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -468,6 +472,20 @@ return [
|
|||
'view-title' => 'Rimborso #:refund_id',
|
||||
'invalid-refund-amount-error' => 'La somma rimborsata dovrebbe essere diversa da zero.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -846,7 +864,9 @@ return [
|
|||
'update-success' => 'Slider aggiornato con successo',
|
||||
'update-fail' => 'Non è stato possibile aggiornare lo Slider',
|
||||
'delete-success' => 'Non è stato possibile eliminare l\'ultimo slider',
|
||||
'delete-fail' => 'Slider eliminato con successo'
|
||||
'delete-fail' => 'Slider eliminato con successo',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Korting',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -391,6 +392,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -467,6 +469,20 @@ return [
|
|||
'view-title' => 'Terugbetaling #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Het restitutiebedrag mag niet nul zijn.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -843,7 +859,9 @@ return [
|
|||
'update-success' => 'Schuifitem is bijgewerkt',
|
||||
'update-fail' => 'Schuifregelaar kan niet worden bijgewerkt',
|
||||
'delete-success' => 'Kan laatste llider-item niet verwijderen',
|
||||
'delete-fail' => 'Schuifitem is verwijderd'
|
||||
'delete-fail' => 'Schuifitem is verwijderd',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Rabat',
|
||||
'cms' => 'System CMS'
|
||||
'cms' => 'System CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -237,7 +238,9 @@ return [
|
|||
'view' => 'Widok',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Aktualizcja statusu'
|
||||
'update-status' => 'Aktualizcja statusu',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -390,7 +393,8 @@ return [
|
|||
'submit-comment' => 'Prześlij komentarz',
|
||||
'notify-customer' => 'Powiadom klienta',
|
||||
'customer-notified' => ':date | Klient <b>Powiadomiony</b>',
|
||||
'customer-not-notified' => ':date | Klient <b>Nie powiadomiony</b>'
|
||||
'customer-not-notified' => ':date | Klient <b>Nie powiadomiony</b>',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -467,6 +471,20 @@ return [
|
|||
'view-title' => 'Refundacja nr #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Kwota zwrotu powinna być różna od zera.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -844,7 +862,9 @@ return [
|
|||
'update-success' => 'Element suwaka pomyślnie zaktualizowany',
|
||||
'update-fail' => 'Nie można zaktualizować suwaka',
|
||||
'delete-success' => 'Nie można usunąć ostatniego elementu lidera',
|
||||
'delete-fail' => 'Element suwaka został pomyślnie usunięty'
|
||||
'delete-fail' => 'Element suwaka został pomyślnie usunięty',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Desconto',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -238,7 +239,9 @@ return [
|
|||
'view' => 'Visão',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Atualizar o status'
|
||||
'update-status' => 'Atualizar o status',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -390,6 +393,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -466,6 +470,20 @@ return [
|
|||
'view-title' => 'Reembolso #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Refund amount should be non zero.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -843,7 +861,9 @@ return [
|
|||
'update-success' => 'Slider atualizado com sucesso',
|
||||
'update-fail' => 'Slider não pôde ser atualizado',
|
||||
'delete-success' => 'Não foi possível excluir o slider',
|
||||
'delete-fail' => 'Slider excluído com sucesso'
|
||||
'delete-fail' => 'Slider excluído com sucesso',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'İndirim',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -236,7 +237,9 @@ return [
|
|||
'view' => 'Görüntüle',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Durum Güncelle'
|
||||
'update-status' => 'Durum Güncelle',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -388,7 +391,8 @@ return [
|
|||
'submit-comment' => 'Yorum Gönder',
|
||||
'notify-customer' => 'Müşteriyi Bilgilendir',
|
||||
'customer-notified' => ':date | Müşteri <b>Bilgilendirildi</b>',
|
||||
'customer-not-notified' => ':date | Müşteri <b>Bilgilendirilmedi</b>'
|
||||
'customer-not-notified' => ':date | Müşteri <b>Bilgilendirilmedi</b>',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -465,6 +469,20 @@ return [
|
|||
'view-title' => 'İade #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Lütfen iade miktarını giriniz.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
@ -835,7 +853,9 @@ return [
|
|||
'update-success' => 'Slider başarıyla güncellendi.',
|
||||
'update-fail' => 'Slider güncellenemez.',
|
||||
'delete-success' => 'Slider başarıyla silindi.',
|
||||
'delete-fail' => 'Slider silinirken hata oluştu.'
|
||||
'delete-fail' => 'Slider silinirken hata oluştu.',
|
||||
'expired-at' => 'Expire Date',
|
||||
'sort-order' => 'Sort Order'
|
||||
],
|
||||
|
||||
'tax-categories' => [
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@
|
|||
</style>
|
||||
@stop
|
||||
|
||||
@php
|
||||
$variantImages = [];
|
||||
|
||||
foreach ($product->variants as $variant) {
|
||||
foreach ($variant->images as $image) {
|
||||
$variantImages[$variant->id] = $image;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.variations.before', ['product' => $product]) !!}
|
||||
|
||||
<accordian :title="'{{ __('admin::app.catalog.products.variations') }}'" :active="true">
|
||||
|
|
@ -96,6 +106,7 @@
|
|||
<tr>
|
||||
<th class="sku">{{ __('admin::app.catalog.products.sku') }}</th>
|
||||
<th>{{ __('admin::app.catalog.products.name') }}</th>
|
||||
<th>{{ __('admin::app.catalog.products.images') }}</th>
|
||||
|
||||
@foreach ($product->super_attributes as $attribute)
|
||||
<th class="{{ $attribute->code }}"
|
||||
|
|
@ -145,6 +156,26 @@
|
|||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has(variantInputName + '[images][' + index + ']') ? 'has-error' : '']">
|
||||
<div v-for='(image, index) in items' class="image-wrapper variant-image">
|
||||
<label class="image-item" v-bind:class="{ 'has-image': imageData[index] }">
|
||||
<input type="hidden" :name="[variantInputName + '[images][' + image.id + ']']" v-if="! new_image[index]"/>
|
||||
|
||||
<input type="file" v-validate="'mimes:image/*'" :name="[variantInputName + '[images][' + index + ']']" accept="image/*" :ref="'imageInput' + index" multiple="multiple" @change="addImageView($event, index)" :id="image.id"/>
|
||||
|
||||
<img class="preview" :src="imageData[index]" v-if="imageData[index]">
|
||||
</label>
|
||||
|
||||
<span class="icon trash-icon" @click="removeImage(image)"></span>
|
||||
</div>
|
||||
|
||||
<label class="btn btn-lg btn-primary add-image" @click="createFileType">
|
||||
{{ __('admin::app.catalog.products.add-image-btn-title') }}
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td v-for='(attribute, index) in superAttributes'>
|
||||
<div class="control-group">
|
||||
<input type="hidden" :name="[variantInputName + '[' + attribute.code + ']']"
|
||||
|
|
@ -388,7 +419,12 @@
|
|||
inventorySources: @json($inventorySources),
|
||||
inventories: {},
|
||||
totalQty: 0,
|
||||
superAttributes: super_attributes
|
||||
superAttributes: super_attributes,
|
||||
items: [],
|
||||
imageCount: 0,
|
||||
images: {},
|
||||
imageData: [],
|
||||
new_image: [],
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -401,6 +437,21 @@
|
|||
})
|
||||
},
|
||||
|
||||
mounted () {
|
||||
var this_this = this;
|
||||
|
||||
this_this.variant.images.forEach(function(image) {
|
||||
this_this.items.push(image)
|
||||
this_this.imageCount++;
|
||||
|
||||
if (image.id && image.url) {
|
||||
this_this.imageData.push(image.url);
|
||||
} else if (image.id && image.file) {
|
||||
this_this.readFile(image.file);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
computed: {
|
||||
variantInputName: function () {
|
||||
if (this.variant.id)
|
||||
|
|
@ -449,9 +500,54 @@
|
|||
for (var key in this.inventories) {
|
||||
this.totalQty += parseInt(this.inventories[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
createFileType: function() {
|
||||
var this_this = this;
|
||||
|
||||
this.imageCount++;
|
||||
|
||||
this.items.push({'id': 'image_' + this.imageCount});
|
||||
|
||||
this.imageData[this.imageData.length] = '';
|
||||
},
|
||||
|
||||
removeImage (image) {
|
||||
let index = this.items.indexOf(image);
|
||||
|
||||
Vue.delete(this.items, index);
|
||||
|
||||
Vue.delete(this.imageData, index);
|
||||
},
|
||||
|
||||
addImageView: function($event, index) {
|
||||
var ref = "imageInput" + index;
|
||||
var imageInput = this.$refs[ref][0];
|
||||
|
||||
if (imageInput.files && imageInput.files[0]) {
|
||||
if (imageInput.files[0].type.includes('image/')) {
|
||||
this.readFile(imageInput.files[0], index);
|
||||
|
||||
} else {
|
||||
imageInput.value = "";
|
||||
|
||||
alert('Only images (.jpeg, .jpg, .png, ..) are allowed.');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
readFile: function(image, index) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.imageData.splice(index, 1, e.target.result);
|
||||
}
|
||||
|
||||
reader.readAsDataURL(image);
|
||||
|
||||
this.new_image[index] = 1;
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -70,6 +70,20 @@
|
|||
<textarea class="control" disabled> {{ $review->comment }}</textarea>
|
||||
</div>
|
||||
|
||||
@if (count($review->images) > 0)
|
||||
<div class="control-group">
|
||||
<label for="images" >{{ __('admin::app.catalog.categories.image') }}</label>
|
||||
|
||||
<div class="image-wrapper">
|
||||
@foreach ($review->images as $image)
|
||||
<label class="image-item">
|
||||
<img class="preview" src="{{ $image->url }}">
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@
|
|||
<div class="product image">
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($item->product); ?>
|
||||
|
||||
<img class="item-image" src="{{ $productBaseImage['small_image_url'] }}" />
|
||||
<img class="item-image" src="{{ $productBaseImage['small_image_url'] ?? asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.webp') }}" />
|
||||
</div>
|
||||
|
||||
<div class="description do-not-cross-arrow">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
@foreach ($records as $record)
|
||||
<tr>
|
||||
@foreach($record as $column => $value)
|
||||
@php
|
||||
$value = preg_replace('/[^A-Za-z0-9@#$%^&*()_!+\-]/', '', $value);
|
||||
@endphp
|
||||
|
||||
<td>{{ $value }} </td>
|
||||
@endforeach
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@section('content-wrapper')
|
||||
<div class="inner-section">
|
||||
|
||||
|
||||
@include ('admin::layouts.nav-aside')
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
|
@ -12,6 +12,6 @@
|
|||
@yield('content')
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
<div class="aside-nav">
|
||||
|
||||
{{-- button for collapsing aside nav --}}
|
||||
<nav-slide-button icon-class="accordian-left-icon"></nav-slide-button>
|
||||
|
||||
<ul>
|
||||
@if (request()->route()->getName() != 'admin.configuration.index')
|
||||
<?php $keys = explode('.', $menu->currentKey); ?>
|
||||
|
|
@ -30,8 +34,4 @@
|
|||
@endforeach
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
<!-- <div class="close-nav-aside">
|
||||
<i class="icon angle-left-icon close-icon"></i>
|
||||
</div> -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,19 @@
|
|||
<div class="navbar-left">
|
||||
|
||||
{{-- button for expanding nav bar --}}
|
||||
<nav-slide-button id="nav-expand-button" icon-class="accordian-right-icon" style="display: none;"></nav-slide-button>
|
||||
|
||||
{{-- left menu bar --}}
|
||||
<ul class="menubar">
|
||||
@foreach ($menu->items as $menuItem)
|
||||
<li class="menu-item {{ $menu->getActive($menuItem) }}">
|
||||
<a href="{{ count($menuItem['children']) ? current($menuItem['children'])['url'] : $menuItem['url'] }}">
|
||||
<span class="icon {{ $menuItem['icon-class'] }}"></span>
|
||||
|
||||
|
||||
<span>{{ trans($menuItem['name']) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
@ -515,7 +515,7 @@
|
|||
});
|
||||
|
||||
if (matchedAttribute[0]['type'] == 'multiselect' || matchedAttribute[0]['type'] == 'checkbox') {
|
||||
this.condition.operator = '{}';
|
||||
// this.condition.operator = '{}';
|
||||
|
||||
this.condition.value = this.condition.value == '' && this.condition.value != undefined
|
||||
? []
|
||||
|
|
|
|||
|
|
@ -1,12 +1,32 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
{{-- meta tags --}}
|
||||
<meta http-equiv="Cache-control" content="no-cache">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
{{-- lang supports inclusion --}}
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'Hind';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Hind/Hind-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Noto/NotoSans-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
/* main font will be set on locale based */
|
||||
$mainFontFamily = app()->getLocale() === 'ar' ? 'DejaVu Sans' : 'Noto Sans';
|
||||
@endphp
|
||||
|
||||
{{-- main css --}}
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: DejaVu Sans;
|
||||
font-family: '{{ $mainFontFamily }}';
|
||||
}
|
||||
|
||||
body, th, td, h5 {
|
||||
|
|
@ -306,7 +326,6 @@
|
|||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -509,6 +509,7 @@
|
|||
<td class="empty" colspan="7">{{ __('admin::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -551,6 +552,7 @@
|
|||
<td class="empty" colspan="7">{{ __('admin::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -595,6 +597,49 @@
|
|||
<td class="empty" colspan="7">{{ __('admin::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</tab>
|
||||
|
||||
<tab name="{{ __('admin::app.sales.orders.transactions') }}">
|
||||
|
||||
<div class="table" style="padding: 20px 0">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.transactions.transaction-id') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.order-id') }}</th>
|
||||
<th>{{ __('admin::app.sales.transactions.payment-method') }}</th>
|
||||
<th>{{ __('admin::app.sales.transactions.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->transactions as $transaction)
|
||||
<tr>
|
||||
<td>#{{ $transaction->transaction_id }}</td>
|
||||
<td>{{ $transaction->order_id }}</td>
|
||||
<td>
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $transaction->payment_method . '.title') }}
|
||||
</td>
|
||||
<td class="action">
|
||||
<a href="{{ route('admin.sales.transactions.view', $transaction->id) }}">
|
||||
<i class="icon eye-icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if (! $order->transactions->count())
|
||||
<tr>
|
||||
<td class="empty" colspan="7">{{ __('admin::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.transactions.title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.transactions.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<div class="export-import" @click="showModal('downloadDataGrid')">
|
||||
<i class="export-icon"></i>
|
||||
<span>
|
||||
{{ __('admin::app.export.export') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
@inject('orderTransactionsDataGrid', 'Webkul\Admin\DataGrids\OrderTransactionsDataGrid')
|
||||
{!! $orderTransactionsDataGrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modal id="downloadDataGrid" :is-open="modalIds.downloadDataGrid">
|
||||
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
|
||||
<div slot="body">
|
||||
<export-form></export-form>
|
||||
</div>
|
||||
</modal>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
@include('admin::export.export', ['gridName' => $orderTransactionsDataGrid])
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.transactions.view-title', ['transaction_id' => $transaction->id]) }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<div class="content full-page">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
<i class="icon angle-left-icon back-link" onclick="window.location = '{{ route('admin.sales.transactions.index') }}'"></i>
|
||||
|
||||
{{ __('admin::app.sales.transactions.view-title', ['transaction_id' => $transaction->id]) }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.transactions.transaction-data') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.transactions.transaction-data') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.transactions.transaction-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $transaction->transaction_id }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.transactions.order-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
<a href="{{ route('admin.sales.orders.view', $transaction->order_id)}}">
|
||||
{{ $transaction->order_id }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.transactions.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $transaction->payment_method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- <div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.transactions.status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $transaction->status }}
|
||||
</span>
|
||||
</div> --}}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.transactions.created-at') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $transaction->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.transactions.transaction-details') }}'" :active="true">
|
||||
<div slot="body">
|
||||
@php
|
||||
$transData = json_decode(json_encode(json_decode($transaction['data'])), true);
|
||||
@endphp
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.transactions.transaction-details') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
@foreach ($transactionDeatilsData as $key => $data)
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ $key }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $data }}
|
||||
</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -34,18 +34,20 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.settings.slider.create.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('locale') ? 'has-error' : '']">
|
||||
<div class="control-group" :class="[errors.has('locale[]') ? 'has-error' : '']">
|
||||
<label for="locale">{{ __('admin::app.datagrid.locale') }}</label>
|
||||
|
||||
<select class="control" id="locale" name="locale" data-vv-as=""{{ __('admin::app.datagrid.locale') }}"" value="" v-validate="'required'">
|
||||
<select class="control" id="locale" name="locale[]" data-vv-as=""{{ __('admin::app.datagrid.locale') }}"" value="" v-validate="'required'" multiple>
|
||||
@foreach (core()->getAllLocales() as $localeModel)
|
||||
|
||||
<option value="{{ $localeModel->code }}" {{ ($localeModel->code) == $locale ? 'selected' : '' }}>
|
||||
<option value="{{ $localeModel->code }}">
|
||||
{{ $localeModel->name }}
|
||||
</option>
|
||||
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="control-error" v-if="errors.has('locale[]')">@{{ errors.first('locale[]') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
|
|
@ -67,6 +69,18 @@
|
|||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group date">
|
||||
<label for="expired_at">{{ __('admin::app.settings.sliders.expired-at') }}</label>
|
||||
<date>
|
||||
<input type="text" name="expired_at" class="control" value="{{ old('expired_at') }}"/>
|
||||
</date>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="sort_order">{{ __('admin::app.settings.sliders.sort-order') }}</label>
|
||||
<input type="text" class="control" id="sort_order" name="sort_order" value="{{ old('sort_order') ?? 0 }}"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group {!! $errors->has('image.*') ? 'has-error' : '' !!}">
|
||||
<label class="required">{{ __('admin::app.catalog.categories.image') }}</label>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,22 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.settings.slider.edit.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('locale[]') ? 'has-error' : '']">
|
||||
<label for="locale">{{ __('admin::app.datagrid.locale') }}</label>
|
||||
|
||||
<select class="control" id="locale" name="locale[]" data-vv-as=""{{ __('admin::app.datagrid.locale') }}"" value="" v-validate="'required'" multiple>
|
||||
@foreach (core()->getAllLocales() as $localeModel)
|
||||
|
||||
<option value="{{ $localeModel->code }}" {{ in_array($localeModel->code, explode(',', $slider->locale)) ? 'selected' : ''}}>
|
||||
{{ $localeModel->name }}
|
||||
</option>
|
||||
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="control-error" v-if="errors.has('locale[]')">@{{ errors.first('locale[]') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
<label for="title" class="required">{{ __('admin::app.settings.sliders.name') }}</label>
|
||||
<input type="text" class="control" name="title" v-validate="'required'" data-vv-as=""{{ __('admin::app.settings.sliders.name') }}"" value="{{ $slider->title ?: old('title') }}">
|
||||
|
|
@ -56,6 +72,18 @@
|
|||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group date">
|
||||
<label for="expired_at">{{ __('admin::app.settings.sliders.expired-at') }}</label>
|
||||
<date>
|
||||
<input type="text" name="expired_at" class="control" value="{{ old('expired_at') ?: $slider->expired_at }}"/>
|
||||
</date>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="sort_order">{{ __('admin::app.settings.sliders.sort-order') }}</label>
|
||||
<input type="text" class="control" id="sort_order" name="sort_order" value="{{ $slider->sort_order ?? old('sort_order') }}"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group {!! $errors->has('image.*') ? 'has-error' : '' !!}">
|
||||
<label class="required">{{ __('admin::app.catalog.categories.image') }}</label>
|
||||
|
||||
|
|
|
|||
|
|
@ -360,10 +360,10 @@ class AttributeTableSeeder extends Seeder
|
|||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
'is_comparable' => '0',
|
||||
], [
|
||||
],[
|
||||
'id' => '19',
|
||||
'code' => 'width',
|
||||
'admin_name' => 'Width',
|
||||
'code' => 'length',
|
||||
'admin_name' => 'Length',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '22',
|
||||
|
|
@ -381,8 +381,8 @@ class AttributeTableSeeder extends Seeder
|
|||
'is_comparable' => '0',
|
||||
], [
|
||||
'id' => '20',
|
||||
'code' => 'height',
|
||||
'admin_name' => 'Height',
|
||||
'code' => 'width',
|
||||
'admin_name' => 'Width',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '23',
|
||||
|
|
@ -400,8 +400,8 @@ class AttributeTableSeeder extends Seeder
|
|||
'is_comparable' => '0',
|
||||
], [
|
||||
'id' => '21',
|
||||
'code' => 'depth',
|
||||
'admin_name' => 'Depth',
|
||||
'code' => 'height',
|
||||
'admin_name' => 'Height',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '24',
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ return [
|
|||
'day' => 'يوم',
|
||||
'status' => 'الحالة',
|
||||
'open' => 'افتح',
|
||||
'close' => 'غلق'
|
||||
'close' => 'غلق',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ return [
|
|||
'day' => 'Day',
|
||||
'status' => 'Status',
|
||||
'open' => 'Open',
|
||||
'close' => 'Close'
|
||||
'close' => 'Close',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,129 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'admin' => [
|
||||
'catalog' => [
|
||||
'products' => [
|
||||
'booking' => 'Información sobre Reservas',
|
||||
'booking-type' => 'Tipo de Reserva',
|
||||
'default' => 'Estándar',
|
||||
'appointment-booking' => 'Reserva de Cita',
|
||||
'event-booking' => 'Reserva de Eventos',
|
||||
'rental-booking' => 'Reserva de Alquiler',
|
||||
'table-booking' => 'Reserva de Mesa',
|
||||
'slot-duration' => 'Duración de Horarios (Minutos)',
|
||||
'break-time' => 'Intervalo de Tiempo entre Franjas Horarias (Minutos)',
|
||||
'available-every-week' => 'Disponible Todas las Semanas',
|
||||
'yes' => 'Si',
|
||||
'no' => 'No',
|
||||
'available-from' => 'Disponible Desde:',
|
||||
'available-to' => 'Disponible Hasta',
|
||||
'same-slot-all-days' => 'Mismos Horarios Todos los Días',
|
||||
'slot-has-quantity' => 'El Horario Tiene Cantidad',
|
||||
'slots' => 'Horarios',
|
||||
'from' => 'Desde',
|
||||
'to' => 'A',
|
||||
'qty' => 'Cant',
|
||||
'add-slot' => 'Agregar Horario',
|
||||
'sunday' => 'Domingo',
|
||||
'monday' => 'Lunes',
|
||||
'tuesday' => 'Martes',
|
||||
'wednesday' => 'Miércoles',
|
||||
'thursday' => 'Jueves',
|
||||
'friday' => 'Viernes',
|
||||
'saturday' => 'Sábado',
|
||||
'renting-type' => 'Tipo de Alquiler',
|
||||
'daily' => 'Diariamente',
|
||||
'hourly' => 'Por Hora',
|
||||
'daily-hourly' => 'Ambos (Diariamente y Por Hora)',
|
||||
'daily-price' => 'Precio Diario',
|
||||
'hourly-price' => 'Precio por Hora',
|
||||
'location' => 'Ubicación',
|
||||
'show-location' => 'Mostrar Ubicación',
|
||||
'event-start-date' => 'Fecha de Inicio del Evento',
|
||||
'event-end-date' => 'Fecha de Finalización del Evento',
|
||||
'tickets' => 'Tickets',
|
||||
'add-ticket' => 'Agregar Ticket',
|
||||
'name' => 'Nombre',
|
||||
'price' => 'Precio',
|
||||
'quantity' => 'Cantidad',
|
||||
'description' => 'Descripción',
|
||||
'special-price' => 'Precio Especial',
|
||||
'special-price-from' => 'Válida Desde',
|
||||
'special-price-to' => 'Válida Hasta',
|
||||
'charged-per' => 'Cargado Por',
|
||||
'guest' => 'Invitado',
|
||||
'table' => 'Mesa',
|
||||
'prevent-scheduling-before' => 'Prevenir Agendamientos Antes',
|
||||
'guest-limit' => 'Límites de Invitados por Mesa',
|
||||
'guest-capacity' => 'Capacidad de Invitados',
|
||||
'type' => 'Tipo',
|
||||
'many-bookings-for-one-day' => 'Muchas Reservas para un Día',
|
||||
'one-booking-for-many-days' => 'Una Reserva para Muchos Días',
|
||||
'day' => 'Día',
|
||||
'status' => 'Estado',
|
||||
'open' => 'Abierto',
|
||||
'close' => 'Cerrado',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
'shop' => [
|
||||
'products' => [
|
||||
'location' => 'Ubicación',
|
||||
'contact' => 'Contacto',
|
||||
'email' => 'Correo Electrónico',
|
||||
'slot-duration' => 'Duración de Horario',
|
||||
'slot-duration-in-minutes' => ':minutes Minutos',
|
||||
'today-availability' => 'Disponibilidad Hoy',
|
||||
'slots-for-all-days' => 'Mostrar todos los días',
|
||||
'sunday' => 'Domingo',
|
||||
'monday' => 'Lunes',
|
||||
'tuesday' => 'Martes',
|
||||
'wednesday' => 'Miércoles',
|
||||
'thursday' => 'Jueves',
|
||||
'friday' => 'Viernes',
|
||||
'saturday' => 'Sábado',
|
||||
'closed' => 'Cerrado',
|
||||
'book-an-appointment' => 'Reservar una Cita',
|
||||
'date' => 'Fecha',
|
||||
'slot' => 'Horario',
|
||||
'rent-an-item' => 'Alquilar un Artículo',
|
||||
'choose-rent-option' => 'Elija la Opción de Alquiler',
|
||||
'daily-basis' => 'Diariamente',
|
||||
'hourly-basis' => 'Por día',
|
||||
'select-time-slot'=> 'Seleccionar Franja Horaria',
|
||||
'select-slot' => 'Seleccionar Horario',
|
||||
'select-date' => 'Seleccionar Fecha',
|
||||
'select-rent-time' => 'Seleccionar el Tiempo de Alquiler',
|
||||
'from' => 'Desde',
|
||||
'to' => 'A',
|
||||
'book-a-table' => 'Reserva una Mesa',
|
||||
'special-notes' => 'Pedido/Notas Especiales',
|
||||
'event-on' => 'Evento Activado',
|
||||
'book-your-ticket' => 'Reserve su Ticket',
|
||||
'per-ticket-price' => ':price Por Ticket',
|
||||
'number-of-tickets' => 'Numero de Tickets',
|
||||
'total-tickets' => 'Total Tickets',
|
||||
'base-price' => 'Precio Base',
|
||||
'total-price' => 'Precio Total',
|
||||
'base-price-info' => '(Esto se aplicará a cada tipo de ticket por cada cantidad)'
|
||||
],
|
||||
|
||||
'cart' => [
|
||||
'renting_type' => 'Tipo de Alquiler',
|
||||
'daily' => 'Diario',
|
||||
'hourly' => 'Por Hora',
|
||||
'event-ticket' => 'Ticket de Evento',
|
||||
'event-from' => 'Evento Desde:',
|
||||
'event-till' => 'Evento Hasta',
|
||||
'rent-type' => 'Tipo de Alquiler',
|
||||
'rent-from' => 'Alquilar Desde',
|
||||
'rent-till' => 'Alquilar Hasta',
|
||||
'booking-from' => 'Reserva Desde',
|
||||
'booking-till' => 'Reserva Hasta',
|
||||
'special-note' => 'Pedido/Notas Especiales',
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -63,7 +63,8 @@ return [
|
|||
'day' => 'روز',
|
||||
'status' => 'وضعیت',
|
||||
'open' => 'باز کن',
|
||||
'close' => 'بستن'
|
||||
'close' => 'بستن',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ return [
|
|||
'day' => 'Giorno',
|
||||
'status' => 'Stato',
|
||||
'open' => 'Aperto',
|
||||
'close' => 'Chiuso'
|
||||
'close' => 'Chiuso',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ return [
|
|||
'day' => 'Dag',
|
||||
'status' => 'Toestand',
|
||||
'open' => 'Open',
|
||||
'close' => 'Dichtbij'
|
||||
'close' => 'Dichtbij',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ return [
|
|||
'day' => 'Dia',
|
||||
'status' => 'Status',
|
||||
'open' => 'Aberto',
|
||||
'close' => 'Fechar'
|
||||
'close' => 'Fechar',
|
||||
'time-error' => 'The to time must be greater than the from time.'
|
||||
]
|
||||
]
|
||||
],
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
|
||||
<div class="slot-list table" v-else>
|
||||
<accordian
|
||||
<accordian
|
||||
v-for="(day, dayIndex) in week_days"
|
||||
:key="dayIndex"
|
||||
:title="day"
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody v-if="slots['different_for_week'][dayIndex] && slots['different_for_week'][dayIndex].length">
|
||||
<slot-item
|
||||
v-for="(slot, slotIndex) in slots['different_for_week'][dayIndex]"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<td>
|
||||
<div class="control-group date" :class="[errors.has(controlName + '[to]') ? 'has-error' : '']">
|
||||
<time-component>
|
||||
<input type="text" v-validate="'required'" :name="controlName + '[to]'" v-model="slotItem.to" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.to') }}"">
|
||||
<input type="text" v-validate="{required: true, time_min: slotItem.from }" :name="controlName + '[to]'" v-model="slotItem.to" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.to') }}"">
|
||||
</time-component>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName + '[to]')">
|
||||
|
|
@ -192,4 +192,20 @@
|
|||
},
|
||||
}
|
||||
});
|
||||
|
||||
const time_validator = {
|
||||
getMessage: (field) => {
|
||||
return "{{ __('bookingproduct::app.admin.catalog.products.time-error') }}"
|
||||
},
|
||||
|
||||
validate: (value, min) => {
|
||||
if (Array.isArray(value) || value === null || value === undefined || value === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return value > min;
|
||||
}
|
||||
};
|
||||
|
||||
VeeValidate.Validator.extend('time_min', time_validator);
|
||||
</script>
|
||||
|
|
@ -81,13 +81,13 @@ class CategoryController extends Controller
|
|||
public function store()
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug],
|
||||
'slug' => ['required', 'unique:category_translations,slug'],
|
||||
'name' => 'required',
|
||||
'image.*' => 'mimes:bmp,jpeg,jpg,png,webp',
|
||||
'description' => 'required_if:display_mode,==,description_only,products_and_description',
|
||||
]);
|
||||
|
||||
$category = $this->categoryRepository->create(request()->all());
|
||||
$this->categoryRepository->create(request()->all());
|
||||
|
||||
session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Category']));
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ class CategoryController extends Controller
|
|||
$locale = request()->get('locale') ?: app()->getLocale();
|
||||
|
||||
$this->validate(request(), [
|
||||
$locale . '.slug' => ['required', new \Webkul\Core\Contracts\Validations\Slug, function ($attribute, $value, $fail) use ($id) {
|
||||
$locale . '.slug' => ['required', function ($attribute, $value, $fail) use ($id) {
|
||||
if (! $this->categoryRepository->isSlugUnique($id, $value)) {
|
||||
$fail(trans('admin::app.response.already-taken', ['name' => 'Category']));
|
||||
}
|
||||
|
|
@ -152,15 +152,11 @@ class CategoryController extends Controller
|
|||
session()->flash('warning', trans('admin::app.response.delete-category-root', ['name' => 'Category']));
|
||||
} else {
|
||||
try {
|
||||
Event::dispatch('catalog.category.delete.before', $id);
|
||||
|
||||
if ($category->products->count() > 0) {
|
||||
$category->products()->delete();
|
||||
}
|
||||
Event::dispatch('catalog.category.delete.before', $category);
|
||||
|
||||
$category->delete();
|
||||
|
||||
Event::dispatch('catalog.category.delete.after', $id);
|
||||
Event::dispatch('catalog.category.delete.after', $category);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Category']));
|
||||
|
||||
|
|
@ -195,10 +191,6 @@ class CategoryController extends Controller
|
|||
$suppressFlash = true;
|
||||
Event::dispatch('catalog.category.delete.before', $categoryId);
|
||||
|
||||
if ($category->products->count() > 0) {
|
||||
$category->products()->delete();
|
||||
}
|
||||
|
||||
$category->delete();
|
||||
|
||||
Event::dispatch('catalog.category.delete.after', $categoryId);
|
||||
|
|
|
|||
|
|
@ -2,19 +2,17 @@
|
|||
|
||||
namespace Webkul\Category\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Category\Models\Category;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Webkul\Category\Models\CategoryTranslationProxy;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class CategoryRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* Specify Model class name
|
||||
* Specify model class name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
@ -24,6 +22,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Create category.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
*/
|
||||
|
|
@ -58,7 +58,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Specify category tree
|
||||
* Specify category tree.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
|
|
@ -66,12 +66,12 @@ class CategoryRepository extends Repository
|
|||
public function getCategoryTree($id = null)
|
||||
{
|
||||
return $id
|
||||
? $this->model::orderBy('position', 'ASC')->where('id', '!=', $id)->get()->toTree()
|
||||
: $this->model::orderBy('position', 'ASC')->get()->toTree();
|
||||
? $this->model::orderBy('position', 'ASC')->where('id', '!=', $id)->get()->toTree()
|
||||
: $this->model::orderBy('position', 'ASC')->get()->toTree();
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify category tree
|
||||
* Specify category tree.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
|
|
@ -84,7 +84,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Get root categories
|
||||
* Get root categories.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
|
|
@ -94,7 +94,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* get visible category tree
|
||||
* get visible category tree.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
|
|
@ -108,19 +108,19 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
return $categories[$id] = $id
|
||||
? $this->model::orderBy('position', 'ASC')->where('status', 1)->descendantsAndSelf($id)->toTree($id)
|
||||
: $this->model::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
|
||||
? $this->model::orderBy('position', 'ASC')->where('status', 1)->descendantsAndSelf($id)->toTree($id)
|
||||
: $this->model::orderBy('position', 'ASC')->where('status', 1)->get()->toTree();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks slug is unique or not based on locale
|
||||
* Checks slug is unique or not based on locale.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $slug
|
||||
* @return bool
|
||||
*/
|
||||
public function isSlugUnique($id, $slug)
|
||||
{
|
||||
{
|
||||
$exists = CategoryTranslationProxy::modelClass()::where('category_id', '<>', $id)
|
||||
->where('slug', $slug)
|
||||
->limit(1)
|
||||
|
|
@ -131,7 +131,7 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrive category from slug
|
||||
* Retrive category from slug.
|
||||
*
|
||||
* @param string $slug
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
|
|
@ -150,6 +150,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Find by path.
|
||||
*
|
||||
* @param string $urlPath
|
||||
* @return \Webkul\Category\Contracts\Category
|
||||
*/
|
||||
|
|
@ -159,6 +161,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Update category.
|
||||
*
|
||||
* @param array $data
|
||||
* @param int $id
|
||||
* @param string $attribute
|
||||
|
|
@ -170,6 +174,8 @@ class CategoryRepository extends Repository
|
|||
|
||||
Event::dispatch('catalog.category.update.before', $id);
|
||||
|
||||
$data = $this->setSameAttributeValueToAllLocale($data, 'slug');
|
||||
|
||||
$category->update($data);
|
||||
|
||||
$this->uploadImages($data, $category);
|
||||
|
|
@ -184,6 +190,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete category.
|
||||
*
|
||||
* @param int $id
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -197,8 +205,11 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Upload category's images.
|
||||
*
|
||||
* @param array $data
|
||||
* @param \Webkul\Category\Contracts\Category $category
|
||||
* @param string $type
|
||||
* @return void
|
||||
*/
|
||||
public function uploadImages($data, $category, $type = "image")
|
||||
|
|
@ -230,6 +241,8 @@ class CategoryRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Get partials.
|
||||
*
|
||||
* @param array|null $columns
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -251,4 +264,33 @@ class CategoryRepository extends Repository
|
|||
|
||||
return $trimmed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set same value to all locales in category.
|
||||
*
|
||||
* To Do: Move column from the `category_translations` to `category` table. And remove
|
||||
* this created method.
|
||||
*
|
||||
* @param array $data
|
||||
* @param string $attributeNames
|
||||
* @return array
|
||||
*/
|
||||
private function setSameAttributeValueToAllLocale(array $data, ...$attributeNames)
|
||||
{
|
||||
$requestedLocale = request()->get('locale') ?: app()->getLocale();
|
||||
|
||||
$model = app()->make($this->model());
|
||||
|
||||
foreach ($attributeNames as $attributeName) {
|
||||
foreach (core()->getAllLocales() as $locale) {
|
||||
foreach ($model->translatedAttributes as $attribute) {
|
||||
if ($attribute === $attributeName) {
|
||||
$data[$locale->code][$attribute] = $data[$requestedLocale][$attribute];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
@ -320,23 +320,27 @@ class Cart
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->cartItemRepository->delete($itemId);
|
||||
if ($cartItem = $cart->items()->find($itemId)) {
|
||||
$cartItem->delete();
|
||||
|
||||
if ($cart->items()->get()->count() == 0) {
|
||||
$this->cartRepository->delete($cart->id);
|
||||
if ($cart->items()->get()->count() == 0) {
|
||||
$this->cartRepository->delete($cart->id);
|
||||
|
||||
if (session()->has('cart')) {
|
||||
session()->forget('cart');
|
||||
if (session()->has('cart')) {
|
||||
session()->forget('cart');
|
||||
}
|
||||
}
|
||||
|
||||
Shipping::collectRates();
|
||||
|
||||
Event::dispatch('checkout.cart.delete.after', $itemId);
|
||||
|
||||
$this->collectTotals();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Shipping::collectRates();
|
||||
|
||||
Event::dispatch('checkout.cart.delete.after', $itemId);
|
||||
|
||||
$this->collectTotals();
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1176,6 +1180,8 @@ class Cart
|
|||
array $shippingAddress
|
||||
): void
|
||||
{
|
||||
$shippingAddress['cart_id'] = $billingAddress['cart_id'] = NULL;
|
||||
|
||||
if (isset($data['billing']['save_as_address']) && $data['billing']['save_as_address']) {
|
||||
$this->customerAddressRepository->create($billingAddress);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class Install extends Command
|
|||
$input_admin_url = $this->ask('Please Enter the Admin URL : ');
|
||||
$this->envUpdate('APP_ADMIN_URL=', $input_admin_url ?: $default_admin_url);
|
||||
|
||||
$locale = $this->choice('Please select the default locale or press enter to continue', ['ar', 'en', 'fa', 'nl', 'pt_BR'], 1);
|
||||
$locale = $this->choice('Please select the default locale or press enter to continue', ['ar', 'en', 'es', 'fa', 'nl', 'pt_BR'], 1);
|
||||
$this->envUpdate('APP_LOCALE=', $locale);
|
||||
|
||||
$TimeZones = timezone_identifiers_list();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -3974,5 +3974,131 @@
|
|||
"code":"WB",
|
||||
"default_name":"West Bengal",
|
||||
"country_id":106
|
||||
},
|
||||
{
|
||||
"id":569,
|
||||
"country_code":"PY",
|
||||
"code":"PY-16",
|
||||
"default_name":"Alto Paraguay",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":570,
|
||||
"country_code":"PY",
|
||||
"code":"PY-10",
|
||||
"default_name":"Alto Paran\u00e1",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":571,
|
||||
"country_code":"PY",
|
||||
"code":"PY-13",
|
||||
"default_name":"Amambay",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":572,
|
||||
"country_code":"PY",
|
||||
"code":"PY-ASU",
|
||||
"default_name":"Asunci\u00f3n",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":573,
|
||||
"country_code":"PY",
|
||||
"code":"PY-19",
|
||||
"default_name":"Boquer\u00f3n",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":574,
|
||||
"country_code":"PY",
|
||||
"code":"PY-5",
|
||||
"default_name":"Caaguaz\u00fa",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":575,
|
||||
"country_code":"PY",
|
||||
"code":"PY-6",
|
||||
"default_name":"Caazap\u00e1",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":576,
|
||||
"country_code":"PY",
|
||||
"code":"PY-14",
|
||||
"default_name":"Canindey\u00fa",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":577,
|
||||
"country_code":"PY",
|
||||
"code":"PY-11",
|
||||
"default_name":"Central",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":578,
|
||||
"country_code":"PY",
|
||||
"code":"PY-1",
|
||||
"default_name":"Concepci\u00f3n",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":579,
|
||||
"country_code":"PY",
|
||||
"code":"PY-3",
|
||||
"default_name":"Cordillera",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":580,
|
||||
"country_code":"PY",
|
||||
"code":"PY-4",
|
||||
"default_name":"Guair\u00e1",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":581,
|
||||
"country_code":"PY",
|
||||
"code":"PY-7",
|
||||
"default_name":"Itap\u00faa",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":582,
|
||||
"country_code":"PY",
|
||||
"code":"PY-8",
|
||||
"default_name":"Misiones",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":583,
|
||||
"country_code":"PY",
|
||||
"code":"PY-9",
|
||||
"default_name":"Paraguar\u00ed",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":584,
|
||||
"country_code":"PY",
|
||||
"code":"PY-15",
|
||||
"default_name":"Presidente Hayes",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":585,
|
||||
"country_code":"PY",
|
||||
"code":"PY-2",
|
||||
"default_name":"San Pedro",
|
||||
"country_id":176
|
||||
},
|
||||
{
|
||||
"id":586,
|
||||
"country_code":"PY",
|
||||
"code":"PY-12",
|
||||
"default_name":"\u00d1eembuc\u00fa",
|
||||
"country_id":176
|
||||
}
|
||||
]
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Webkul\Sales\Models\Invoice;
|
||||
use Webkul\Sales\Models\Shipment;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Sales\Models\OrderAddress;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Webkul\Checkout\Models\CartAddress;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Webkul\Checkout\Models\CartShippingRate;
|
||||
use Webkul\Sales\Models\Invoice;
|
||||
use Webkul\Sales\Models\OrderAddress;
|
||||
use Webkul\Sales\Models\Shipment;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTableAddresses extends Migration
|
||||
{
|
||||
|
|
@ -20,9 +20,6 @@ class AddTableAddresses extends Migration
|
|||
public function up()
|
||||
{
|
||||
try {
|
||||
// transaction is important to prevent loosing data on failure
|
||||
DB::beginTransaction();
|
||||
|
||||
Schema::create('addresses', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('address_type');
|
||||
|
|
@ -70,10 +67,7 @@ class AddTableAddresses extends Migration
|
|||
Schema::drop('order_address');
|
||||
|
||||
Schema::enableForeignKeyConstraints();
|
||||
|
||||
DB::commit();
|
||||
} catch (Exception $e) {
|
||||
DB::rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
|
@ -85,7 +79,7 @@ class AddTableAddresses extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
throw new Exception('you cannot revert this migration: data would be lost');
|
||||
throw new Exception('You cannot revert this migration. Data would be lost.');
|
||||
}
|
||||
|
||||
private function migrateCustomerAddresses(): void
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddExpiredAtAndSortOrderColumnInSlidersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->date('expired_at')->nullable();
|
||||
$table->integer('sort_order')->unsigned()->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->date('expired_at')->nullable();
|
||||
$table->integer('sort_order')->unsigned()->default(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -182,6 +182,46 @@ class ChannelTableSeeder extends Seeder
|
|||
</div>
|
||||
',
|
||||
'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}',
|
||||
], [
|
||||
'id' => 5,
|
||||
'channel_id' => 1,
|
||||
'locale' => 'es',
|
||||
'name' => 'Default',
|
||||
'home_page_content' => '
|
||||
<p>@include("shop::home.slider") @include("shop::home.featured-products") @include("shop::home.new-products")</p>
|
||||
<div class="banner-container">
|
||||
<div class="left-banner">
|
||||
<img src='.asset("/themes/default/assets/images/1.webp").' data-src='.asset("/themes/default/assets/images/1.webp").' class="lazyload" alt="test" width="720" height="720" />
|
||||
</div>
|
||||
<div class="right-banner">
|
||||
<img src='. asset("/themes/default/assets/images/2.webp").' data-src='. asset("/themes/default/assets/images/2.webp").' class="lazyload" alt="test" width="460" height="330" />
|
||||
<img src='.asset("/themes/default/assets/images/3.webp").' data-src='.asset("/themes/default/assets/images/3.webp").' class="lazyload" alt="test" width="460" height="330" />
|
||||
</div>
|
||||
</div>
|
||||
',
|
||||
'footer_content' => '
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Quick Links</span>
|
||||
<ul class="list-group">
|
||||
<li><a href="@php echo route(\'shop.cms.page\', \'about-us\') @endphp">About Us</a></li>
|
||||
<li><a href="@php echo route(\'shop.cms.page\', \'return-policy\') @endphp">Return Policy</a></li>
|
||||
<li><a href="@php echo route(\'shop.cms.page\', \'refund-policy\') @endphp">Refund Policy</a></li>
|
||||
<li><a href="@php echo route(\'shop.cms.page\', \'terms-conditions\') @endphp">Terms and conditions</a></li>
|
||||
<li><a href="@php echo route(\'shop.cms.page\', \'terms-of-use\') @endphp">Terms of Use</a></li><li><a href="@php echo route(\'shop.cms.page\', \'contact-us\') @endphp">Contact Us</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Connect With Us</span>
|
||||
<ul class="list-group">
|
||||
<li><a href="#"><span class="icon icon-facebook"></span>Facebook </a></li>
|
||||
<li><a href="#"><span class="icon icon-twitter"></span> Twitter </a></li>
|
||||
<li><a href="#"><span class="icon icon-instagram"></span> Instagram </a></li>
|
||||
<li><a href="#"> <span class="icon icon-google-plus"></span>Google+ </a></li>
|
||||
<li><a href="#"> <span class="icon icon-linkedin"></span>LinkedIn </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
',
|
||||
'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}',
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class CountryStateTranslationSeeder extends Seeder
|
|||
public function run()
|
||||
{
|
||||
|
||||
foreach (['ar', 'fa', 'pt_BR'] as $code) {
|
||||
foreach (['ar', 'es', 'fa', 'pt_BR'] as $code) {
|
||||
DB::table('country_translations')->where('locale', $code)->delete();
|
||||
|
||||
DB::table('country_state_translations')->where('locale', $code)->delete();
|
||||
|
|
@ -30,4 +30,4 @@ class CountryStateTranslationSeeder extends Seeder
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ class LocalesTableSeeder extends Seeder
|
|||
'id' => 4,
|
||||
'code' => 'tr',
|
||||
'name' => 'Türkçe',
|
||||
], [
|
||||
'id' => 5,
|
||||
'code' => 'es',
|
||||
'name' => 'Español',
|
||||
]]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,10 +72,18 @@ class SliderController extends Controller
|
|||
$this->validate(request(), [
|
||||
'title' => 'string|required',
|
||||
'channel_id' => 'required',
|
||||
'expired_at' => 'nullable|date',
|
||||
'image.*' => 'required|mimes:bmp,jpeg,jpg,png,webp',
|
||||
]);
|
||||
|
||||
$result = $this->sliderRepository->save(request()->all());
|
||||
$data = request()->all();
|
||||
$data['expired_at'] = $data['expired_at'] ?: null;
|
||||
|
||||
if (isset($data['locale'])) {
|
||||
$data['locale'] = implode(',', $data['locale']);
|
||||
}
|
||||
|
||||
$result = $this->sliderRepository->save($data);
|
||||
|
||||
if ($result) {
|
||||
session()->flash('success', trans('admin::app.settings.sliders.created-success'));
|
||||
|
|
@ -109,16 +117,24 @@ class SliderController extends Controller
|
|||
$this->validate(request(), [
|
||||
'title' => 'string|required',
|
||||
'channel_id' => 'required',
|
||||
'expired_at' => 'nullable|date',
|
||||
'image.*' => 'sometimes|mimes:bmp,jpeg,jpg,png,webp',
|
||||
]);
|
||||
|
||||
$data = request()->all();
|
||||
$data['expired_at'] = $data['expired_at'] ?: null;
|
||||
|
||||
if (isset($data['locale'])) {
|
||||
$data['locale'] = implode(',', $data['locale']);
|
||||
}
|
||||
|
||||
if ( is_null(request()->image)) {
|
||||
session()->flash('error', trans('admin::app.settings.sliders.update-fail'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$result = $this->sliderRepository->updateItem(request()->all(), $id);
|
||||
$result = $this->sliderRepository->updateItem($data, $id);
|
||||
|
||||
if ($result) {
|
||||
session()->flash('success', trans('admin::app.settings.sliders.update-success'));
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class CheckForMaintenanceMode extends Original
|
|||
* @var \Webkul\Core\Models\Channel
|
||||
*/
|
||||
protected $channel;
|
||||
|
||||
|
||||
/**
|
||||
* Exclude route names.
|
||||
*/
|
||||
|
|
@ -35,7 +35,7 @@ class CheckForMaintenanceMode extends Original
|
|||
protected $except = [];
|
||||
|
||||
/**
|
||||
* Exclude ips.
|
||||
* Exclude IPs.
|
||||
*/
|
||||
protected $excludedIPs = [];
|
||||
|
||||
|
|
@ -49,14 +49,11 @@ class CheckForMaintenanceMode extends Original
|
|||
/* application */
|
||||
$this->app = $app;
|
||||
|
||||
/* current channel */
|
||||
$this->channel = core()->getCurrentChannel();
|
||||
|
||||
/* adding exception for admin routes */
|
||||
$this->except[] = env('APP_ADMIN_URL', 'admin') . '*';
|
||||
|
||||
/* adding exception for ips */
|
||||
$this->excludedIPs = array_map('trim', explode(',', $this->channel->allowed_ips));
|
||||
/* exclude ips */
|
||||
$this->setAllowedIps();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -106,7 +103,7 @@ class CheckForMaintenanceMode extends Original
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->shouldPassThrough($request))
|
||||
if ($this->shouldPassThrough($request))
|
||||
{
|
||||
return $response;
|
||||
}
|
||||
|
|
@ -116,4 +113,18 @@ class CheckForMaintenanceMode extends Original
|
|||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set allowed IPs.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setAllowedIps()
|
||||
{
|
||||
$this->channel = core()->getCurrentChannel();
|
||||
|
||||
if ($this->channel) {
|
||||
$this->excludedIPs = array_map('trim', explode(',', $this->channel->allowed_ips));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +20,9 @@ class Slider extends Model implements SliderContract
|
|||
'path',
|
||||
'content',
|
||||
'channel_id',
|
||||
'locale'
|
||||
'locale',
|
||||
'expired_at',
|
||||
'sort_order'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'path-hint' => [
|
||||
'template' => 'Plantilla',
|
||||
'parents' => 'Padres'
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'slug' => 'O :attribute debe tener un slug válido.',
|
||||
'code' => 'O :attribute debe ser válido.',
|
||||
'decimal' => 'O :attribute debe ser válido.'
|
||||
];
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Traits;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use enshrined\svgSanitize\Sanitizer as MainSanitizer;
|
||||
|
||||
trait Sanitizer
|
||||
{
|
||||
/**
|
||||
* List of mime types which needs to check.
|
||||
*/
|
||||
public $mimeTypes = [
|
||||
'image/svg',
|
||||
'image/svg+xml'
|
||||
];
|
||||
|
||||
/**
|
||||
* Sanitize SVG file.
|
||||
*
|
||||
* @param string $path
|
||||
* @return void
|
||||
*/
|
||||
public function sanitizeSVG($path, $mimeType)
|
||||
{
|
||||
if ($this->checkMimeType($mimeType)) {
|
||||
/* sanitizer instance */
|
||||
$sanitizer = new MainSanitizer();
|
||||
|
||||
/* grab svg file */
|
||||
$dirtySVG = Storage::get($path);
|
||||
|
||||
/* save sanitized svg */
|
||||
Storage::put($path, $sanitizer->sanitize($dirtySVG));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize SVG file.
|
||||
*
|
||||
* @param string $path
|
||||
* @return void
|
||||
*/
|
||||
public function checkMimeType($mimeType)
|
||||
{
|
||||
return in_array($mimeType, $this->mimeTypes);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
namespace Webkul\Customer\Http\Controllers;
|
||||
|
||||
use Cart;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
use Webkul\Customer\Repositories\WishlistRepository;
|
||||
use Cart;
|
||||
|
||||
class WishlistController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains route related configuration
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -57,7 +57,7 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$wishlistItems = $this->wishlistRepository->getCustomerWhishlist();
|
||||
$wishlistItems = $this->wishlistRepository->getCustomerWishlist();
|
||||
|
||||
if (! core()->getConfigData('general.content.shop.wishlist_option')) {
|
||||
abort(404);
|
||||
|
|
@ -91,7 +91,7 @@ class WishlistController extends Controller
|
|||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
|
||||
//accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
|
||||
// accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
|
||||
if ($product->parent_id != null) {
|
||||
$product = $this->productRepository->findOneByField('id', $product->parent_id);
|
||||
$data['product_id'] = $product->id;
|
||||
|
|
@ -152,9 +152,9 @@ class WishlistController extends Controller
|
|||
public function move($itemId)
|
||||
{
|
||||
$wishlistItem = $this->wishlistRepository->findOneWhere([
|
||||
'id' => $itemId,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
'id' => $itemId,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
|
||||
if (! $wishlistItem) {
|
||||
abort(404);
|
||||
|
|
@ -182,7 +182,7 @@ class WishlistController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Function to remove all of the items items in the customer's wishlist
|
||||
* Function to remove all of the items items in the customer's wishlist.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,17 +7,18 @@ use Webkul\Core\Eloquent\Repository;
|
|||
class WishlistRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* Specify Model class name
|
||||
* Specify model class name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
function model()
|
||||
{
|
||||
return 'Webkul\Customer\Contracts\Wishlist';
|
||||
}
|
||||
|
||||
/**
|
||||
* Create wishlist.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Webkul\Customer\Contracts\Wishlist
|
||||
*/
|
||||
|
|
@ -29,6 +30,8 @@ class WishlistRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Update wishlist.
|
||||
*
|
||||
* @param array $data
|
||||
* @param int $id
|
||||
* @param string $attribute
|
||||
|
|
@ -55,25 +58,28 @@ class WishlistRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* get customer wishlist Items.
|
||||
* Get customer wishlist items.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getCustomerWhishlist()
|
||||
public function getCustomerWishlist()
|
||||
{
|
||||
$query = $this->model;
|
||||
/* due to ambigious ids only selecting from wishlist table */
|
||||
$query = $this->model->select('wishlist.*');
|
||||
|
||||
/* don't add product repository method as that one will need a product flat table */
|
||||
if (! core()->getConfigData('catalog.products.homepage.out_of_stock_items')) {
|
||||
$query = $this->model
|
||||
->leftJoin('products as ps', 'wishlist.product_id', '=', 'ps.id')
|
||||
->leftJoin('product_inventories as pv', 'ps.id', '=', 'pv.product_id')
|
||||
->where(function ($qb) {
|
||||
$qb
|
||||
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
|
||||
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty' , '>' , 0);
|
||||
});
|
||||
$query = $query
|
||||
->leftJoin('products as ps', 'wishlist.product_id', '=', 'ps.id')
|
||||
->leftJoin('product_inventories as pv', 'ps.id', '=', 'pv.product_id')
|
||||
->where(function ($qb) {
|
||||
$qb
|
||||
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
|
||||
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty' , '>' , 0);
|
||||
});
|
||||
}
|
||||
|
||||
/* main check to determine the wishlist */
|
||||
return $query->where([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'wishlist' => [
|
||||
'success' => 'Artículo agregado exitosamente a la lista de deseos',
|
||||
'failure' => 'El artículo no se puede agregar a la lista de deseos',
|
||||
'already' => 'El artículo ya está en tu lista de deseos',
|
||||
'removed' => 'Artículo eliminado correctamente de la lista de deseos',
|
||||
'remove-fail' => 'El artículo no se puede eliminar de la lista de deseos',
|
||||
'empty' => 'No tienes artículos en la lista de deseos',
|
||||
'select-options' => 'Necesita seleccionar opciones antes de agregar a la lista de deseos',
|
||||
'remove-all-success' => 'Se han eliminado todos los elementos de su lista de deseos',
|
||||
],
|
||||
'reviews' => [
|
||||
'empty' => 'Aún no has calificado ningún producto'
|
||||
],
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Hemos enviado un correo electrónico con el enlace para restablecer la contraseña.',
|
||||
'email_not_exist' => "No podemos encontrar un usuario con esa dirección de correo electrónico"
|
||||
]
|
||||
];
|
||||
|
|
@ -2,34 +2,42 @@
|
|||
|
||||
namespace Webkul\Paypal\Helpers;
|
||||
|
||||
use Webkul\Paypal\Payment\Standard;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Webkul\Sales\Repositories\InvoiceRepository;
|
||||
|
||||
class Ipn
|
||||
{
|
||||
/**
|
||||
* Ipn post data
|
||||
* IPN post data.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $post;
|
||||
|
||||
/**
|
||||
* Order object
|
||||
* Standard $paypalStandard
|
||||
*
|
||||
* @var \Webkul\Paypal\Payment\Standard
|
||||
*/
|
||||
protected $paypalStandard;
|
||||
|
||||
/**
|
||||
* Order $order
|
||||
*
|
||||
* @var \Webkul\Sales\Contracts\Order
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* OrderRepository object
|
||||
* OrderRepository $orderRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderRepository
|
||||
*/
|
||||
protected $orderRepository;
|
||||
|
||||
/**
|
||||
* InvoiceRepository object
|
||||
* InvoiceRepository $invoiceRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\InvoiceRepository
|
||||
*/
|
||||
|
|
@ -40,20 +48,24 @@ class Ipn
|
|||
*
|
||||
* @param \Webkul\Sales\Repositories\OrderRepository $orderRepository
|
||||
* @param \Webkul\Sales\Repositories\InvoiceRepository $invoiceRepository
|
||||
* @param \Webkul\Paypal\Payment\Standard $paypalStandard
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
Standard $paypalStandard,
|
||||
OrderRepository $orderRepository,
|
||||
InvoiceRepository $invoiceRepository
|
||||
)
|
||||
{
|
||||
$this->paypalStandard = $paypalStandard;
|
||||
|
||||
$this->orderRepository = $orderRepository;
|
||||
|
||||
$this->invoiceRepository = $invoiceRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function process the ipn sent from paypal end
|
||||
* This function process the IPN sent from paypal end.
|
||||
*
|
||||
* @param array $post
|
||||
* @return null|void|\Exception
|
||||
|
|
@ -80,7 +92,7 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Load order via ipn invoice id
|
||||
* Load order via IPN invoice id.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -92,7 +104,7 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Process order and create invoice
|
||||
* Process order and create invoice.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -112,13 +124,13 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Prepares order's invoice data for creation
|
||||
* Prepares order's invoice data for creation.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function prepareInvoiceData()
|
||||
{
|
||||
$invoiceData = ["order_id" => $this->order->id,];
|
||||
$invoiceData = ['order_id' => $this->order->id];
|
||||
|
||||
foreach ($this->order->items as $item) {
|
||||
$invoiceData['invoice']['items'][$item->id] = $item->qty_to_invoice;
|
||||
|
|
@ -128,24 +140,20 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Post back to PayPal to check whether this request is a valid one
|
||||
* Post back to PayPal to check whether this request is a valid one.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function postBack()
|
||||
{
|
||||
if (array_key_exists('test_ipn', $this->post) && 1 === (int) $this->post['test_ipn']) {
|
||||
$url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
|
||||
} else {
|
||||
$url = 'https://www.paypal.com/cgi-bin/webscr';
|
||||
}
|
||||
$url = $this->paypalStandard->getIPNUrl();
|
||||
|
||||
$request = curl_init();
|
||||
|
||||
curl_setopt_array($request, [
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_POST => TRUE,
|
||||
CURLOPT_POSTFIELDS => http_build_query(array('cmd' => '_notify-validate') + $this->post),
|
||||
CURLOPT_POSTFIELDS => http_build_query(['cmd' => '_notify-validate'] + $this->post),
|
||||
CURLOPT_RETURNTRANSFER => TRUE,
|
||||
CURLOPT_HEADER => FALSE,
|
||||
]);
|
||||
|
|
@ -161,4 +169,4 @@ class Ipn
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class SmartButtonController extends Controller
|
|||
'phone_type' => 'MOBILE',
|
||||
|
||||
'phone_number' => [
|
||||
'national_number' => $cart->billing_address->phone,
|
||||
'national_number' => $this->smartButton->formatPhone($cart->billing_address->phone),
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
@ -127,28 +127,28 @@ class SmartButtonController extends Controller
|
|||
'purchase_units' => [
|
||||
[
|
||||
'amount' => [
|
||||
'value' => (float) $cart->sub_total + $cart->tax_total + ($cart->selected_shipping_rate ? $cart->selected_shipping_rate->price : 0) - $cart->discount_amount,
|
||||
'value' => $this->smartButton->formatCurrencyValue((float) $cart->sub_total + $cart->tax_total + ($cart->selected_shipping_rate ? $cart->selected_shipping_rate->price : 0) - $cart->discount_amount),
|
||||
'currency_code' => $cart->cart_currency_code,
|
||||
|
||||
'breakdown' => [
|
||||
'item_total' => [
|
||||
'currency_code' => $cart->cart_currency_code,
|
||||
'value' => (float) $cart->sub_total,
|
||||
'value' => $this->smartButton->formatCurrencyValue((float) $cart->sub_total),
|
||||
],
|
||||
|
||||
'shipping' => [
|
||||
'currency_code' => $cart->cart_currency_code,
|
||||
'value' => (float) ($cart->selected_shipping_rate ? $cart->selected_shipping_rate->price : 0),
|
||||
'value' => $this->smartButton->formatCurrencyValue((float) ($cart->selected_shipping_rate ? $cart->selected_shipping_rate->price : 0)),
|
||||
],
|
||||
|
||||
'tax_total' => [
|
||||
'currency_code' => $cart->cart_currency_code,
|
||||
'value' => (float) $cart->tax_total,
|
||||
'value' => $this->smartButton->formatCurrencyValue((float) $cart->tax_total),
|
||||
],
|
||||
|
||||
'discount' => [
|
||||
'currency_code' => $cart->cart_currency_code,
|
||||
'value' => (float) $cart->discount_amount,
|
||||
'value' => $this->smartButton->formatCurrencyValue((float) $cart->discount_amount),
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
@ -190,7 +190,7 @@ class SmartButtonController extends Controller
|
|||
$lineItems[] = [
|
||||
'unit_amount' => [
|
||||
'currency_code' => $cart->cart_currency_code,
|
||||
'value' => (float) $item->price,
|
||||
'value' => $this->smartButton->formatCurrencyValue((float) $item->price),
|
||||
],
|
||||
'quantity' => $item->quantity,
|
||||
'name' => $item->name,
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
namespace Webkul\Paypal\Http\Controllers;
|
||||
|
||||
use Webkul\Paypal\Helpers\Ipn;
|
||||
use Webkul\Checkout\Facades\Cart;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Webkul\Paypal\Helpers\Ipn;
|
||||
|
||||
class StandardController extends Controller
|
||||
{
|
||||
/**
|
||||
* OrderRepository object
|
||||
* OrderRepository $orderRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderRepository
|
||||
*/
|
||||
protected $orderRepository;
|
||||
|
||||
/**
|
||||
* Ipn object
|
||||
* IPN $ipnHelper
|
||||
*
|
||||
* @var \Webkul\Paypal\Helpers\Ipn
|
||||
*/
|
||||
|
|
@ -62,7 +62,7 @@ class StandardController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Success payment
|
||||
* Success payment.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
@ -78,7 +78,7 @@ class StandardController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Paypal Ipn listener
|
||||
* Paypal IPN listener.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ Route::group(['middleware' => ['web']], function () {
|
|||
});
|
||||
});
|
||||
|
||||
Route::get('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn');
|
||||
Route::post('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Paypal\Listeners;
|
||||
|
||||
use Webkul\Paypal\Payment\SmartButton;
|
||||
use Webkul\Sales\Repositories\OrderTransactionRepository;
|
||||
|
||||
class Transaction
|
||||
{
|
||||
/**
|
||||
* SmartButton $smartButton
|
||||
*
|
||||
* @var \Webkul\Paypal\Payment\SmartButton
|
||||
*/
|
||||
protected $smartButton;
|
||||
|
||||
/**
|
||||
* OrderTransactionRepository object
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderTransactionRepository
|
||||
*/
|
||||
protected $orderTransactionRepository;
|
||||
|
||||
/**
|
||||
* Create a new listener instance.
|
||||
*
|
||||
* @param \Webkul\Paypal\Payment\SmartButton $smartButton
|
||||
* @param \Webkul\Sales\Repositories\OrderTransactionRepository $orderTransactionRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
SmartButton $smartButton,
|
||||
OrderTransactionRepository $orderTransactionRepository
|
||||
)
|
||||
{
|
||||
$this->smartButton = $smartButton;
|
||||
|
||||
$this->orderTransactionRepository = $orderTransactionRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the transaction data for online payment.
|
||||
* @param \Webkul\Sales\Models\Invoice $invoice
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function saveTransaction($invoice) {
|
||||
$data = request()->all();
|
||||
|
||||
if ($invoice->order->payment->method == 'paypal_smart_button') {
|
||||
if (isset($data['orderData']) && isset($data['orderData']['orderID'])) {
|
||||
$smartButtonOrderId = $data['orderData']['orderID'];
|
||||
$transactionDetails = $this->smartButton->getOrder($smartButtonOrderId);
|
||||
$transactionDetails = json_decode(json_encode($transactionDetails), true);
|
||||
|
||||
if ($transactionDetails['statusCode'] == 200) {
|
||||
$transactionData['transaction_id'] = $transactionDetails['result']['id'];
|
||||
$transactionData['status'] = $transactionDetails['result']['status'];
|
||||
$transactionData['type'] = $transactionDetails['result']['intent'];
|
||||
$transactionData['payment_method'] = $invoice->order->payment->method;
|
||||
$transactionData['order_id'] = $invoice->order->id;
|
||||
$transactionData['invoice_id'] = $invoice->id;
|
||||
$transactionData['data'] = json_encode (
|
||||
array_merge($transactionDetails['result']['purchase_units'],
|
||||
$transactionDetails['result']['payer'])
|
||||
);
|
||||
|
||||
$this->orderTransactionRepository->create($transactionData);
|
||||
}
|
||||
}
|
||||
} else if ($invoice->order->payment->method == 'paypal_standard') {
|
||||
$transactionData['transaction_id'] = $data['txn_id'];
|
||||
$transactionData['status'] = $data['payment_status'];
|
||||
$transactionData['type'] = $data['payment_type'];
|
||||
$transactionData['payment_method'] = $invoice->order->payment->method;
|
||||
$transactionData['order_id'] = $invoice->order->id;
|
||||
$transactionData['invoice_id'] = $invoice->id;
|
||||
$transactionData['data'] = json_encode ($data);
|
||||
|
||||
$this->orderTransactionRepository->create($transactionData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -75,4 +75,29 @@ abstract class Paypal extends Payment
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a currency value according to paypal's api constraints
|
||||
*
|
||||
* @param float|int $long
|
||||
* @return float
|
||||
*/
|
||||
public function formatCurrencyValue($number): float
|
||||
{
|
||||
return round((float) $number, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format phone field according to paypal's api constraints
|
||||
*
|
||||
* Strips non-numbers characters like '+' or ' ' in
|
||||
* inputs like "+54 11 3323 2323"
|
||||
*
|
||||
* @param mixed $phone
|
||||
* @return string
|
||||
*/
|
||||
public function formatPhone($phone): string
|
||||
{
|
||||
return preg_replace('/[^0-9]/', '', (string) $phone);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,13 @@ class SmartButton extends Paypal
|
|||
*/
|
||||
protected $code = 'paypal_smart_button';
|
||||
|
||||
/**
|
||||
* Paypal partner attribution id.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $paypalPartnerAttributionId = 'Bagisto_Cart';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
|
|
@ -63,6 +70,7 @@ class SmartButton extends Paypal
|
|||
public function createOrder($body)
|
||||
{
|
||||
$request = new OrdersCreateRequest;
|
||||
$request->headers['PayPal-Partner-Attribution-Id'] = $this->paypalPartnerAttributionId;
|
||||
$request->prefer('return=representation');
|
||||
$request->body = $body;
|
||||
return $this->client()->execute($request);
|
||||
|
|
@ -77,6 +85,7 @@ class SmartButton extends Paypal
|
|||
public function captureOrder($orderId)
|
||||
{
|
||||
$request = new OrdersCaptureRequest($orderId);
|
||||
$request->headers['PayPal-Partner-Attribution-Id'] = $this->paypalPartnerAttributionId;
|
||||
$request->prefer('return=representation');
|
||||
$this->client()->execute($request);
|
||||
}
|
||||
|
|
@ -112,6 +121,7 @@ class SmartButton extends Paypal
|
|||
public function refundOrder($captureId, $body = [])
|
||||
{
|
||||
$request = new CapturesRefundRequest($captureId);
|
||||
$request->headers['PayPal-Partner-Attribution-Id'] = $this->paypalPartnerAttributionId;
|
||||
$request->body = $body;
|
||||
return $this->client()->execute($request);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ namespace Webkul\Paypal\Payment;
|
|||
class Standard extends Paypal
|
||||
{
|
||||
/**
|
||||
* Payment method code
|
||||
* Payment method code.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $code = 'paypal_standard';
|
||||
|
||||
/**
|
||||
* Line items fields mapping
|
||||
* Line items fields mapping.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -24,7 +24,7 @@ class Standard extends Paypal
|
|||
];
|
||||
|
||||
/**
|
||||
* Return paypal redirect url
|
||||
* Return paypal redirect url.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -34,7 +34,20 @@ class Standard extends Paypal
|
|||
}
|
||||
|
||||
/**
|
||||
* Return form field array
|
||||
* Return paypal IPN url.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getIPNUrl()
|
||||
{
|
||||
return $this->getConfigData('sandbox')
|
||||
? 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'
|
||||
: 'https://ipnpb.paypal.com/cgi-bin/webscr';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return form field array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -89,7 +102,7 @@ class Standard extends Paypal
|
|||
}
|
||||
|
||||
/**
|
||||
* Add shipping as item
|
||||
* Add shipping as item.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param int $i
|
||||
|
|
|
|||
|
|
@ -15,9 +15,11 @@ class EventServiceProvider extends ServiceProvider
|
|||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
{
|
||||
Event::listen('bagisto.shop.layout.body.after', static function(ViewRenderEventManager $viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate('paypal::checkout.onepage.paypal-smart-button');
|
||||
});
|
||||
|
||||
Event::listen('sales.invoice.save.after', 'Webkul\Paypal\Listeners\Transaction@saveTransaction');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Product\Contracts;
|
||||
|
||||
interface ProductReviewImage
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProductReviewImagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('product_review_images', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('type')->nullable();
|
||||
$table->string('path');
|
||||
$table->integer('review_id')->unsigned();
|
||||
$table->foreign('review_id')->references('id')->on('product_reviews')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('product_review_images');
|
||||
}
|
||||
}
|
||||
|
|
@ -34,4 +34,12 @@ class ProductReview extends Model implements ProductReviewContract
|
|||
{
|
||||
return $this->belongsTo(ProductProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* The images that belong to the review.
|
||||
*/
|
||||
public function images()
|
||||
{
|
||||
return $this->hasMany(ProductReviewImageProxy::modelClass(), 'review_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Product\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Webkul\Product\Contracts\ProductReviewImage as ProductReviewImageContract;
|
||||
|
||||
class ProductReviewImage extends Model implements ProductReviewImageContract
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'path',
|
||||
'review_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the review that owns the image.
|
||||
*/
|
||||
public function review()
|
||||
{
|
||||
return $this->belongsTo(ProductReviewProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image url for the review image.
|
||||
*/
|
||||
public function url()
|
||||
{
|
||||
return Storage::url($this->path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image url for the review image.
|
||||
*/
|
||||
public function getUrlAttribute()
|
||||
{
|
||||
return $this->url();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Product\Models;
|
||||
|
||||
use Konekt\Concord\Proxies\ModelProxy;
|
||||
|
||||
class ProductReviewImageProxy extends ModelProxy
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -70,6 +70,15 @@ class ProductImage extends AbstractProduct
|
|||
];
|
||||
}
|
||||
|
||||
/*
|
||||
* Product parent checked already above. If the case reached here that means the
|
||||
* parent is available. So recursing the method for getting the parent image if
|
||||
* images of the child are not found.
|
||||
*/
|
||||
if (empty($images)) {
|
||||
$images = $this->getGalleryImages($product->parent);
|
||||
}
|
||||
|
||||
return $loadedGalleryImages[$product->id] = $images;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,6 @@ class ModuleServiceProvider extends CoreModuleServiceProvider
|
|||
\Webkul\Product\Models\ProductBundleOptionProduct::class,
|
||||
\Webkul\Product\Models\ProductCustomerGroupPrice::class,
|
||||
\Webkul\Product\Models\ProductVideo::class,
|
||||
\Webkul\Product\Models\ProductReviewImage::class,
|
||||
];
|
||||
}
|
||||
|
|
@ -6,9 +6,35 @@ use Illuminate\Support\Facades\Storage;
|
|||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Illuminate\Container\Container as App;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
|
||||
class ProductImageRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* ProductRepository object
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
protected $productRepository;
|
||||
|
||||
/**
|
||||
* Create a new repository instance.
|
||||
*
|
||||
* @param \Webkul\Product\Repositories\ProductRepository $productRepository
|
||||
* @param \Illuminate\Container\Container $app
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
ProductRepository $productRepository,
|
||||
App $app
|
||||
) {
|
||||
parent::__construct($app);
|
||||
|
||||
$this->productRepository = $productRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
|
|
@ -48,6 +74,10 @@ class ProductImageRepository extends Repository
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($data['variants'])) {
|
||||
$this->uploadVariantImages($data['variants']);
|
||||
}
|
||||
|
||||
foreach ($previousImageIds as $imageId) {
|
||||
if ($imageModel = $this->find($imageId)) {
|
||||
Storage::delete($imageModel->path);
|
||||
|
|
@ -56,4 +86,44 @@ class ProductImageRepository extends Repository
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $variants
|
||||
* @return void
|
||||
*/
|
||||
public function uploadVariantImages($variants)
|
||||
{
|
||||
foreach ($variants as $variantsId => $variant) {
|
||||
$product = $this->productRepository->findOrFail($variantsId);
|
||||
$previousVariantImageIds = $product->images()->pluck('id');
|
||||
|
||||
if (isset($variant['images'])) {
|
||||
foreach ($variant['images'] as $imageId => $image) {
|
||||
$file = 'variants.' . $product->id .'.'. 'images.' . $imageId;
|
||||
$dir = 'product/' . $product->id;
|
||||
|
||||
if ($image instanceof UploadedFile) {
|
||||
if (request()->hasFile($file)) {
|
||||
$this->create([
|
||||
'path' => request()->file($file)->store($dir),
|
||||
'product_id' => $product->id,
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
if (is_numeric($index = $previousVariantImageIds->search($imageId))) {
|
||||
$previousVariantImageIds->forget($index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($previousVariantImageIds as $imageId) {
|
||||
if ($imageModel = $this->find($imageId)) {
|
||||
Storage::delete($imageModel->path);
|
||||
|
||||
$this->delete($imageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,18 +5,19 @@ namespace Webkul\Product\Repositories;
|
|||
use Exception;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Checkout\Facades\Cart;
|
||||
use Webkul\Product\Models\Product;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Attribute\Models\Attribute;
|
||||
use Webkul\Product\Models\ProductFlat;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Webkul\Product\Models\ProductAttributeValueProxy;
|
||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ProductRepository extends Repository
|
||||
{
|
||||
|
|
@ -212,8 +213,40 @@ class ProductRepository extends Repository
|
|||
if ($priceFilter = request('price')) {
|
||||
$priceRange = explode(',', $priceFilter);
|
||||
if (count($priceRange) > 0) {
|
||||
$qb->where('variants.min_price', '>=', core()->convertToBasePrice($priceRange[0]));
|
||||
$qb->where('variants.min_price', '<=', core()->convertToBasePrice(end($priceRange)));
|
||||
|
||||
$customerGroupId = null;
|
||||
|
||||
if (Cart::getCurrentCustomer()->check()) {
|
||||
$customerGroupId = Cart::getCurrentCustomer()->user()->customer_group_id;
|
||||
} else {
|
||||
$customerGuestGroup = app('Webkul\Customer\Repositories\CustomerGroupRepository')->getCustomerGuestGroup();
|
||||
|
||||
if ($customerGuestGroup) {
|
||||
$customerGroupId = $customerGuestGroup->id;
|
||||
}
|
||||
}
|
||||
|
||||
$qb
|
||||
->leftJoin('catalog_rule_product_prices', 'catalog_rule_product_prices.product_id', '=', 'variants.product_id')
|
||||
->leftJoin('product_customer_group_prices', 'product_customer_group_prices.product_id', '=', 'variants.product_id')
|
||||
->where(function ($qb) use ($priceRange, $customerGroupId) {
|
||||
$qb->where(function ($qb) use ($priceRange){
|
||||
$qb
|
||||
->where('variants.min_price', '>=', core()->convertToBasePrice($priceRange[0]))
|
||||
->where('variants.min_price', '<=', core()->convertToBasePrice(end($priceRange)));
|
||||
})
|
||||
->orWhere(function ($qb) use ($priceRange) {
|
||||
$qb
|
||||
->where('catalog_rule_product_prices.price', '>=', core()->convertToBasePrice($priceRange[0]))
|
||||
->where('catalog_rule_product_prices.price', '<=', core()->convertToBasePrice(end($priceRange)));
|
||||
})
|
||||
->orWhere(function ($qb) use ($priceRange, $customerGroupId) {
|
||||
$qb
|
||||
->where('product_customer_group_prices.value', '>=', core()->convertToBasePrice($priceRange[0]))
|
||||
->where('product_customer_group_prices.value', '<=', core()->convertToBasePrice(end($priceRange)))
|
||||
->where('product_customer_group_prices.customer_group_id', '=', $customerGroupId);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -807,17 +840,35 @@ class ProductRepository extends Repository
|
|||
}
|
||||
|
||||
/**
|
||||
* Check out of stock items.
|
||||
*
|
||||
* @param Webkul\Product\Models\ProductFlat
|
||||
*
|
||||
* @return Model
|
||||
*/
|
||||
public function checkOutOfStockItem($query) {
|
||||
return $query->leftJoin('products as ps', 'product_flat.product_id', '=', 'ps.id')
|
||||
return $query
|
||||
->leftJoin('products as ps', 'product_flat.product_id', '=', 'ps.id')
|
||||
->leftJoin('product_inventories as pv', 'product_flat.product_id', '=', 'pv.product_id')
|
||||
->where(function ($qb) {
|
||||
$qb
|
||||
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
|
||||
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty' , '>' , 0);
|
||||
return $qb
|
||||
/* for grouped, downloadable, bundle and booking product */
|
||||
->orWhereIn('ps.type', ['grouped', 'downloadable', 'bundle', 'booking'])
|
||||
/* for simple and virtual product */
|
||||
->orWhere(function ($qb) {
|
||||
return $qb->whereIn('ps.type', ['simple', 'virtual'])->where('pv.qty', '>', 0);
|
||||
})
|
||||
/* for configurable product */
|
||||
->orWhere(function ($qb) {
|
||||
return $qb->where('ps.type', 'configurable')->where(function ($qb) {
|
||||
return $qb
|
||||
->selectRaw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty)')
|
||||
->from('product_flat')
|
||||
->leftJoin('product_inventories', 'product_inventories.product_id', '=', 'product_flat.product_id')
|
||||
->join('product_flat as variants', 'product_flat.id', '=', DB::raw('COALESCE(' . DB::getTablePrefix() . 'variants.parent_id, ' . DB::getTablePrefix() . 'variants.id)'))
|
||||
->whereRaw(DB::getTablePrefix() . 'product_flat.parent_id = variants.id');
|
||||
}, '>', 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue