If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 1.5.x / Country not recoginzed in My Account Edit menu

Country not recoginzed in My Account Edit menu

Started by peace_freak on 9 May 2013, 4:01 PM · Views: 672

Results 1 to 2 of 2
9 May 2013, 4:01 PM
#1
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Post #1 by peace_freak

I am almost ready to put my store back online and have been checking to see if everything functions as it should...

I have discovered that in the My Account section, if a customer clicks on:

View or change entries in my address book.

and makes a change to their address then clicks the Update button, a warning comes up saying:

You must select a country from the Countries pull down menu.

Of course a country is selected in the pulldown menu. I tried choosing other countries but no go...

I have a two language store and tried the same for the Japanese side and get the same error message.

Does anyone have any idea on how I might resolve this?

10 May 2013, 9:04 AM
#2
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Post #2 by peace_freak

I have "sort of" fixed this problem by taking the country code from:
includes/templates/mytemplate/templates/tpl_modules_create_account.php

and copying it into:
includes/templates/mytemplate/templates/tpl_modules_address_book_details.php

I found that I also had to do the same for the State code.

The country popup works as it should but when updating any field, it is ALWAYS necessary to reselect the State from the State popup menu if the country is Japanese. I have never studied php so I don't know how to change the code so that if the State has been already chosen, the reselecting it is not needed.

I am pasting the code below. If someone wants to have a try at "fixing it" that would be awsome!

COUNTRY CODE:
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>

<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?> <br class="clearBoth" />

STATE CODE:

<?php if (ACCOUNT_STATE == 'true') { if ($flag_show_pulldown_states == true) { ?>

<label class="inputLabel" for="stateZone"><?php echo ENTRY_STATE; ?></label>

<?php echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"'); } ?>

<label class="inputLabel" for="state"><?php echo $state_field_label; ?></label>

<?php echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"' . $status_state_disabled); if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert">' . ENTRY_STATE_TEXT . '</span>'; if ($flag_show_pulldown_states == false) { echo zen_draw_hidden_field('zone_id', $zone_name); } ?> <br class="clearBoth" /> <?php } ?>