Exemple #1
0
        public virtual Product ToLiquidProduct(storefrontModel.ProductAssociation productAssociation)
        {
            var result = productAssociation.Product.ToShopifyModel();

            result.Tags                = productAssociation.Tags?.ToArray();
            result.AssociationType     = productAssociation.Type;
            result.AssociationQuantity = productAssociation.Quantity;
            return(result);
        }
 public static ProductAssociation ToWebModel(this VirtoCommerceCatalogModuleWebModelProductAssociation association)
 {
     var retVal = new ProductAssociation();
     retVal.InjectFrom<NullableAndEnumValueInjecter>(association);
     retVal.ProductImage = new Image() { Url = association.ProductImg };
     retVal.ProductName = association.ProductName;
     retVal.ProductSku = association.ProductCode;
     return retVal;
 }
Exemple #3
0
        public static Product ToShopifyModel(this storefrontModel.ProductAssociation productAssociation)
        {
            var converter = new ShopifyModelConverter();

            return(converter.ToLiquidProduct(productAssociation));
        }