Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 10 of 10

Thread: Creat Account Page

  1. #1
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default Creat Account Page

    I want to add the field called 'Company' (from Billing/Shipping Address) to Account & Contact Info below *Your Last Name and make it a required (*) field. What modifications do I need to do?

    Likewise, I want to add the same field in the Admin Account & Contact Info page. Let me know. Thanks.

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    I'm sure there's already a Company field on the Address panel. What version are you on? If you're referring to anything other than what's out of the box, please attach a screen shot for clarity. Let's start from here.

  3. #3
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default

    Version: ML 8.0.0.0/8.0.0.0

    I know there is a Company field on the Address panel but I want to add a new one called 'Company Name' and store it in the Customer Table and make the field as required. I want to do the same in the Admin Accounts page as well. What changes I have to make? Thanks.

  4. #4
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Sure, this is possible. First, you'll have to add/insert a column to the Address table, say CompanyName. Then add a textbox control to the createaccount.aspx, then modify its code-behind file accordinly (look for ShippingCompany and BillingCompany for reference). You also will need to modify the class to add this field: Address.cs.

  5. #5
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default

    I added a new column and a text box control. What next? How do I store the value in the Customer table? Which Stored Procedure I need to change?

  6. #6
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    There's no stored procedure that does the update or entry on the Address table. If you have the source code, simply modify the InsertDB, UpdateDB, DeleteFromDB methods on the Address.cs. You will also need to insert lines for that field on the createaccount.aspx.cs. See Shipping and Billing Address manipulation for reference...

  7. #7
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default

    I have added a new column in the Customer table, not Address. So what changes I have to make?

  8. #8
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Well, if that's the case, here are the stored procedures that you need to update also:

    aspdnsf_insCustomer
    aspdnsf_updCustomer
    aspdnsf_updCustomerByEmail

    CreateAccount function of the createaccount.aspx.cs

    Following methods on the Customer.cs
    CreateCustomerRecord
    UpdateCustomer
    UpdateCustomerStatic

  9. #9
    sohan is offline Member
    Join Date
    Jun 2009
    Posts
    33

    Default Hi! Company as required field

    I am newbie.
    How can I make Billing and Shipping Company as required fields like we do have for Phone, First Name in createaccount.aspx.cs?

    FYI, I have source code.
    Thank you in advance.

    Sohan

  10. #10
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Simply add a RequiredFieldValidator control next to those fields and that should do it...