How do i remove email required validation from Shipping Address? Please help me...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 anni tempo fa
How do i remove email required validation  from Shipping Address? Please help me...
9 anni tempo fa
I have same question. I think need to put into @Html.EditorFor(model => model.Email) some default value and hide this label. But I don't know how to do this(
9 anni tempo fa
Actually Shipping email is not used to notify anything.
So i commented shipping email validation code in ordercreation code.
9 anni tempo fa
Or Best way is to create separate model ,view and controller for shipping address and remove email address from shipping address.
9 anni tempo fa
<div class="inputs" style="display: none;">
        @Html.LabelFor(model => model.Email, new { }, ":")
              @Html.TextBoxFor(model => model.Email, new { Value = T("[email protected]") })
        @Html.RequiredHint()
        @Html.ValidationMessageFor(model => model.Email)
    </div>


That's it!
Yes new model and validating is better, but this way is faster) But in my case I need to remove email from everywhere, not only from shipping Address
9 anni tempo fa
yes that is also quick solution
9 anni tempo fa
[quote=shvager87]
<div class="inputs" style="display: none;">
        @Html.LabelFor(model => model.Email, new { }, ":")
              @Html.TextBoxFor(model => model.Email, new { Value = T("[email protected]") })
        @Html.RequiredHint()
        @Html.ValidationMessageFor(model => model.Email)
    </div>


Where do you make this change (for those programmers less apt as myself)? Please spell it out in simple steps. This method will not remove the email field from the billing address right? I need to have their email address, I just don't want them to have to put it in twice if they have a different billing and shipping address.
Thanks in advance.

Ryan Parks
8 anni tempo fa
shvager87 wrote:
<div class="inputs" style="display: none;">
        @Html.LabelFor(model => model.Email, new { }, ":")
              @Html.TextBoxFor(model => model.Email, new { Value = T("[email protected]") })
        @Html.RequiredHint()
        @Html.ValidationMessageFor(model => model.Email)
    </div>


That's it!
Yes new model and validating is better, but this way is faster) But in my case I need to remove email from everywhere, not only from shipping Address


I know this is an old thread, but I have a situation where we are processing many orders that are phoned in, and the customers are unwilling to provide their email address. Rather than be required to input a bogus email address for those phone orders, I'd like my employees to be able to skip that field altogether.

I'd like to be able to do something like you have done, (using CSS to hide the field) but only when the current user is in Admin role.

What I'm wondering is this....is the "isAdmin" variable exposed during registration/checkout? Or is there a variable that indicates the ACL role of the visitor which I could check for during registration/checkout?

Even better would be the ability to just remove the "required" validation based on customer role..possible?

Thanks,
Steve
8 anni tempo fa
Not sure why, but I can't edit my post...so here is a follow-up question:

Or maybe it is possible to just determine during registration/checkout whether an "impersonation" session is active?
6 anni tempo fa
We need other folks that require this enhancement to speak up..upvote my post and the work item at Github!!
https://github.com/nopSolutions/nopCommerce/issues/1534
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.