Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2014
    Location
    Los Angeles, CA
    Posts
    4
    Plugin Contributions
    0

    help question NOT Displaying Country on Customer Address(es)

    Hi!

    I do not know if this has been talked in the forum. If it has, then please give me the link to that thread.

    Below is my problem:
    1. Do not display the country information in "Step 1 of 3 - Delivery Information" page.
    2. Do not display the country information in "Change the Shipping Address" page and also under the "Or Choose From Your Address Book Entries" list of other addresses.
    3. Do not display the country information in "Step 2 of 3 - Payment Information" page.
    4. Do not display the country information in "Change the Billing Information" page and also under the "Or Choose From Your Address Book Entries" list of other addresses.
    5. Do not display the country information in "Step 3 of 3 - Order Confirmation" page.

    I tried to customize or modify a copy of the "functions_customers.php" "zen_address_label" function and take out the "entry_country_id". But when I ran the update, it broke the checkout page.

    Which function should I go to exclude the country information from being displayed?

    Thanks,

    Ben

    Sample Screenshot below:

    Name:  Actual Screenshot.jpg
Views: 161
Size:  41.5 KB

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: NOT Displaying Country on Customer Address(es)

    I'd guess you would have to modify several template files to do that. An explanation of why you want that information not to display would possibly help someone come up with another solution.

  3. #3
    Join Date
    Jul 2014
    Location
    Los Angeles, CA
    Posts
    4
    Plugin Contributions
    0

    Default Re: NOT Displaying Country on Customer Address(es)

    Stevesh, the only reason why I need to do this is that my boss just wants me to take it out.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: NOT Displaying Country on Customer Address(es)

    Hmmm - The sort of thing that led me to swear off bosses years ago.

    The best I can offer is to suggest that you use the Admin - Tools - Developers Tool Kit to search for country_id for a list of module and template files which contain it.

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

    Default Re: NOT Displaying Country on Customer Address(es)

    You could change the address_format table but then you would affect Canada as well ...

    You could add a new address_format and setup Canada and the US to use their own, unique formats but you would need to update the countries table to use the new address_format_id for which ever country you make the new address format for ...
    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!

  6. #6
    Join Date
    Jul 2014
    Location
    Los Angeles, CA
    Posts
    4
    Plugin Contributions
    0

    Default Re: NOT Displaying Country on Customer Address(es)

    Ajeh, I am actually leaning towards that. My thoughts is that I just backup the original "functions_customers.php" and in the "functions_customers.php" copy, I will just add my new functions that would facilitate query and displaying of the address(es). Then I just need to direct the address function calls to the new function in the "tpl_checkout_shipping_default.php" and "tpl_checkout_shipping_address_default.php". This approach will have a lower risk of causing the cart to fail, I hope!
    I may have to modify other PHP files but so far these are the only ones I see that need to be modified.
    I will let you know how it goes.
    Thanks again.

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

    Default Re: NOT Displaying Country on Customer Address(es)

    I am not sure what else may need to be changed without testing, but you can try changing the file:
    /includes/functions/functions_customers.php

    and add the code in RED:
    Code:
        if ($country == '') {
          if (is_array($address['country'])) {
            $country = zen_output_string_protected($address['country']['countries_name']);
          } else {
          $country = zen_output_string_protected($address['country']);
          }
        }
        // bof: turn off country for matching country
        if ($address['country_id'] == STORE_COUNTRY) {
          $country = '';
        }
        // eof: turn off country for matching country
        if ($state != '') $statecomma = $state . ', ';
    Then try a making a test cart and check the Shipping Estimator, checkout_blah_pages, Admin orders, My Account pages and see if this one change manages everything on new orders ...

    I am thinking this is not going to manage everything off the top of my head and that perhaps the new address_format on Canada and editing the address_format used for the United States might be the better choice ...

    But, again, I have not tested this to tell you what all might need to be done ...
    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!

  8. #8
    Join Date
    Jul 2014
    Location
    Los Angeles, CA
    Posts
    4
    Plugin Contributions
    0

    Default Re: NOT Displaying Country on Customer Address(es)

    Thanks for the input. I will update this post when I get it done. Got another task to do.

 

 

Similar Threads

  1. v139h PayPal shipping address country will change to other country problems.
    By explorer1979 in forum General Questions
    Replies: 0
    Last Post: 18 Feb 2014, 02:42 AM
  2. v151 Getting/Displaying the Customer's Country
    By ultimate_zc in forum General Questions
    Replies: 7
    Last Post: 9 Feb 2014, 09:41 PM
  3. Replies: 1
    Last Post: 4 Nov 2009, 11:31 PM
  4. Change the Shipping Address -> Country not working
    By PET in forum General Questions
    Replies: 4
    Last Post: 18 Mar 2008, 08:42 PM
  5. Country dropdown - some countries not displaying
    By sparklefish in forum General Questions
    Replies: 3
    Last Post: 13 Jan 2007, 06:56 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