Page 8 of 14 FirstFirst ... 678910 ... LastLast
Results 71 to 80 of 138
  1. #71
    Join Date
    Jan 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Add a field into create account

    Quote Originally Posted by mnemos View Post
    Works like a charm. Added 2 fields, they populate the database. How do I get them in to show up in invoice???
    Can't edit ... Little snag also: while from the signup it all works, editing the new data from the admin area seems to get the data lost. Any ideas?

  2. #72
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Add a field into create account

    and no one bothers to answer the question about displaying the Tax ID in the invoice?

  3. #73
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,826
    Plugin Contributions
    31

    Default Re: Add a field into create account

    Hi,
    to display the taxid in the invoice either you can edit the ordering code so the taxid is included in the order information posted to the order table (would be better in future zen core) or you can get the taxid from customer table using the customer info from the order info as the reference.
    I found the code for the second option by accident and I preferred it as it leaves the base code intact.

    So, in admin/invoice.php add this query at line 28

    $oID = zen_db_prepare_input($_GET['oID']);
    //THESE LINES ADDED TO GET INFO FROM CUSTOMERS TABLE
    $sql = "SELECT o.customers_id, c.customers_taxid from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c WHERE c.customers_id= o.customers_id and o.orders_id = '" . $oID . "'";
    $chk_customers_taxid = $db->Execute($sql);
    $customers_taxid = $chk_customers_taxid->fields['customers_taxid'];

    so now you can use the $customers_taxid variable where you want, for example in one of the table cells
    <?php echo ENTRY_TAXID_NUMBER; ?></b><?php echo ' ' . $customers_taxid; ?>

    regards
    Steve

  4. #74
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Add a field into create account

    thank you very much steve/torvista, that worked

    but there's one more problem - tax id is now 'always on'

    for my purposes (and I presume many others) it would be ideal if taxid would show up in the invoice only when company name is displayed

    I have managed to make zc display Tax ID line in create account only when company name is set to 'true' in admin-configuration-customer details

    and it was simple: just added this to create_account.php

    if (ACCOUNT_COMPANY == 'true') $taxid = zen_db_prepare_input($_POST['taxid']);


    but I dont know how to do the same thing for the invoice

    any ideas?

  5. #75
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Add a field into create account

    bump...

  6. #76
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    234
    Plugin Contributions
    0

    Default Re: Add a field into create account

    I posted this back in Sept, but not had any response. It's a huge pain for us, so I was really hoping someone had an idea.

    I've got a bit of a weird problem. The field added very easily and the instructions were great.

    However, I added my field right below the phone and fax numbers called "customsid". When a customer does not fill in his fax number (which is not required) but fills in this customsid, in admin it shows the customs id in the fax field. If he fills in the fax field, then it puts it in the correct place.

    Any ideas what I did wrong? Either way I get the number, but I have to manually move it down to the customs id box from Admin and it's huge pain.



    This is where it puts it in the admin when they don't fill out the fax number and we have to manually cut and paste it into the correct field.

    Thanks, Colleen
    www.af-company.com
    To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

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

    Default Re: Add a field into create account

    Hi I had a similar mix up problem, to fix it go into admin/tools/developers tool box, go to the bottom where it says "look up in all files" and type in "Your field Name", ie: customsid select all files catalogue/admin and you should get a long list of files with that name included, when it comes up carefully check all the lines of code with your fieldname in and make sure that customers_fax is not mixed up anywhere in your customsid lines of code and vise versa.

    Good luck and hope you fix it !

    Cheers
    J#xx
    (Scott Perry)

  8. #78
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    234
    Plugin Contributions
    0

    Default Re: Add a field into create account

    Thank you so much Scott!! That worked. Really need to pay more attention when doing these things!!
    Thanks, Colleen
    www.af-company.com
    To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

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

    Default Re: Add a field into create account

    No problem !, glad it works !

    Cheers
    J#xx
    (Scott Perry)

  10. #80
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: Add a field into create account

    I changed 'fax' to "company description" and moved it up the create account page

    But it echo's in a one line text field, but I want it to echo in a multiline text area, or just eco as text in the admin customers information.

    For the create account page, I just changed;

    <?php echo zen_draw_input_field('fax', '', 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>

    to

    <textarea name="fax" id="fax"></textarea>

    and this send the information fine, but when it is viewed in the admin customers information, is shows in a small one line box


    anyone know how to echo it in a multiline text area, or just echo in the customers information as text


    PHP Code:
     <tr>
    <td class="main"><?php echo 'Tax ID:'?></td>
    <td class="main">
    <?php
    if ($processed == true) {
    echo 
    $cInfo->customers_taxid zen_draw_hidden_field('customers_taxid');
    } else {
    echo 
    zen_draw_input_field('customers_taxid'$cInfo->customers_taxidzen_set_field_length(TABLE_CUSTOMERS'customers_taxid'15));
    }
    ?>
    </td>

 

 
Page 8 of 14 FirstFirst ... 678910 ... LastLast

Similar Threads

  1. How do I add a custom pulldown field to create account page?
    By margarita in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 May 2008, 07:48 PM
  2. add a field to "create account"
    By bobio in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 26 Jan 2008, 07:35 AM
  3. Create account Form field allign
    By manfer72 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Jan 2008, 12:01 AM
  4. Create a requested field in registration account
    By rosponina in forum Managing Customers and Orders
    Replies: 6
    Last Post: 31 Jul 2006, 09:15 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