Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Krishna Santosh Vatsavai 9 posts 79 karma points
    Aug 13, 2018 @ 21:42
    Krishna Santosh Vatsavai
    0

    Merchello Product Catalog not saved

    I am creating product by program calling the product service. I am adding the product to the default inventory.

    Sample program

    var catalog = _warehouseService.GetDefaultWarehouse().WarehouseCatalogs.FirstOrDefault();

    product.AddToCatalogInventory(catalog);

    _productService.Save(product);

    But when retrieving

    throws error

    var product = _productService.GetBySku(ProductCode);

                if (product != null)
                {
                  var catalog =  product.CatalogInventories.First(x => x.ProductVariantKey == product.ProductVariantKey);
    

    }

    Cant find catalog

Please Sign in or register to post replies

Write your reply to:

Draft