Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 Apr 2021 12:54 AM by  Rutledge Scarborough
Using Company Name from DNN
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages


New Member


Posts:32
New Member


--
23 Apr 2021 07:47 PM

    In the MultipleStepCheckout display template, how can we load the company name from DNN profile as the default company name on billing and shipping address? 
    I know how to access the company name in Razor. I am not sure how to use the value as a default, but not use it when the customer enters their own value, or loads a stored adsress. 

    Thanks

     

    0


    New Member


    Posts:32
    New Member


    --
    29 Apr 2021 12:54 AM
    I figured out a way to handle this. I was able to load the company name from the DNN profile using DNN Sharp My Tokens. I added a Razor function to the template to get the company name.

    and then I replaced this line:
    this.viewModel.SalesOrderSet.ShippingCompany(this.viewModel.DefaultShippingCompany())
    with this:
    this.viewModel.SalesOrderSet.ShippingCompany('@Html.Raw(StoreName())')

    This appears to work correctly.
    0
    You are not authorized to post a reply.