Compare commits

...

No commits in common. "main" and "master" have entirely different histories.
main ... master

35 changed files with 888 additions and 12369 deletions

74
.env
View File

@ -1,74 +0,0 @@
APP_NAME=TmFoods
APP_ENV=local
APP_VERSION=1.3.2
APP_KEY=base64:o3/ay9VRpANpS+glgph6u+LXZvw9kATU4IqRe/JIfEY=
APP_DEBUG=false
APP_URL=http://localhost:8000
APP_ADMIN_URL=admin
APP_TIMEZONE=Asia/Kolkata
APP_LOCALE=tm
LOG_CHANNEL=stack
APP_CURRENCY=TMT
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=nurgul
DB_USERNAME=shohrat
DB_PASSWORD=Bt110226**
DB_PREFIX=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
SHOP_MAIL_FROM=
ADMIN_MAIL_TO=
MAIL_FROM_NAME=
FIXER_API_KEY=
EXCHANGE_RATES_API_KEY=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
FACEBOOK_CALLBACK_URL=https://yourhost.com/customer/social-login/facebook/callback
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_CALLBACK_URL=https://yourhost.com/customer/social-login/twitter/callback
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CALLBACK_URL=https://yourhost.com/customer/social-login/google/callback
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
LINKEDIN_CALLBACK_URL=https://yourhost.com/customer/social-login/linkedin/callback
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_CALLBACK_URL=https://yourhost.com/customer/social-login/github/callback

5
.gitignore vendored
View File

@ -1,7 +1,4 @@
vendor
.env
.gitignore
composer.lock
public/storage
resources/views/errors/402.blade.php
storage

