I am trying to link to a specific variant that has replaced a phased out one, with following code
if (product is object)
{
string productName = product.Name;
if (product.ReplacementProduct is ProductInfoViewModel )
{
if (product.ReplacementProduct.ProductId != "")
{
var productService = new Dynamicweb.Ecommerce.Products.ProductService();
var replacementProduct = productService.GetProductById(product.ReplacementProduct.ProductId,product.ReplacementProduct.VariantId, true);
etc etc
However, I only get back a ProductID from the replacementproduct PInfoViewModel... not variant. When I select a specific variant as replacement product in the PIM, there master product is listed in the replacement box, with no variant. Does this mean I can only ever redirect to the master of where the replacement variant is? This is not what I want