Disable ZipPostalCode required

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
Hi,

I would need to disable the "ZipPostalCode required" in the Shipping address (and some other address related as well) due to it is not application in my country.

By following the CheckoutShippingAddress.ascx, I am landing at AddressEdit.ascx, AddressEdit.ascx.sc and AddressEdit.ascx.designer.cs which is most relevant to my issue.

** In AddressEdit.ascx, it is now:
        <nopCommerce:SimpleTextBox runat="server" ID="txtZipPostalCode" ErrorMessage="<% $NopResources:Address.ZipPostalCodeIsRequired %>">
        </nopCommerce:SimpleTextBox>

then I change to
     <asp:TextBox ID="txtZipPostalCode" runat="server"></asp:TextBox>

Parser Error Message appeared upon running: The base class includes the field 'txtZipPostalCode', but its type (NopSolutions.NopCommerce.Web.Modules.SimpleTextBox) is not compatible with the type of control (System.Web.UI.WebControls.TextBox).

** Then I found in AddressEdit.ascx.designer.cs
which is defining "protected global::NopSolutions.NopCommerce.Web.Modules.SimpleTextBox txtZipPostalCode;"

I change it to "global::System.Web.UI.WebControls.TextBox txtZipPostalCode;"

But it seem that the code changed in AddressEdit.ascx.designer.cs has no effect.

My questions are:
1. Is this the right place to change the type of txtZipPostalCode?
2. How to have the "AddressEdit.ascx.designer.cs" get effective with changes made?

Thanks a lot!
14 лет назад
Just do it in Visual Studio. And don't forget to recompile the application
14 лет назад
Sorry, could you show me a bit more details? Do you means Build/Rebuild in VS 2008 for the AddressEdit.ascx?

Thanks a lots!
14 лет назад
look here
https://www.nopcommerce.com/boards/topic.aspx?topicid=3482
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.