management integration start

This commit is contained in:
merdan 2022-06-03 12:14:12 +05:00
parent c5a818fb35
commit 0106d041ed
6 changed files with 7 additions and 5 deletions

View File

@ -77,7 +77,7 @@ class FilterOptions extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceCon
$query->orderBy('id', 'desc'); $query->orderBy('id', 'desc');
} }
Log::info($query->toSql()); // Log::info($query->toSql());
if (is_null($request->input('pagination')) || $request->input('pagination')) { if (is_null($request->input('pagination')) || $request->input('pagination')) {
$results = $query->paginate($request->input('limit') ?? 10); $results = $query->paginate($request->input('limit') ?? 10);
} else { } else {

View File

@ -56,7 +56,7 @@ class IntegrationController extends Controller
]); ]);
if ($validation->fails()) { if ($validation->fails()) {
Log::info($data); // Log::info($data);
return response()->json(['errors'=>$validation->getMessageBag()->all()],422); return response()->json(['errors'=>$validation->getMessageBag()->all()],422);
} }

View File

@ -31,7 +31,7 @@ class CartItemResource extends JsonResource
'additional' => is_array($this->resource->additional) 'additional' => is_array($this->resource->additional)
? $this->resource->additional ? $this->resource->additional
: json_decode($this->resource->additional, true), : json_decode($this->resource->additional, true),
'main_product' => $this->when($this->child, new Product($this->product)), 'main_product' => $this->when($this->product_id, new Product($this->product)),
'product' => $this->when($this->product_id, new CartItemProduct($this->child->product ?? $this->product)), 'product' => $this->when($this->product_id, new CartItemProduct($this->child->product ?? $this->product)),
]; ];
} }

View File

@ -19,6 +19,7 @@ class EventServiceProvider extends ServiceProvider
public function boot(){ public function boot(){
Event::listen('customer.registration.after', [Customer::class,'register']); Event::listen('customer.registration.after', [Customer::class,'register']);
Event::listen('checkout.order.save.after', 'Webkul\Marketplace\Listeners\Order@afterPlaceOrder'); Event::listen('checkout.order.save.after', 'Webkul\Marketplace\Listeners\Order@afterPlaceOrder');
// select engine, count(*) as TABLES, concat(round(sum(table_rows)/1000000,2),'M') as rowlar, concat(round(sum(data_length)/(1024*1024*1024),2),'G') as DATA, concat(round(sum(index_length)/(1024*1024*1024),2),'G') as idx from information_schema.TABLES where table_schema not in('mysql', 'merformance_schema', 'information_schema') group by engine order by sum(data_length+index_length) desc limit 10;
// Event::listen('bagisto.admin.catalog.category.create_form_accordian.general.after', function($viewRenderEventManager) { // Event::listen('bagisto.admin.catalog.category.create_form_accordian.general.after', function($viewRenderEventManager) {
// $viewRenderEventManager->addTemplate('sarga_admin::catalog.categories.scrap.create'); // $viewRenderEventManager->addTemplate('sarga_admin::catalog.categories.scrap.create');
// }); // });
@ -26,5 +27,6 @@ class EventServiceProvider extends ServiceProvider
// Event::listen('bagisto.admin.catalog.category.edit_form_accordian.general.after', function($viewRenderEventManager) { // Event::listen('bagisto.admin.catalog.category.edit_form_accordian.general.after', function($viewRenderEventManager) {
// $viewRenderEventManager->addTemplate('sarga_admin::catalog.categories.scrap.edit'); // $viewRenderEventManager->addTemplate('sarga_admin::catalog.categories.scrap.edit');
// }); // });
// select engine, count(*) as TABLES, concat(round(sum(table_rows)/1000000,2),'M') rowlar from information_schema.TABLES where table_schema not in('mysql', 'merformance_schema', 'information_schema') group by engine order by sum(data_length+index_length) desc limit 10;
} }
} }

View File

@ -48,7 +48,7 @@ class TFEBController extends Controller
// register order to payment gateway // register order to payment gateway
try{ try{
$result = json_decode($this->teb->registerOrder(),true); $result = json_decode($this->teb->registerOrder(),true);
Log::info($result); // Log::info($result);
if($result['response']['operationResult'] == 'OPG-00100' && $orderId = $result['response']['orderId']){ if($result['response']['operationResult'] == 'OPG-00100' && $orderId = $result['response']['orderId']){
// dd($result); // dd($result);
$this->teb->registerOrderId($orderId); $this->teb->registerOrderId($orderId);

View File

@ -914,7 +914,7 @@ class ProductRepository extends WProductRepository
]); ]);
} }
catch(\Exception $ex){ catch(\Exception $ex){
Log::info($ex->getMessage()); Log::error($ex->getMessage());
return false; return false;
} }