Thread: Add new field

Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Add new field

    Hi, after a fair while i've managed to get some new fields in my login form and they show up in the admin section as well, they store the data entered and display's it in admin and in edit my account. Sweet !, however if I attempt to edit these fields either in my account or in admin/customers the fields go blank. What's happening to make them blank out. is it something on the SQL side as I copied the code for the fax number and modified it to my field names. the fax number changes appear but not my fields ??

    Cheers
    J#xx
    (Scott Perry)

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Add new field

    Hoping you have a test or develpoment install...

    While poking around on another mission I stumbled upon a module that might be your answer....read carefully the instructions, install on a dev site to determine how it does or does not work,,,,happy coding

    http://www.zen-cart.com/index.php?ma...roducts_id=587

  3. #3
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Add new field

    Hi thanks for the advice and the add-on, i'll look into into it how about the blank feilds after an edit. Do you think it's a code based problem or a DB one ?

    Nearly there !! - phew !

    Cheers
    J#xx
    (Scott Perry)

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Add new field

    Quote Originally Posted by J#xx View Post
    however if I attempt to edit these fields either in my account or in admin/customers the fields go blank. What's happening to make them blank out. is it something on the SQL side as I copied the code for the fax number and modified it to my field names. the fax number changes appear but not my fields ??
    You've probably incorrectly set defaults on the inputs, either for processing the submitted data, or when retrieving the data from the database.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Add new field

    Hi,

    "You've probably incorrectly set defaults on the inputs, either for processing the submitted data, or when retrieving the data from the database. "

    Would this be in the php code or the DB ?

    Cheers
    J#xx
    (Scott Perry)

    It's so close I can almost taste it !

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Add new field

    I was referring to your PHP code.

    I can't be much more specific because you haven't indicated *when* the information gets wiped out.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Add new field

    Hi, I thought I described it as it is, Log-in, enter data, data stored, go to admin/account, data appears, edit it's lost, go to edit my account information, edit a field, data lost ....
    go to admin/customer edit a data field, data lost !

    For some reason, every time the initial data is changed from the initial register account, the data get's lost ! does that help ?

    Cheers
    J#xx
    FFS

    If we can get this thing working exactly it could be an excellent mod for zencart in general.
    Last edited by J#xx; 3 Feb 2009 at 10:19 PM.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Add new field

    Quote Originally Posted by J#xx View Post
    Hi, I thought I described it as it is, Log-in, enter data, data stored, go to admin/account, data appears, edit it's lost, go to edit my account information, edit a field, data lost ....
    go to admin/customer edit a data field, data lost !

    For some reason, every time the initial data is changed from the initial register account, the data get's lost ! does that help ?
    Sounds like wherever you're reading the POST field data you're either wiping it out or you're not actually storing the collected updates and it's storing blank data instead.
    So either your parsing of POST inputs is wrong, or whatever variables you're passing to the code that stores the data to the database are wrong or blank. Maybe you need to check all the data to see what you're collecting and what you're writing, and figure out what's causing the difference.


    Quote Originally Posted by J#xx View Post
    If we can get this thing working exactly it could be an excellent mod for zencart in general.
    Have fun supporting it!
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Dec 2008
    Location
    Uk
    Posts
    79
    Plugin Contributions
    0

    Default Re: Add new field

    Hi, So far so good, I've got the admin side working and the login side working, they both exchange information correctly but its just the my account/edit my account details section that's causing the trouble.

    The data apprears in the relevant fields as entered from either login or admin, but if I edit a field from the my account sectionand click update, it blanks the fields in every section including the DB.

    I've checked the code a million times and looked at every page that references the "fax" field from the DevToolKit but it won't have it. any ideas as to a cure for the fields becoming blank ?

    Cheers
    J#xx
    (Scott Perry)

 

 

Similar Threads

  1. should I add new table to store new field?
    By linjuming in forum General Questions
    Replies: 4
    Last Post: 21 Feb 2013, 06:35 PM
  2. v151 Add a new field to Customers Information
    By jazzyman in forum General Questions
    Replies: 3
    Last Post: 17 Jan 2013, 01:32 PM
  3. Add new product field
    By dannyd in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Mar 2009, 10:14 AM
  4. add new field to products_table
    By webhie in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 5 Sep 2006, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg