Feeds not updated by PriceAgentScheduler

What could be the problem if PriceAgentScheduler doesn’t pick updates on the products but when we force it by using the query-parameter ?refresh=true the feeds get updated?

Any idea?

I have also checked these but doesn’t seem to be relevant since the agent gets triggered but the data are not updated.

PriceAgentItemFactory is extended as below:

public class PriceAgentItemFactoryImpl : PriceAgentItemFactory
    {
        private readonly LanguageService _languageService;
        private readonly ChannelService _channelService;

        public PriceAgentItemFactoryImpl(
                IPriceCalculator priceCalculator, 
                IStockStatusCalculator stockStatusCalculator, 
                ICampaignPriceCalculator campaignPriceCalculator, 
                IOrderFactory orderFactory, 
                LanguageService languageService, 
                UrlService urlService, 
                CategoryService categoryService, 
                CurrencyService currencyService, 
                FieldDefinitionService fieldDefinitionService, 
                ISettingService settingService,
                WebsiteService websiteService, 
                CountryService countryService, 
                ChannelService channelService, 
                DomainNameService domainNameService, 
                AuthorizationOperationHelperService authorizationOperationHelperService, 
                AccountService accountService, 
                AccessControlService accessControlService
            )
            : base(priceCalculator, stockStatusCalculator, campaignPriceCalculator, orderFactory, languageService, urlService, categoryService, currencyService, 
                  fieldDefinitionService, settingService, websiteService, countryService, channelService, domainNameService, authorizationOperationHelperService, 
                  accountService, accessControlService)
        {
            _channelService = channelService;
            _languageService = languageService;
        }

        public override PriceAgentItemResult Create(PriceAgentItemArgs priceAgentItemArgs)
        {
            var channel = _channelService.Get(priceAgentItemArgs.ChannelId);
            var channelWebsiteLanguage = _languageService.Get(channel.WebsiteLanguageSystemId.GetValueOrDefault());
            priceAgentItemArgs.CountryId = channel.CountryLinks.FirstOrDefault(c => c.CountrySystemId.MapTo<Country>().Id == channelWebsiteLanguage.CultureInfo.GetRegionInfo().TwoLetterISORegionName)?.CountrySystemId ?? priceAgentItemArgs.CountryId;

            var result = base.Create(priceAgentItemArgs);

            #region Custom properties
            result.Properties.Add("CustomLabel1", priceAgentItemArgs.Variant?.Fields?.GetValue<string>(ProductFieldNameConstants.CustomLabel1) ?? string.Empty);
            result.Properties.Add("CustomLabel2", priceAgentItemArgs.Variant?.Fields?.GetValue<string>(ProductFieldNameConstants.CustomLabel2) ?? string.Empty);
            result.Properties.Add("CustomLabel3", priceAgentItemArgs.Variant?.Fields?.GetValue<string>(ProductFieldNameConstants.CustomLabel3) ?? string.Empty);
            result.Properties.Add("CustomLabel4", priceAgentItemArgs.Variant?.Fields?.GetValue<string>(ProductFieldNameConstants.CustomLabel4) ?? string.Empty);
            #endregion Custom properties

            return result;
        }

Litium version: [7.4.2]

You need to set a background job in the web.config to update the feed file every day/hour… otherwise the file will stay the same and if you go with ?refresh=true then you are forcing it to create a new file and get the latest updates.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.