diff --git a/app/Console/Commands/Connectors/Shopify/ShopifyInventorySyncCommand.php b/app/Console/Commands/Connectors/Shopify/ShopifyInventorySyncCommand.php index f0f506c37..8fa878950 100644 --- a/app/Console/Commands/Connectors/Shopify/ShopifyInventorySyncCommand.php +++ b/app/Console/Commands/Connectors/Shopify/ShopifyInventorySyncCommand.php @@ -13,6 +13,7 @@ use Kanvas\Inventory\Products\Models\Products; use Kanvas\Inventory\Warehouses\Models\Warehouses; use Kanvas\Users\Models\UserCompanyApps; +use Throwable; class ShopifyInventorySyncCommand extends Command { @@ -53,11 +54,16 @@ public function handle() ->get(); foreach ($products as $product) { - $this->info("Checking product {$product->getId()} {$product->name} \n"); + try { + $this->info("Checking product {$product->getId()} {$product->name} \n"); - $shopifyService = new ShopifyInventoryService($product->app, $product->company, $warehouses); - $shopifyService->saveProduct($product, StatusEnum::ACTIVE, $channel); + $shopifyService = new ShopifyInventoryService($product->app, $product->company, $warehouses); + $shopifyService->saveProduct($product, StatusEnum::ACTIVE, $channel); + } catch (Throwable $e) { + $this->error("Error syncing product {$product->getId()} {$product->name} \n"); + } } + return; } } diff --git a/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php b/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php index 15da2638d..0d62e7d23 100644 --- a/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php +++ b/app/Console/Commands/Connectors/Zoho/ZohoLeadsDownloadCommand.php @@ -43,7 +43,11 @@ public function handle() $leadsPerPage = (int) $this->argument('leadsPerPage'); $downloadAllLeads = new DownloadAllZohoLeadAction($app, $company, $leadReceiver); - $downloadAllLeads->execute($page, $leadsPerPage); + $leads = $downloadAllLeads->execute($page, $leadsPerPage); + + foreach ($leads as $lead) { + echo 'Lead ' . $lead->id . ' downloaded' . PHP_EOL; + } $this->info($downloadAllLeads->getTotalLeadsProcessed() . ' leads downloaded from Zoho to ' . $leadReceiver->name);