PriceProvider call 2 times when product detail request and user logged in, second time Pricecontext.customer=null
v 9.17.2
* First time
Seond Time
any clue what could be the case?
                                                            
                                                    
                            
                                                    
                        							
                                                    
                                                    
                            
                            
                            
                    PriceProvider call 2 times when product detail request and user logged in, second time Pricecontext.customer=null
v 9.17.2
* First time
Seond Time
any clue what could be the case?
                                                        
                        
															
								
								
															
															
															
								
								
								
						I found the solution
we are creating custom ProductViewModel and for the settings we are not passing userId
    ProductViewModelSettings productSetting = new ProductViewModelSettings
    {
        LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID,
        CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code,
        CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2,
        ShopId = Pageview.Area.EcomShopId,
        UserId= uersId
    };
ProductViewModel variantProd = ViewModelFactory.CreateView(productSetting, product.Id, variantId);
Issue is solved
You must be logged in to post in the forum