Commerce Content throwing System.IO.FileNotFoundException

Vote:
 

Hi All,

I'm experiencing an unusual bug on getting an instance of a variant model (ProductCodeVariant) that inherits from VariationContent using ContentRepository/ContentLoader. 

The content exists in Commerce and can be viewed on the front end, but returns a System.IO.FileNotFoundException on ContentLoader.Get()/ContentRepository.Get().
e.g: 
var product = _contentLoader.Get<ProductCodeVariant>(productRef);
In the above instance productRef is a valid ContentReference.
Iterestingly, TryGet() returns true, but the out object throws the same error. 
At first I assumed it was potentially a Media issue on the content, but newly created instances of ProductCodeVariant throw the same error.
Anyone encountered an issue like this before?
CMS Version - 12.13.1
Commerce Version - 14.8.0
#295273
Jan 24, 2023 14:51
Vote:
 

Hi Niall,

Have you checked out Foundation Product Service?

Also check the product is setup correctly, available in market / language, prices and inventory are set, etc.

Paul

#295274
Jan 24, 2023 15:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.