Example #1
0
        public void SyncAmazonListing(AmazonSyncModel model)
        {
            AmazonProgressBarHelper.Clean(model.Task);

            var amazonListing = _amazonListingService.Get(model.Id);

            if (amazonListing != null)
            {
                _amazonLogService.Add(AmazonLogType.Listings, AmazonLogStatus.Stage, null, null, AmazonApiSection.Feeds, null, null, amazonListing, null,
                                      "Preparing listing for Amazon");
                AmazonProgressBarHelper.Update(model.Task, "Push", "Preparing listing for Amazon", 100, 0);

                _exportAmazonListingService.SubmitSingleProductFeed(model, amazonListing);

                AmazonProgressBarHelper.Update(model.Task, "Push", "Amazon Listing successfully synced", 100, 100);
            }

            else
            {
                AmazonProgressBarHelper.Update(model.Task, "Push", "No listing to sync", null, null);
            }

            AmazonProgressBarHelper.Update(model.Task, "Completed", "Completed", 100, 100);
        }