12154
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -90,7 +90,7 @@ return [
|
*/
'locale' => env('APP_LOCALE', 'en'),
'locale' => env('APP_LOCALE', 'ru'),
/*
|--------------------------------------------------------------------------

View File

@ -92,7 +92,7 @@ return [
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and and highlight.js
| and for js: jquery and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
@ -198,7 +198,8 @@ return [
'types' => ['SELECT'], // Deprecated setting, is always only SELECT
],
'hints' => false, // Show hints for common mistakes
'show_copy' => false, // Show copy button next to the query
'show_copy' => false, // Show copy button next to the query,
'slow_threshold' => false, // Only track queries that last longer than this time in ms
],
'mail' => [
'full_log' => false,
@ -206,6 +207,7 @@ return [
'views' => [
'timeline' => false, // Add the views to the timeline (Experimental)
'data' => false, //Note: Can slow down the application, because the data can be quite large..
'exclude_paths' => [], // Add the paths which you don't want to appear in the views
],
'route' => [
'label' => true, // show complete route on bar

View File

@ -13,6 +13,10 @@ return array(
*/
'show_warnings' => false, // Throw an Exception on warnings from dompdf
'orientation' => 'portrait',
/*
* Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show and £.
*/
'convert_entities' => true,
'defines' => array(
/**
* The location of the DOMPDF font directory
@ -38,7 +42,7 @@ return array(
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
* Symbol, ZapfDingbats.
*/
"font_dir" => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
"font_dir" => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
/**
* The location of the DOMPDF font cache directory
@ -48,7 +52,7 @@ return array(
*
* Note: This directory must exist and be writable by the webserver process.
*/
"font_cache" => storage_path('fonts/'),
"font_cache" => storage_path('fonts'),
/**
* The location of a temporary directory.

View File

@ -49,6 +49,7 @@ return [
'include_separator_line' => false,
'excel_compatibility' => false,
'output_encoding' => '',
'test_auto_detect' => true,
],
/*
@ -122,7 +123,7 @@ return [
|
*/
'csv' => [
'delimiter' => ',',
'delimiter' => null,
'enclosure' => '"',
'escape_character' => '\\',
'contiguous' => false,
@ -219,7 +220,7 @@ return [
| By default PhpSpreadsheet keeps all cell values in memory, however when
| dealing with large files, this might result into memory issues. If you
| want to mitigate that, you can configure a cell caching driver here.
| When using the illuminate driver, it will store each value in a the
| When using the illuminate driver, it will store each value in the
| cache store. This can slow down the process, because it needs to
| store each value. You can use the "batch" store if you want to
| only persist to the store when the memory limit is reached.

View File

@ -1,5 +1,17 @@
<?php
use Spatie\FlareClient\FlareMiddleware\AddGitInformation;
use Spatie\FlareClient\FlareMiddleware\RemoveRequestIp;
use Spatie\FlareClient\FlareMiddleware\CensorRequestBodyFields;
use Spatie\FlareClient\FlareMiddleware\CensorRequestHeaders;
use Spatie\LaravelIgnition\FlareMiddleware\AddDumps;
use Spatie\LaravelIgnition\FlareMiddleware\AddEnvironmentInformation;
use Spatie\LaravelIgnition\FlareMiddleware\AddExceptionInformation;
use Spatie\LaravelIgnition\FlareMiddleware\AddJobs;
use Spatie\LaravelIgnition\FlareMiddleware\AddLogs;
use Spatie\LaravelIgnition\FlareMiddleware\AddQueries;
use Spatie\LaravelIgnition\FlareMiddleware\AddNotifierName;
return [
/*
|
@ -17,29 +29,46 @@ return [
/*
|--------------------------------------------------------------------------
| Reporting Options
| Middleware
|--------------------------------------------------------------------------
|
| These options determine which information will be transmitted to Flare.
| These middleware will modify the contents of the report sent 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,
'censor_request_body_fields' => ['password'],
'flare_middleware' => [
RemoveRequestIp::class,
AddGitInformation::class,
AddNotifierName::class,
AddEnvironmentInformation::class,
AddExceptionInformation::class,
AddDumps::class,
AddLogs::class => [
'maximum_number_of_collected_logs' => 200,
],
AddQueries::class => [
'maximum_number_of_collected_queries' => 200,
'report_query_bindings' => true,
],
AddJobs::class => [
'max_chained_job_reporting_depth' => 5,
],
CensorRequestBodyFields::class => [
'censor_fields' => [
'password',
'password_confirmation',
],
],
CensorRequestHeaders::class => [
'headers' => [
'API-KEY',
]
]
],
/*
|--------------------------------------------------------------------------
| Reporting Log statements
| Reporting log statements
|--------------------------------------------------------------------------
|
| If this setting is `false` log statements won't be sent as events to Flare,
@ -48,15 +77,4 @@ return [
*/
'send_logs_as_events' => true,
/*
|--------------------------------------------------------------------------
| Censor request body fields
|--------------------------------------------------------------------------
|
| These fields will be censored from your request when sent to Flare.
|
*/
'censor_request_body_fields' => ['password'],
];

View File

@ -1,5 +1,28 @@
<?php
use Spatie\Ignition\Solutions\SolutionProviders\BadMethodCallSolutionProvider;
use Spatie\Ignition\Solutions\SolutionProviders\MergeConflictSolutionProvider;
use Spatie\Ignition\Solutions\SolutionProviders\UndefinedPropertySolutionProvider;
use Spatie\LaravelIgnition\Recorders\DumpRecorder\DumpRecorder;
use Spatie\LaravelIgnition\Recorders\JobRecorder\JobRecorder;
use Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder;
use Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\DefaultDbNameSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\GenericLaravelExceptionSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\IncorrectValetDbCredentialsSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\InvalidRouteActionSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingAppKeySolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingColumnSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingImportSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingLivewireComponentSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingMixManifestSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingViteManifestSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\RunningLaravelDuskInProductionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\TableNotFoundSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\UndefinedViewVariableSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\UnknownValidationSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\ViewNotFoundSolutionProvider;
return [
/*
@ -9,7 +32,7 @@ return [
|
| Choose your preferred editor to use when clicking any edit button.
|
| Supported: "phpstorm", "vscode", "vscode-insiders", "vscodium", "textmate", "emacs",
| Supported: "phpstorm", "vscode", "vscode-insiders", "textmate", "emacs",
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
| "xdebug"
|
@ -28,7 +51,7 @@ return [
|
*/
'theme' => env('IGNITION_THEME', 'light'),
'theme' => env('IGNITION_THEME', 'auto'),
/*
|--------------------------------------------------------------------------
@ -56,8 +79,44 @@ return [
| You can enable the command registration below.
|
*/
'register_commands' => env('REGISTER_IGNITION_COMMANDS', false),
/*
|--------------------------------------------------------------------------
| 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.
|
*/
'solution_providers' => [
// from spatie/ignition
BadMethodCallSolutionProvider::class,
MergeConflictSolutionProvider::class,
UndefinedPropertySolutionProvider::class,
// from spatie/laravel-ignition
IncorrectValetDbCredentialsSolutionProvider::class,
MissingAppKeySolutionProvider::class,
DefaultDbNameSolutionProvider::class,
TableNotFoundSolutionProvider::class,
MissingImportSolutionProvider::class,
InvalidRouteActionSolutionProvider::class,
ViewNotFoundSolutionProvider::class,
RunningLaravelDuskInProductionProvider::class,
MissingColumnSolutionProvider::class,
UnknownValidationSolutionProvider::class,
MissingMixManifestSolutionProvider::class,
MissingViteManifestSolutionProvider::class,
MissingLivewireComponentSolutionProvider::class,
UndefinedViewVariableSolutionProvider::class,
GenericLaravelExceptionSolutionProvider::class,
],
/*
|--------------------------------------------------------------------------
| Ignored Solution Providers
@ -70,7 +129,7 @@ return [
*/
'ignored_solution_providers' => [
\Facade\Ignition\SolutionProviders\MissingPackageSolutionProvider::class,
],
/*
@ -79,12 +138,19 @@ return [
|--------------------------------------------------------------------------
|
| 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.
| various tasks. By default, runnable solutions are only enabled when your
| app has debug mode enabled and the environment is `local` or
| `development`.
|
| Using the `IGNITION_ENABLE_RUNNABLE_SOLUTIONS` environment variable, you
| can override this behaviour and enable or disable runnable solutions
| regardless of the application's environment.
|
| Default: env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS')
|
*/
'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS', null),
'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS'),
/*
|--------------------------------------------------------------------------
@ -109,7 +175,7 @@ return [
|
*/
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''),
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', base_path()),
'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''),
/*
@ -121,6 +187,48 @@ return [
| specify a route prefix that will be used to host all internal links.
|
*/
'housekeeping_endpoint_prefix' => '_ignition',
/*
|--------------------------------------------------------------------------
| Settings File
|--------------------------------------------------------------------------
|
| Ignition allows you to save your settings to a specific global file.
|
| If no path is specified, a file with settings will be saved to the user's
| home directory. The directory depends on the OS and its settings but it's
| typically `~/.ignition.json`. In this case, the settings will be applied
| to all of your projects where Ignition is used and the path is not
| specified.
|
| However, if you want to store your settings on a project basis, or you
| want to keep them in another directory, you can specify a path where
| the settings file will be saved. The path should be an existing directory
| with correct write access.
| For example, create a new `ignition` folder in the storage directory and
| use `storage_path('ignition')` as the `settings_file_path`.
|
| Default value: '' (empty string)
*/
'settings_file_path' => '',
/*
|--------------------------------------------------------------------------
| Recorders
|--------------------------------------------------------------------------
|
| Ignition registers a couple of recorders when it is enabled. Below you may
| specify a recorders will be used to record specific events.
|
*/
'recorders' => [
DumpRecorder::class,
JobRecorder::class,
LogRecorder::class,
QueryRecorder::class
]
];

View File

@ -93,7 +93,6 @@ class Products extends ProductController
->orWhereNull('expired_at');
})
->orderBy('sort_order', 'ASC')
->limit(3)
->get();

