Inhalte aufrufen

Profilbild

orders.liquid file not using product.ManufacturerPartNumber field


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
1 Antwort zu diesem Thema

#1 altmoola

altmoola

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 66 Beiträge

Geschrieben: 26 October 2019 - 00:18

I'm attempting to customize the orders.liquid template file to include the manufacturer part number. I've already changed the entities that I believe are associated to this template (OrderItemModel) but the generated email simply leaves that field blank. It seems like the field is not available when DotLiquid runs the file, but it's definitely there. Any help is appreciated.

 

    public partial class OrderItemModel : EntityModelBase
    {
        public OrderItemModel()
        {
            BundleItems = new List<BundleItemModel>();
        }

        public string Sku { get; set; }
        public int ProductId { get; set; }
        public LocalizedValue<string> ProductName { get; set; }
        public string ProductSeName { get; set; }
        public string ProductUrl { get; set; }
        public ProductType ProductType { get; set; }
        public string UnitPrice { get; set; }
        public string SubTotal { get; set; }
        public int Quantity { get; set; }
        public string QuantityUnit { get; set; }
        public string AttributeInfo { get; set; }
        public bool BundlePerItemPricing { get; set; }
        public bool BundlePerItemShoppingCart { get; set; }
        public PictureModel Picture { get; set; }

        public IList<BundleItemModel> BundleItems { get; set; }
        public string ManufacturerPartNumber { get; set; }
    }


#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3801 Beiträge

Geschrieben: 28 October 2019 - 14:50

The liquid parameters are provided by model parts, see here.
Own custom parameters can be added to a model part by MessageModelPartCreatedEvent, see this line.

Marcus Gesing

Smartstore AG