How to make some billing address fields pre-filled?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 年 前
hi everybody from russia.

i have nc 3.90

i find the following code in the \Views\Shared\_CreateOrUpdateAddress.cshtml


@if (Model.CountryEnabled && Model.StateProvinceEnabled)
    {
        <div class="inputs">
            @Html.LabelFor(model => model.StateProvinceId, new { }, ":")
                @Html.DropDownListFor(model => model.StateProvinceId, Model.AvailableStates)
            <span id="states-loading-progress" style="display: none;" class="please-wait">@T("Common.Wait...")</span>
            @Html.ValidationMessageFor(model => model.StateProvinceId)
        </div>
    }
    @if (Model.CityEnabled)
    {
        <div class="inputs">
            @Html.LabelFor(model => model.City, new { }, ":")
                @Html.EditorFor(model => model.City)

            @if (Model.CityRequired)
            {
                @Html.RequiredHint()
            }
            @Html.ValidationMessageFor(model => model.City)
        </div>
    }

@if (Model.StreetAddressEnabled)
    {
        <div class="inputs">
            @Html.LabelFor(model => model.Address1, new { }, ":")
                @Html.EditorFor(model => model.Address1)
            @if (Model.StreetAddressRequired)
            {
                @Html.RequiredHint()
            }
            @Html.ValidationMessageFor(model => model.Address1)
        </div>
    }

@if (Model.ZipPostalCodeEnabled)
    {
        <div class="inputs">
            @Html.LabelFor(model => model.ZipPostalCode, new { }, ":")
                @Html.EditorFor(model => model.ZipPostalCode)
            @if (Model.ZipPostalCodeRequired)
            {
                @Html.RequiredHint()
            }
            @Html.ValidationMessageFor(model => model.ZipPostalCode)
        </div>
    }


i want to pre-fill some fields in billing address in order to skip them, i tried to ask before and no one could help me unfortunately.

can some one explain me please, what do I have to write in this code to pre-fill them? how do I write?

for countries i want to pre-fill "RUSSIA" and state "MOSCOW"
@Html.LabelFor(model => model.StateProvinceId, new { }, ":")
                @Html.DropDownListFor(model => model.StateProvinceId, Model.AvailableStates)


for other input fields i want to pre-fill "—"
@Html.LabelFor(model => model.Address1, new { }, ":")
                @Html.EditorFor(model => model.Address1)


i do very hope that some one eventually helps me with this.

PS. i find nopcommerce to be a very good ecommerce solution but there is only one thing that makes it awful at the same time: it doesn't have any plugins or solution for checkout process for russian market. it is stupid as hell. why do people have to enter their address and info if they want just pick-up for example?

i hope that nopcommerce community will provide some easy and smart process for russian ecommerce stores. it would be nice to make it the following way:

1. guest adds items to the cart

2. clicks checkout

3. there is two options: pick-up or shipping

3.1. if pick-up is selected then guest selects payment in store by cash or payment in store by card or other then he puts only his name, e-mail and phone number and confirms the order

3.2. if shipping is selected then guest puts all his info like name, address, country, state, city and etc and the chooses shipping and payment methods and then confirms the order


this way would be a very nice checkout experience for russian ecommerce sites
3 年 前
Yes I understand your requirement - I need something similar and will develop it soon
But I did not get a chance try the last suggestions for disabling the fields as detailed here.
https://www.nopcommerce.com/en/boards/topic/88853/how-to-skip-some-of-billing-address-input-fields-i-need-to-make-them-unnecessary
You said "I tried this and unfortunately it doesn't work :("
Was there more info as to why what was the problem - what did not work ??
3 年 前
RE: "why do people have to enter their address and info if they want just pick-up for example?"
Because you're still using 3.90.  In 4.x versions, pickup in store  does not require entering a shipping address.
3 年 前
New York wrote:
RE: "why do people have to enter their address and info if they want just pick-up for example?"
Because you're still using 3.90.  In 4.x versions, pickup in store  does not require entering a shipping address.


No! I tried in 4.30 it is the same! There is only checkbox for SHIP to the same address. Or how to do it?
3 年 前
New York wrote:
RE: "why do people have to enter their address and info if they want just pick-up for example?"
Because you're still using 3.90.  In 4.x versions, pickup in store  does not require entering a shipping address.


you are a great lier. there is not such function. you cannot set pickup point at the beginning in the guest checkout. i don't know what you are doing in this forum, you are not going to help anyone i think. are you being here just to laugh on people's issues?
3 年 前
New York wrote:
RE: "why do people have to enter their address and info if they want just pick-up for example?"
Because you're still using 3.90.  In 4.x versions, pickup in store  does not require entering a shipping address.


ineed, I have glanced on your web-site NOPTOOLS.COM

your site looks like a piece of shit, i am being honest with you. what are you doing in this forum? your  own site looks like shit and you are giving advices here ?

look to your site: https://prnt.sc/viqu1k

i think you don't have any rights to give advices to people when your own website is buggy and awful

hope you won't reply anything
3 年 前
New York is one of the most helpful and knowledgeable individuals on this forum.  Best of luck to you getting help from anyone else.
3 年 前
arthur_shneider wrote:
...There is only checkbox for SHIP to the same address. ...

Yes, and if you unselect that checkbox, and enter the billing address, when you Continue to the next page, you will see the checkbox for "Pickup".  This assumes that you have the Pickup In Store plugin installed, and Active, and have configured at least one pickup point.
It works the same way whether you are a registered customer or a guest.
(You won't see it work in the online demo, because they
must not have it installed/active/configured.  You will see it configured in the admin demo, but it's not the same site.  I don't know why the nopCommerce team set it up that way; it's been mentioned here in the forums a few times before.)

I provide the best answers here that I can.  Occasionally, I'm wrong, but I've got no reason to be a "liar".
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.