Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Can someone Upgrade This

    http://www.zen-cart.com/archived_con...taxid_v1.0.zip

    Ive been playing around for 2 hours now and i cant get it to work

    The Admin Edits worked and i got under Admin Customer

    Company
    Company name:
    Tax ID Number: * Required


    But i cant get it under Create Account
    Last edited by CnTGifts; 8 Apr 2007 at 03:19 AM.

  2. #2
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Re: Can someone Upgrade This

    Ok i got it under the customer creat account page

    BUT

    When i create account and input a TAX ID Number, it dont show o nthe admin side, just a blank box

  3. #3
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Re: Can someone Upgrade This

    This is what i have in tpl_modules_create_account

    <fieldset>
    <legend><?php echo CATEGORY_COMPANY; ?></legend>
    <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY; ?></label>
    <?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
    <label class="inputLabel" for="taxid"><?php echo ENTRY_TAXID; ?></label>
    <?php echo zen_draw_input_field('taxid', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_taxid', '40') . ' id="taxid"') . (zen_not_null(ENTRY_TAXID_TEXT) ? '<span class="alert">' . ENTRY_TAXID_TEXT . '</span>': ''); ?>
    </fieldset>

    This is What i did in Admin/customers.php

    IN THE FILE - admin/customers.php
    --------------------------------------------------------
    FIND

    if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) {
    error_message = error_message + "<?php echo JS_EMAIL_ADDRESS; ?>";
    error = 1;
    }

    ADD THIS AFTER

    if (entry_taxid == "" || entry_taxid.length < <?php echo ENTRY_TAXID_MIN_LENGTH; ?>) {
    error_message = error_message + "<?php echo JS_TAXID; ?>";
    error = 1;
    }

    --------------------------------------------------------
    FIND

    <?php
    if ($error == true) {
    if ($entry_company_error == true) {
    echo zen_draw_input_field('entry_company', $cInfo->entry_company, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', 50)) . '&nbsp;' . ENTRY_COMPANY_ERROR;
    } else {
    echo $cInfo->entry_company . zen_draw_hidden_field('entry_company');
    }
    } else {
    echo zen_draw_input_field('entry_company', $cInfo->entry_company, zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', 50));
    }
    ?></td>
    </tr>

    ADD THIS AFTER

    <tr>
    <td class="main"><?php echo ENTRY_TAXID; ?></td>
    <td class="main">
    <?php
    if ($error == true) {
    if ($entry_taxid_error == true) {
    echo zen_draw_input_field('entry_taxid', $cInfo->entry_taxid, 'maxlength="25"') . '&nbsp;' . ENTRY_TAXID_ERROR;
    } else {
    echo $cInfo->entry_taxid . zen_draw_hidden_field('entry_taxid');
    }
    } else {
    echo zen_draw_input_field('entry_taxid', $cInfo->entry_taxid, 'maxlength="25"', true);
    }

    ?> </tr>

    ----------------------------------------------------
    FIND

    $entry_country_id = zen_db_prepare_input($_POST['entry_country_id']);

    ADD THIS AFTER

    $entry_taxid = zen_db_prepare_input($_POST['entry_taxid']);

    --------------------------------------------------
    FIND

    'entry_country_id' => $entry_country_id);

    AND REPLACE WITH

    'entry_country_id' => $entry_country_id,
    'entry_taxid' => $entry_taxid);

    if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_taxid'] = $entry_taxid;

    ------------------------------------------------
    FIND

    a.entry_company, a.entry_street_address, a.entry_suburb,

    AND REPLACE WITH


    a.entry_company, a.entry_taxid, a.entry_street_address, a.entry_suburb,

    -----------------------------------------------
    FIND:

    case "company":
    $disp_order = "a.entry_company";
    break;
    case "company-desc":
    $disp_order = "a.entry_company DESC";
    break;

    ADD THIS AFTER:

    case "taxid":
    $disp_order = "a.entry_taxid";
    break;
    case "taxid-desc":
    $disp_order = "a.entry_taxid DESC";
    break;
    -----------------------------------------------------
    FIND:
    <td class="dataTableHeadingContent" align="left">
    <?php echo (($_GET['list_order']=='company' or $_GET['list_order']=='company-desc') ? '<span class="SortOrderHeader">' . TABLE_HEADING_COMPANY . '</span>' : TABLE_HEADING_COMPANY); ?><br>
    <a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=company', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='company' ? '<span class="SortOrderHeader">Asc</span>' : '<span class="SortOrderHeaderLink">Asc</b>'); ?></a>&nbsp;
    <a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=company-desc', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='company-desc' ? '<span class="SortOrderHeader">Desc</span>' : '<span class="SortOrderHeaderLink">Desc</b>'); ?></a>
    </td>

    ADD THIS AFTER:
    <td class="dataTableHeadingContent" align="left">
    <?php echo (($_GET['list_order']=='taxid' or $_GET['list_order']=='taxid-desc') ? '<span class="SortOrderHeader">' . TABLE_HEADING_TAXID . '</span>' : TABLE_HEADING_TAXID); ?><br>
    <a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=taxid', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='taxid' ? '<span class="SortOrderHeader">Asc</span>' : '<span class="SortOrderHeaderLink">Asc</b>'); ?></a>&nbsp;
    <a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=taxid-desc', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='taxid-desc' ? '<span class="SortOrderHeader">Desc</span>' : '<span class="SortOrderHeaderLink">Desc</b>'); ?></a>
    </td>

    -----------------------------------------------------
    FIND:
    $new_fields=', c.customers_telephone, a.entry_company, a.entry_street_address, a.entry_city, a.entry_postcode, c.customers_authorization, c.customers_referral';

    IN-LINE FIND:
    a.entry_company,

    ADD AFTER:
    a.entry_taxid,

    -----------------------------------------------------
    FIND:
    $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, a.entry_country_id, a.entry_company, ci.customers_info_date_of_last_logon, ci.customers_info_date_account_created " . $new_fields . " from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_INFO . " ci on c.customers_id= ci.customers_info_id left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by $disp_order";

    IN-LINE FIND:
    a.entry_company,

    ADD AFTER
    a.entry_taxid,

    -----------------------------------------------------

    FIND:

    <td class="dataTableContent"><?php echo $customers->fields['entry_company']; ?></td>

    ADD THIS AFTER:

    <td class="dataTableContent"><?php echo $customers->fields['entry_taxid']; ?></td>




    Can someone please help

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can someone Upgrade This

    Who owns the taxid? The customer or the customer's address?

    As in I have 1 customer record but 7 addresses ...

    Who owns the TAXID?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Re: Can someone Upgrade This

    its a tax id for the customer, its what they get so they can sell or resell products

    See here

    http://www.wholesaledirectgifts.com/...action=process

    That and the Admin Tax ID field arent working together

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can someone Upgrade This

    If the taxid belongs to the customer then the taxid belongs in the customers table and not the address_book table ...

    It looks like you have put the field in the address_book table vs the customers table ...

    That means if I am the customer and have 7 addresses then I can have 7 taxid numbers ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Re: Can someone Upgrade This

    I did whatever the instuctions of that mod above told me to

    ALTER TABLE zen_address_book ADD COLUMN entry_taxid varchar(10) NOT NULL default '' AFTER entry_zone_id;

    #
    # Table structure for table `zen_configuration`
    #

    INSERT INTO zen_configuration VALUES ('', 'Minimum Tax ID Number Length', 'ENTRY_TAXID_MIN_LENGTH', '0', 'min length of Tax ID number', 1, 3, '2004-10-15 13:27:30', '0000-00-00 00:00:00', NULL, NULL);


    What can i do to make it work, with the coding i have done??

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can someone Upgrade This

    Personally I do not know if that is the solution for you ...

    You have to decide if the customer owns the taxid or the customers address ...

    Advantage if customer owns the taxid there can be only one ... disadvantage what if I want to shop personally where I do not have a taxid and what if I want to shop for my business where my taxid can be used ...

    Advantage if the address_book owns the taxid I can have my personal address without a taxid and my business address with a taxid ... disadvantage I have to remember to switch between the addresses and not mix them up ...

    This is a business decision that you may wish to discuss with your accountant to see which is better for your business ...

    As to how to fix all of this based on what you have ... I would literally need to sit down with the code and write or fix the errors ... and at the moment I do not have the free time for it and cannot see the obvious errors just reading the screen ...

    If you add the taxid in the create account ... is the data in the database?

    If you edit the account in the catalog ... is the data on the screen when you hit edit?

    If you see it and hit update ... is it still in the database?

    If you hit edit again, does it still appear on the screen?

    When you look in the admin ... are you seeing it in the listing of the customer information on the customers.php page?

    If you hit edit does it vanish?

    If you hit update does it clear the data out of the database?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Re: Can someone Upgrade This

    I just want a customer to input there tax id, so it belongs t othe customer not the address.

    If i add the data i nthe admin side under a customer, the data sticks.

    But when creating a naccoutn and entering i nthe tax id number, it dont hsow up in the admin

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can someone Upgrade This

    Type slowly ...

    Are you saying that a given customer as in customers_id 32 can have exactly 1 taxid and that this is associated with his customers account and does not take into account his address_book?

    If this is correct then you are using the wrong database ...

    You appear to be storing the data to the customer's address_book table (many records per customer) and not to the customers table (1 record per customer) ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Can someone tell me what add on was used on this site to create this zoom effect?
    By strugglingnovice in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jun 2010, 10:59 PM
  2. can someone upgrade for me??
    By vik007 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 28 Jun 2009, 12:22 AM

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