Copied to clipboard

Flag this post as spam?

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


  • ianhoughton 281 posts 605 karma points c-trib
    Jan 20, 2022 @ 09:04
    ianhoughton
    0

    Order editor config

    I'm trying to add Company to the shipping address section via a modified Order editor config following this

    My store in the backoffice is called "xxxx UK" and i can see the alias is xxxxUK, but when I name the config file xxxxUK.order.editor.config.js and add my new Company field to the shipping section i.e

    company: { alias: "shippingCompany", label: "Company" },

    It doesn't show in the sidebar, or the edit screen. A company value has been added to the order with:

    order.SetProperties(new Dictionary<string, string>
        {
            { "shippingCompany", shipToAddress.Company }
        });
    
  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 20, 2022 @ 09:11
    Matt Brailsford
    0

    Hi Ian,

    What version of Vendr are you using? I can see in the current code base we do have support for a billing / shipping company but I'm not quite sure when that was added or if it was there from the start.

    The billing / shipping address configs only support a set number of properties so it needs to be in a version that supports it, but in v2 at least, this should be supported.

  • ianhoughton 281 posts 605 karma points c-trib
    Jan 20, 2022 @ 09:15
    ianhoughton
    0

    Version 2.03

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 20, 2022 @ 09:25
    Matt Brailsford
    0

    Is this a fresh install? or an upgrade?

  • ianhoughton 281 posts 605 karma points c-trib
    Jan 20, 2022 @ 11:24
    ianhoughton
    0

    It's a fresh install, but it did have the Checkout plugin installed which has now been removed.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 20, 2022 @ 11:52
    Matt Brailsford
    0

    Hmm, that should be fine then.

    Have you tried changing some of the other config options to make sure the config is actually getting picked up?

  • Nelson Vicente 9 posts 29 karma points
    Mar 18, 2022 @ 18:20
    Nelson Vicente
    0

    Hi Matt,

    I'm having the same problem. I have a new property that is recorded in the order but does not appear in the backoffice.

    The configuration file is getting picked. Do I have to fill in the view property or another type of property?

    Version 2.1.1

    ex: roadNumber: { alias: "billingRoadNumber", label: "Road Number" }

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 21, 2022 @ 09:10
    Matt Brailsford
    0

    No a view isn't required as it will just default to a textbox.

    Can you share your entire editor config? And what version of Umbraco are you using?

  • Nelson Vicente 9 posts 29 karma points
    Mar 21, 2022 @ 09:14
    Nelson Vicente
    0

    Hi, i'm using umbraco 8 version 8.17.2

    {   
    orderLine: {
        properties: []
    },
    customer: {       
        telephone: { alias: "telephone", label: "Telephone" },
    },
    billing: {
        addressLine1: { alias: "billingAddressLine1", label: "Street Address Line 1" },       
        roadNumber: { alias: "billingRoadNumber", label: "Road Number" },
        floor: { alias: "billingFloor", label: "Floor", view: "Umbraco.TextBox" },
        zipCode: { alias: "billingZipCode", label: "Zip Code" },
        city: { alias: "billingCity", label: "City" },
        telephone: { alias: "billingTelephone", label: "Telephone" },
        // Country and Region are already known
    },
    shipping: {
        sameAsBilling: { alias: "shippingSameAsBilling", label: "Same as billing", trueValue: "1", falseValue: "0" },
        firstName: { alias: "shippingFirstName", label: "First Name" },        
        addressLine1: { alias: "shippingAddressLine1", label: "Street Address Line 1" },        
        roadNumber: { alias: "shippingRoadNumber", label: "Road Number", view: "Umbraco.TextBox"  },
        floor: { alias: "shippingFloor", label: "Floor", view: "Umbraco.TextBox" },
        zipCode: { alias: "shippingZipCode", label: "Zip Code" },
        city: { alias: "shippingCity", label: "City" },
        telephone: { alias: "shippingTelephone", label: "Telephone" },
        // Country and Region are already known
    },
    notes: {
        customerNotes: { alias: "comments", label: "Customer Comments" },
        deliveryNotes: { alias: "deliveryNotes", label: "Delivery notes", view: "Umbraco.TextBox"  },
        pickupTime: { alias: "pickupTime", label: "Pickup Time", view: "Umbraco.TextBox"  },
        internalNotes: { alias: "notes", label: "Internal Notes" }
    },
    additionalInfo: [
        { alias: "ipAddress", label: "IP Address", isReadOnly: true }
    ]
    

    }

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 21, 2022 @ 09:20
    Matt Brailsford
    0

    Ok, so your issue is that only orderliner.properties and additionalInfo support adding your onw entries to. All the other sections are fixed and the editor config is really just allowing you tell Vendr which properties those should be associated with.

    Auto laying out any possible combination of properties would just be nightmarish logic so we limit to only those 2 places.

  • Nelson Vicente 9 posts 29 karma points
    Mar 21, 2022 @ 09:23
    Nelson Vicente
    0

    Ok, thanks Matt

Please Sign in or register to post replies

Write your reply to:

Draft