View File

@ -2,21 +2,31 @@
namespace Sarga\API\Http\Controllers;
use DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Sarga\API\Http\Resources\Customer\CustomerResource;
use Webkul\Customer\Repositories\CustomerAddressRepository;
use Webkul\Customer\Repositories\CustomerGroupRepository;
use Webkul\Customer\Repositories\CustomerRepository;
use Illuminate\Support\Str;
use Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController as SellerProductController;
use Webkul\Product\Models\ProductFlat;
use Webkul\Product\Models\ProductInventory;
use Webkul\Product\Models\Product;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Marketplace\Repositories\SellerRepository;
use Webkul\Marketplace\Models\Product as SellerProductModel;
use Webkul\Marketplace\Models\Order as SellerOrderModel;
use Webkul\Marketplace\Models\OrderItem as SellerOrderItemModel;
class SellerProduct extends SellerProductController
{
/**
* Product repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* SellerRepository object
*
@ -29,6 +39,144 @@ class SellerProduct extends SellerProductController
* @return \Illuminate\Http\Response
*/
/**
* Create a new controller instance.
* $categoryRepository
* @param \Webkul\Product\Repositories\ProductRepository $productAttributeValueRepository
* @return void
*/
public function __construct(
ProductRepository $productRepository,
SellerRepository $sellerRepository,
)
{
$this->_config = request('_config');
$this->productRepository = $productRepository;
$this->sellerRepository = $sellerRepository;
}
public function reportSeller(Request $request)
{
$validation = Validator::make($request->all(), [
'seller_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$seller = $this->sellerRepository->isSellerMarket($request->get('seller_id'));
if ($seller) {
$orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->count();
$sellerProducts = SellerProductModel::where('marketplace_seller_id', $seller->id)->count();
return response([
"sellerOrders" => $orders,
"sellerProducts" => $sellerProducts,
"status" => 200
]);
} else {
return response([
'status' => 500,
'message' => 'not found seller'
]);
}
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
public function sellerOrderDetail(Request $request)
{
$validation = Validator::make($request->all(), [
'order_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$orderItems = SellerOrderItemModel::where('marketplace_order_id', $request->get('order_id'))->with(['product', 'item.product.images'])->paginate(12);
$order = SellerOrderModel::where('id', $request->get('order_id'))->with('order.customer')->with('order.shipping_address')->first();
if ($orderItems) {
return response([
"order" => $order,
"items" => $orderItems
]);
} else {
return response([
'status' => 500,
'message' => 'not found order Items'
]);
}
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
public function sellerOrders(Request $request)
{
$validation = Validator::make($request->all(), [
'seller_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$seller = $this->sellerRepository->isSellerMarket($request->get('seller_id'));
if ($seller) {
$orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->orderByDesc('created_at')->with('order.customer')->paginate(15);
return response($orders);
} else {
return response([
'status' => 500,
'message' => 'not found seller'
]);
}
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
public function storeSellerProd(Request $request)
{
$data = $request->all();
@ -50,11 +198,12 @@ class SellerProduct extends SellerProductController
if ($user == "romanah_" && $pass == "bt110226$$") {
$product = $this->product->create([
'type' => 'simple',
'attribute_family_id' => '1',
'sku' => Str::slug($request->get('sku')),
]);
$product = new Product;
$product->type = 'simple';
$product->attribute_family_id = '1';
$product->sku = $request->get('sku');
$product->save();
if (!$product) {
response([
@ -62,16 +211,14 @@ class SellerProduct extends SellerProductController
]);
}
$sellerProduct = $this->sellerProduct->create([
'condition' => 'new',
'price' => 0,
'description' => '',
'is_approved' => 0,
'is_owner' => 1,
'product_id' => $product->id,
'marketplace_seller_id' => $request->get('marketplace_seller_id')
]);
$sellerProduct = new SellerProductModel;
$sellerProduct->price = 0;
$sellerProduct->description = "";
$sellerProduct->is_approved = 0;
$sellerProduct->is_owner = 0;
$sellerProduct->product_id = $product->id;
$sellerProduct->marketplace_seller_id = $request->get('marketplace_seller_id');
$sellerProduct->save();
if (!$sellerProduct) {
response([
@ -91,18 +238,18 @@ class SellerProduct extends SellerProductController
'error' => "error create prod inventory"
]);
}
return response([
'status' => 200,
'data' => $product,
'message' => 'succesfully created product'
]);
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
return response([
'status' => 200,
'data' => $product,
'message' => 'succesfully created product'
]);
}
public function updateProductFlat(Request $request)
@ -111,7 +258,6 @@ class SellerProduct extends SellerProductController
'product_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
@ -126,32 +272,46 @@ class SellerProduct extends SellerProductController
$prodId = $request->get('product_id');
$product = ProductFlat::where('id', $prodId)->first();
// $product = ProductFlat::where('product_id', $prodId)->first();
$product->product_number = $request->get('product_number');
$product->name = $request->get('name');
$product->description = $request->get('description');
$product->url_key = Str::slug($request->get('name'));
$product->new = $request->get('new');
$product->featured = $request->get('featured');
$product->status = $request->get('status');
$product->price = $request->get('price');
$product->special_price = $request->get('special_price');
$product->weight = 0;
$product->locale = 'tm';
$product->channel = 'Nurgul';
$product->short_description = $request->get('short_description');
$product->save();
// \Log::info($product);
//$images = json_decode($request['images']['files'][0]);
//\Log::info($images);
//\Log::info($request->all());
// dd($request->get('images'));
// dd($request['images']);
$data = array(
"status" => $request->get('status'),
"product_number" => $request->get('product_number'),
"name" => $request->get('name'),
"description" => $request->get('description'),
"url_key" => Str::slug($request->get('name')),
"featured" => $request->get('featured'),
"status" => $request->get('status'),
"price" => $request->get('price'),
"special_price" => $request->get('special_price'),
"weight" => 0,
"visible_individually" => 1,
"locale" => 'tm',
"channel" => 'Nurgul',
"short_description" => $request->get('short_description'),
"images" => $request['images'],
"categories" => $request['categories'],
);
$product = $this->productRepository->update($data, $prodId, 'id');
$productInventory = ProductInventory::where('product_id', $prodId)->first();
if ($productInventory) {
$productInventory->qty = $request->get('qty');
$productInventory->save();
}else{
} else {
return response([
'status' => 500,
'message' => 'cant find product'
'message' => 'cant find product inv'
]);
}
@ -175,5 +335,9 @@ class SellerProduct extends SellerProductController
}
}
public function deleteProduct($product_id)
{
$this->productRepository->delete($product_id);
return response()->json(['success' => true]);
}
}

View File

@ -0,0 +1,289 @@
<?php
namespace Sarga\API\Http\Controllers;
use DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Webkul\Customer\Repositories\CustomerRepository;
use Illuminate\Support\Str;
use Webkul\Marketplace\Http\Controllers\Shop\Account\ProductController as SellerProductController;
use Webkul\Product\Models\ProductFlat;
use Webkul\Product\Models\ProductInventory;
use Webkul\Product\Models\Product;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Marketplace\Repositories\SellerRepository;
use Webkul\Marketplace\Models\Product as SellerProductModel;
use Webkul\Marketplace\Models\Order as SellerOrderModel;
use Webkul\Marketplace\Models\OrderItem as SellerOrderItemModel;
class SellerProduct extends SellerProductController
{
/**
* Product repository instance.
*
* @var \Webkul\Product\Repositories\ProductRepository
*/
protected $productRepository;
/**
* SellerRepository object
*
* @var Object
*/
protected $sellerRepository;
/**
* Method to store user's sign up form data to DB.
*
* @return \Illuminate\Http\Response
*/
/**
* Create a new controller instance.
* $categoryRepository
* @param \Webkul\Product\Repositories\ProductRepository $productAttributeValueRepository
* @return void
*/
public function __construct(
ProductRepository $productRepository,
SellerRepository $sellerRepository,
) {
$this->_config = request('_config');
$this->productRepository = $productRepository;
$this->sellerRepository = $sellerRepository;
}
public function sellerOrderDetail(Request $request)
{
$validation = Validator::make($request->all(), [
'order_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$orderItems = SellerOrderItemModel::where('marketplace_order_id', $request->get('order_id'))->with(['product', 'item'])->paginate(12);
if ($orderItems) {
return response($orderItems);
} else {
return response([
'status' => 500,
'message' => 'not found order Items'
]);
}
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
public function sellerOrders(Request $request)
{
$validation = Validator::make($request->all(), [
'seller_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$seller = $this->sellerRepository->isSellerMarket($request->get('seller_id'));
if ($seller) {
$orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->with('order.customer')->paginate(15);
return response($orders);
} else {
return response([
'status' => 500,
'message' => 'not found seller'
]);
}
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
public function storeSellerProd(Request $request)
{
$data = $request->all();
$validation = Validator::make($request->all(), [
'type' => 'required',
'sku' => ['required', 'unique:products,sku', new \Webkul\Core\Contracts\Validations\Slug],
'marketplace_seller_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$product = new Product;
$product->type = 'simple';
$product->attribute_family_id = '1';
$product->sku = $request->get('sku');
$product->save();
if (!$product) {
response([
'error' => "error create prod"
]);
}
$sellerProduct = new SellerProductModel;
$sellerProduct->price = 0;
$sellerProduct->description = "";
$sellerProduct->is_approved = 0;
$sellerProduct->is_owner = 0;
$sellerProduct->product_id = $product->id;
$sellerProduct->marketplace_seller_id = $request->get('marketplace_seller_id');
$sellerProduct->save();
if (!$sellerProduct) {
response([
'error' => "error create SELLER prod"
]);
}
$productInventory = ProductInventory::create([
'qty' => 0,
'product_id' => $product->id,
'inventory_source_id' => 1,
'vendor_id' => $request->get('marketplace_seller_id')
]);
if (!$productInventory) {
response([
'error' => "error create prod inventory"
]);
}
return response([
'status' => 200,
'data' => $product,
'message' => 'succesfully created product'
]);
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
public function updateProductFlat(Request $request)
{
$validation = Validator::make($request->all(), [
'product_id' => 'required',
'user' => 'required',
'password' => 'required',
]);
if ($validation->fails()) {
return response()->json(['errors' => $validation->getMessageBag()->all()], 422);
}
$user = $request->get('user');
$pass = $request->get('password');
if ($user == "romanah_" && $pass == "bt110226$$") {
$prodId = $request->get('product_id');
// $product = ProductFlat::where('product_id', $prodId)->first();
// \Log::info($product);
//$images = json_decode($request['images']['files'][0]);
//\Log::info($images);
//\Log::info($request->all());
\Log::info($request['images']);
\Log::info($request['surats']);
// dd($request->get('images'));
// dd($request['images']);
$data = array(
"status" => $request->get('status'),
"product_number" => $request->get('product_number'),
"name" => $request->get('name'),
"description" => $request->get('description'),
"url_key" => Str::slug($request->get('name')),
"featured" => $request->get('featured'),
"status" => $request->get('status'),
"price" => $request->get('price'),
"special_price" => $request->get('special_price'),
"weight" => 0,
"visible_individually" => 1,
"locale" => 'tm',
"channel" => 'Nurgul',
"short_description" => $request->get('short_description'),
"images" => $request['images'],
);
$product = $this->productRepository->update($data, $prodId, 'id');
$productInventory = ProductInventory::where('product_id', $prodId)->first();
if ($productInventory) {
$productInventory->qty = $request->get('qty');
$productInventory->save();
} else {
return response([
'status' => 500,
'message' => 'cant find product inv'
]);
}
if ($product && $productInventory) {
return response([
'status' => 200,
'data' => $product,
'message' => 'succesfully updated product'
]);
} else {
return response([
'status' => 500,
'message' => 'cant update product'
]);
}
} else {
return response([
'status' => 500,
'message' => 'not authorized'
]);
}
}
}

View File

@ -26,6 +26,8 @@ class Vendors extends V1Controller
{
}
public function sources(){
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','shop_title')
->where('is_approved',true)
@ -63,17 +65,18 @@ class Vendors extends V1Controller
public function index()
{
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title','brand_attribute_id','ship_time','ship_price','slogan')
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title', 'ship_time','ship_price','slogan')
->where('is_approved',true)
->with(['categories:seller_id,type,categories'])
->with(['categories:seller_id,categories'])
// ->leftJoin('seller_categories','marketplace_sellers.id','=','seller_categories.seller_id')
->get();
$reviewed_vendors = $vendors->map(function ($item, $key){
$item->review_average = $this->reviewRepository->getAverageRating($item);
return $item;
});
->paginate(15);
return Vendor::collection($reviewed_vendors);
// $reviewed_vendors = $vendors->map(function ($item, $key){
// $item->review_average = $this->reviewRepository->getAverageRating($item);
// return $item;
// });
return Vendor::collection($vendors);
}
public function products(ProductRepository $productRepository,$seller_id){
@ -82,10 +85,22 @@ class Vendors extends V1Controller
return ProductResource::collection($products);
}
public function sellerProducts(ProductRepository $productRepository,$seller_id){
$products = $productRepository->findAllBySellerNotActive($seller_id,request()->input('category_id'));
return ProductResource::collection($products);
}
public function sellerProductsById(ProductRepository $productRepository,$seller_id, $product_id){
$products = $productRepository->findAllBySellerNotActive($seller_id,request()->input('category_id'), $product_id);
return ProductResource::collection($products);
}
public function vendor($seller_id){
$vendor = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title','brand_attribute_id','ship_time','ship_price','slogan')
$vendor = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title', 'ship_time','ship_price','slogan')
->where('id',$seller_id)
->with(['categories:seller_id,type,categories'])
->with(['categories:seller_id,categories'])
->first();
if($vendor->categories && $mainCats = $vendor->categories()->first()){
@ -100,6 +115,11 @@ class Vendors extends V1Controller
->orderBy('position','asc')
->get();
}else{
return response([
'status' => 500,
'message' => 'cant find seller category'
]);
}
// dd($vendor->categories()->first());

View File

@ -37,9 +37,10 @@ class Product extends JsonResource
return [
/* product's information */
'id' => $product->id,
// 'sku' => $product->sku,
'sku' => $product->sku,
'type' => $product->type,
'name' => $product->name,
'categories' => $product->categories,
'url_key' => $product->url_key,
'price' => core()->convertPrice($productTypeInstance->getMinimalPrice()),
'formatted_price' => core()->currency($productTypeInstance->getMinimalPrice()),
@ -50,10 +51,13 @@ class Product extends JsonResource
'in_stock' => $product->haveSufficientQuantity(1),
'is_wishlisted' => $this->isWishlisted($product) ,
'is_item_in_cart' => \Cart::hasProduct($product),
//'shop_title' => $this->shop_title,
//'logo' => $this->logo ? Storage::url($this->logo) : null,
'shop_title' => $this->shop_title,
'logo' => $this->logo ? Storage::url($this->logo) : null,
'new' => $this->new,
'featured' => $this->featured,
'qty' => $this->qty,
'status' => $this->status,
'product_number' => $this->product_number,
// 'brand' => $product->brand->name ?? '',

View File

@ -23,7 +23,7 @@ class Vendor extends JsonResource
'banner' => $this->banner_url,
'ship_price' => $this->ship_price,
'ship_time' => $this->ship_time,
'review_average' => $this->review_average,
// 'review_average' => $this->review_average,
'slogan' => $this->slogan,
// 'brand_id' => $this->brand_attribute_id,
// $this->mergeWhen(!empty($this->main_categories) && $this->main_categories->count(),[

View File

@ -35,8 +35,16 @@ Route::post('admin/romanah/login', [AuthController::class, 'login']);
Route::group(['prefix' => 'api'], function () {
Route::group(['prefix' => 'seller'],function (){
Route::post('report',[SellerProduct::class, 'reportSeller']);
Route::post('orders',[SellerProduct::class, 'sellerOrders']);
Route::post('order', [SellerProduct::class, 'sellerOrderDetail']);
Route::get('products/{vendor_id}',[Vendors::class,'sellerProducts']);
Route::get('products/{vendor_id}/{product_id}',[Vendors::class,'sellerProductsById']);
Route::post('create/product', [SellerProduct::class, 'storeSellerProd']);
Route::post('update/product', [SellerProduct::class, 'updateProductFlat']);
Route::post('delete/product/{product_id}', [SellerProduct::class, 'deleteProduct']);
});
Route::group(['middleware' => ['locale', 'currency']], function () {

View File

@ -129,11 +129,11 @@
<div class="row">
<span class="title">
{{ __('admin::app.sales.orders.email') }}
{{ __('admin::app.sales.orders.phone') }}
</span>
<span class="value">
{{ $order->phone }}
{{ $order->customer->phone }}
</span>
</div>

View File

@ -30,7 +30,7 @@ class ProductRepository extends WProductRepository
protected $vendorProductRepository;
// protected $brandRepository;
protected $fillableTypes = ['sku', 'name', 'url_key', 'short_description', 'description', 'price', 'weight', 'status'];
protected $fillableTypes = ['sku', 'name', 'url_key', 'short_description', 'description', 'price', 'weight', 'status', 'qty'];
public function __construct(AttributeRepository $attributeRepository,
App $app,
@ -502,6 +502,115 @@ class ProductRepository extends WProductRepository
* @param integer $seller
* @return Collection
*/
public function findAllBySellerNotActive($seller_id, $category_id = null, $product_id = null)
{
$params = request()->input();
$results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($seller_id, $params,$category_id, $product_id) {
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
$locale = request()->get('locale') ?: app()->getLocale();
$qb = $query->distinct()
->addSelect('product_flat.*')
->join('product_flat as variants', 'product_flat.id', '=', DB::raw('COALESCE(' . DB::getTablePrefix() . 'variants.parent_id, ' . DB::getTablePrefix() . 'variants.id)'))
->leftJoin('product_categories', 'product_categories.product_id', '=', 'product_flat.product_id')
->leftJoin('product_attribute_values', 'product_attribute_values.product_id', '=', 'variants.product_id')
->addSelect(DB::raw('IF( product_flat.special_price_from IS NOT NULL
AND product_flat.special_price_to IS NOT NULL , IF( NOW( ) >= product_flat.special_price_from
AND NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , IF( product_flat.special_price_from IS NULL , IF( product_flat.special_price_to IS NULL , IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , IF( NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) ) , IF( product_flat.special_price_to IS NULL , IF( NOW( ) >= product_flat.special_price_from, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , product_flat.price ) ) ) AS price1'))
->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
->leftJoin('product_inventories', 'products.id', '=', 'product_inventories.product_id')
->addSelect('product_inventories.qty')
->leftJoin('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id')
->where('product_flat.channel', $channel)
->where('product_flat.locale', $locale)
->whereNotNull('product_flat.url_key')
->where('marketplace_products.marketplace_seller_id', $seller_id)
->orderBy('products.id', 'desc');
$qb->addSelect(DB::raw('(CASE WHEN marketplace_products.is_owner = 0 THEN marketplace_products.price ELSE product_flat.price END) AS price2'));
if ($category_id) {
$qb->whereIn('product_categories.category_id', explode(',', $category_id));
}
if ($product_id) {
$qb->where('products.id', $product_id);
}
if (isset($params['new'])){
$qb->where('product_flat.new', $params['new']);
}
if (isset($params['featured'])){
$qb->where('product_flat.featured', $params['featured']);
}
$queryBuilder = $qb->leftJoin('product_flat as flat_variants', function($qb) use($channel, $locale) {
$qb->on('product_flat.id', '=', 'flat_variants.parent_id')
->where('flat_variants.channel', $channel)
->where('flat_variants.locale', $locale);
});
if (isset($params['sort'])) {
$attribute = $this->attributeRepository->findOneByField('code', $params['sort']);
if ($params['sort'] == 'price') {
$qb->orderBy($attribute->code, $params['order']);
} else {
$qb->orderBy($params['sort'] == 'created_at' ? 'product_flat.created_at' : $attribute->code, $params['order']);
}
}
//brand attribute added code
$attributeFilters = $this->attributeRepository
->getProductDefaultAttributes(array_keys(
request()->input()
));
if (count($attributeFilters) > 0) {
$qb = $qb->where(function ($filterQuery) use ($attributeFilters) {
foreach ($attributeFilters as $attribute) {
$filterQuery->orWhere(function ($attributeQuery) use ($attribute) {
$column = DB::getTablePrefix() . 'product_attribute_values.' . ProductAttributeValueProxy::modelClass()::$attributeTypeFields[$attribute->type];
$filterInputValues = explode(',', request()->get($attribute->code));
# define the attribute we are filtering
$attributeQuery = $attributeQuery->where('product_attribute_values.attribute_id', $attribute->id);
# apply the filter values to the correct column for this type of attribute.
if ($attribute->type != 'price') {
$attributeQuery->where(function ($attributeValueQuery) use ($column, $filterInputValues) {
foreach ($filterInputValues as $filterValue) {
if (! is_numeric($filterValue)) {
continue;
}
$attributeValueQuery->orWhereRaw("find_in_set(?, {$column})", [$filterValue]);
}
});
} else {
$attributeQuery->where($column, '>=', core()->convertToBasePrice(current($filterInputValues)))
->where($column, '<=', core()->convertToBasePrice(end($filterInputValues)));
}
});
}
});
$qb->groupBy('variants.id');
$qb->havingRaw('COUNT(*) = ' . count($attributeFilters));
}
return $qb->groupBy('product_flat.id');
})->paginate(isset($params['limit']) ? $params['limit'] : 9);
return $results;
}
public function findAllBySeller($seller_id,$category_id = null)
{
$params = request()->input();
@ -521,6 +630,7 @@ class ProductRepository extends WProductRepository
AND NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , IF( product_flat.special_price_from IS NULL , IF( product_flat.special_price_to IS NULL , IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , IF( NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) ) , IF( product_flat.special_price_to IS NULL , IF( NOW( ) >= product_flat.special_price_from, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , product_flat.price ) ) ) AS price1'))
->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
// ->leftJoin('product_inventories', 'product_flat.product_id', '=', 'product_inventories.product_id')
->leftJoin('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id')
->where('product_flat.visible_individually', 1)
->where('product_flat.status', 1)

View File

@ -413,6 +413,7 @@ return [
'customer-notified' => ':date | Customer <b>Notified</b>',
'customer-not-notified' => ':date | Customer <b>Not Notified</b>',
'transactions' => 'Transactions',
'phone' => 'Phone number',
],
'invoices' => [
@ -536,10 +537,10 @@ return [
'bundle' => 'Bundle',
'downloadable' => 'Downloadable',
'grouped' => 'Grouped',
'virtual' => 'Virtual',
'virtual' => 'Virtual',
'configurable' => 'Configurable',
],
],
'familiy' => 'Attribute Family',
'sku' => 'SKU',
'configurable-attributes' => 'Configurable Attributes',

View File

@ -421,6 +421,7 @@ return [
'customer-notified' => ':date | Покупатель <b>Notified</b>',
'customer-not-notified' => ':date | Покупатель <b>Not Notified</b>',
'transactions' => 'Транзакции',
'phone' => 'Номер телефона',
],
'invoices' => [

View File

@ -341,7 +341,6 @@ return [
'tax-percent' => 'Salgyt göterimi',
'tax-amount' => 'Salgyt möçberi',
'discount-amount' => 'Arzanladyş möçberi',
// 'discount-amount' => 'Arzanladyş möçberi',
'grand-total' => 'Umumy jemi',
'total-paid' => 'Jemi tölenen',
'total-refunded' => 'Jemi çykdajysy tölenen',
@ -356,6 +355,7 @@ return [
'customer-notified' => ':date | Customer <b>Notified</b>',
'customer-not-notified' => ':date | Customer <b>Not Notified</b>',
'transactions' => 'Transactions t',
'phone' => 'Telefon belgisi',
],
'invoices' => [

View File

@ -154,7 +154,7 @@
{!! view_render_event('sales.order.customer_group.after', ['order' => $order]) !!}
</div>
</div>
</div>
</div>
</div>
</accordian>
@ -190,7 +190,7 @@
</div>
</div>
@endif
</div>
</div>
</div>
</accordian>
@endif
@ -274,7 +274,7 @@
</div>
</div>
@endif
</div>
</div>
</div>
</accordian>
@ -362,7 +362,7 @@
</table>
</div>
</div>
<div class="summary-comment-container">
<div class="comment-container">

View File

@ -25,7 +25,7 @@ class ProductDataGrid extends DataGrid
{
$queryBuilder = DB::table('marketplace_products')
->leftJoin('product_flat', 'marketplace_products.product_id', '=', 'product_flat.id')
->leftJoin('product_flat', 'marketplace_products.product_id', '=', 'product_flat.product_id')
->leftJoin('marketplace_product_flags', 'product_flat.product_id', '=', 'marketplace_product_flags.product_id')
->leftJoin('marketplace_sellers', 'marketplace_products.marketplace_seller_id', '=', 'marketplace_sellers.id')
->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id')

View File

@ -152,7 +152,7 @@ class ProductRepository extends Repository
$seller = $this->sellerRepository->isSellerMarket($data["marketplace_seller_id"]);
\Log::info($seller);
// \Log::info($seller);
$sellerProduct = parent::create(array_merge($data, [
'marketplace_seller_id' => $seller->id,

View File

@ -123,7 +123,7 @@ class SellerRepository extends Repository
public function isSellerMarket($sellerId)
{
$seller = $this->getModel()->where('id', $sellerId)->first();
$seller = $this->getModel()->where('id', $sellerId)->where('is_approved', 1)->first();
return $seller;
}

View File

@ -179,7 +179,6 @@ return [
'id' => 'Id',
'sku' => 'SKU',
'name' => 'Name',
'price' => 'Price',
'product-number' => 'Product Number',
'quantity' => 'Quantity',
'is-approved' => 'Is Approved',
@ -211,7 +210,6 @@ return [
'grand-total' => 'Grand Total',
'order-date' => 'Order Date',
'channel-name' => 'Channel Name',
'status' => 'Status',
'processing' => 'Processing',
'completed' => 'Completed',
'canceled' => 'Canceled',
@ -313,7 +311,6 @@ return [
'write-review' => 'Write Review',
'total-rating' => ':total_rating Ratings & :total_reviews Reviews',
'view-more' => 'View More',
'write-review' => 'Write Review',
'by-user-date' => '- By :name :date',
'rating' => 'Rating',
'comment' => 'Comment'
@ -357,6 +354,7 @@ return [
],
'admin' => [
'layouts' => [
'marketplace' => 'Marketplace',
'sellers' => 'Sellers',
@ -518,7 +516,6 @@ return [
'create-success' => 'Seller flag reason created successfully',
'update-success' => 'Seller flag reason updated successfully',
'delete-success' => 'Seller flag reason deleted successfully',
'title' => 'Seller flag reasons',
'edit-title' => 'Edit flag reason',
'create' => [
@ -644,7 +641,6 @@ return [
'create-success' => 'Product flag has been created successfully',
'delete-success' => 'Product flag has been deleted successfully',
'update-success' => 'Product flag has been updated successfully'
]
],

View File

@ -121,7 +121,6 @@ return [
'id' => 'Id',
'sku' => 'SKU',
'name' => 'Имя',
'price' => 'Цена',
'quantity' => 'Количество',
'is-approved' => 'Подтвержденный',
'yes' => 'Да',
@ -149,7 +148,6 @@ return [
'grand-total' => 'Общий итог',
'order-date' => 'Дата заказа',
'channel-name' => 'Название канала',
'status' => 'Статус',
'processing' => 'Обработка',
'completed' => 'Завершено',
'canceled' => 'Отменен',
@ -243,7 +241,6 @@ return [
'write-review' => 'Написать обзор',
'total-rating' => ':total_rating Рейтинги & :total_reviews обзоры',
'view-more' => 'Обширный',
'write-review' => 'Написать обзор',
'by-user-date' => '- по :name :date',
'rating' => 'Рейтинг',
'comment' => 'Комментарий'
@ -343,6 +340,13 @@ return [
'open-shop-info' => 'Информация об открытом магазине',
],
'flag' => [
'title' => 'Флаги',
'name' => 'Имя',
'email' => 'Электронная почта',
'reason' => 'Причины'
],
'sellers' => [
'title' => 'Продавцы',
'id' => 'Id',
@ -361,9 +365,15 @@ return [
'delete-success-msg' => 'Удалить успешное сообщение',
'mass-delete-success' => 'Успешное массовое удаление',
'mass-update-success' => 'Успешное массовое обновление',
'seller-profile' => 'Профиль продавца',
'view-seller-profile' => 'Посмотреть профиль продавца',
'product' => 'Продукт',
'add-product' => 'Добавить продукт',
'add-title' => 'Продавец',
'search-product' => 'Поиск продукта',
'search' => 'Поиск',
'flag' => [
'title' => 'Причины флага продавца',
'add-btn-title' => 'Добавить причину пометки',
'create-success' => 'Причина пометки продавца успешно создана',
'update-success' => 'Причина пометки продавца успешно обновлена',
@ -397,6 +407,7 @@ return [
'orders' => [
'title' => 'Заказы',
'discount' => 'Скидка',
'manage-title' => 'Управление заказами поставщиков',
'order-id' => 'Номер заказа',
'seller-name' => 'Имя продавца',
@ -456,7 +467,8 @@ return [
'products' => [
'id' => 'Id',
'title' => 'Продукты',
'product-id' => 'Номер продукта',
'product-id' => 'Ид продукта',
'product-number' => 'Номер продукта',
'seller-name' => 'Имя продавца',
'sku' => 'Sku',
'name' => 'Имя',

View File

@ -121,7 +121,6 @@ return [
'id' => 'Id',
'sku' => 'SKU',
'name' => 'Ady',
'price' => 'Bahasy',
'quantity' => 'Mukdary',
'is-approved' => 'Tassyklanan',
'yes' => 'Hawa',
@ -149,7 +148,6 @@ return [
'grand-total' => 'Umumy jemi',
'order-date' => 'Sargydyň senesi',
'channel-name' => 'Kanalyň ady',
'status' => 'Statusy',
'processing' => 'Işlenilýär',
'completed' => 'Tamamlandy',
'canceled' => 'Ýatyryldy',
@ -243,7 +241,6 @@ return [
'write-review' => 'Syn ýazyň',
'total-rating' => ':total_rating Reýtingleri & :total_reviews synlary',
'view-more' => 'Giňişleýin',
'write-review' => 'Syn ýazyň',
'by-user-date' => '- :name :date boýunça',
'rating' => 'Reýting',
'comment' => 'Teswir'
@ -343,6 +340,13 @@ return [
'open-shop-info' => 'Dükan aç barada maglumat',
],
'flag' => [
'title' => 'Flaglar',
'name' => 'Ady',
'email' => 'Elekrton poçta',
'reason' => 'Sebäbi'
],
'sellers' => [
'title' => 'Satyjylar',
'id' => 'Id',
@ -361,6 +365,13 @@ return [
'delete-success-msg' => 'Satyjy üstünlikli pozuldy.',
'mass-delete-success' => 'Saýlanan satyjylar üstünlikli pozuldy.',
'mass-update-success' => 'Saýlanan satyjylar üstünlikli täzelendi.',
'seller-profile' => 'Satyjy profili',
'view-seller-profile' => 'Satyjy profilini görmek',
'product' => 'Haryt',
'add-product' => 'Haryt goşmak',
'add-title' => 'Satyjy',
'search-product' => 'Haryt gözlegi',
'search' => 'Gözleg',
'flag' => [
'title' => 'Seller Flag Reasons',
@ -368,7 +379,6 @@ return [
'create-success' => 'Seller flag reason created successfully',
'update-success' => 'Seller flag reason updated successfully',
'delete-success' => 'Seller flag reason deleted successfully',
'title' => 'Seller flag reasons',
'edit-title' => 'Edit flag reason',
'create' => [
@ -397,6 +407,7 @@ return [
'orders' => [
'title' => 'Sargytlar',
'discount' => 'Arzanladyş',
'manage-title' => 'Satyjynyň sargytlaryny dolandyr',
'order-id' => 'Sargyt Id',
'seller-name' => 'Satyjynyň ady',
@ -456,7 +467,8 @@ return [
'products' => [
'id' => 'Id',
'title' => 'Önümler',
'product-id' => 'Önümiň Id',
'product-id' => 'Önümiň Id-sy',
'product-number' => 'Önümiň belgisi',
'seller-name' => 'Ady',
'sku' => 'Sku',
'name' => 'Ady',

View File

@ -223,7 +223,7 @@ class ProductFlat
'locale' => $locale->code,
]);
}
$productFlat->brand_id = $product->brand_id;
// $productFlat->brand_id = $product->brand_id;
foreach ($familyAttributes[$product->attribute_family->id] as $attribute) {
if ($parentProduct && ! in_array($attribute->code, array_merge($superAttributes[$parentProduct->id], $this->fillableAttributeCodes))) {
continue;

View File

@ -35,7 +35,7 @@ class Product extends Model implements ProductContract
'attribute_family_id',
'sku',
'parent_id',
'brand_id'
// 'brand_id'
];
/**

View File

@ -51,8 +51,11 @@ class ProductMediaRepository extends Repository
$previousIds = $this->resolveFileTypeQueryBuilder($product, $uploadFileType)->pluck('id');
if (isset($data[$uploadFileType]['files']) && $data[$uploadFileType]['files']) {
foreach ($data[$uploadFileType]['files'] as $indexOrModelId => $file) {
if ($file instanceof UploadedFile) {
\Log::info("messageq: ".$file);
$this->create([
'type' => $uploadFileType,
'path' => $file->store($this->getProductDirectory($product)),

1
public/storage Symbolic link
View File

@ -0,0 +1 @@
/var/www/nurgulbackend/storage/app/public

View File

@ -0,0 +1,5 @@
@extends('errors::minimal')
@section('title', __('Payment Required'))
@section('code', '402')
@section('message', __('Payment Required'))

View File

@ -6,16 +6,12 @@
<title>@yield('title')</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Nunito', sans-serif;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-weight: 100;
height: 100vh;
margin: 0;

File diff suppressed because one or more lines are too long