Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / Error adding new shipping address

Error adding new shipping address

Locked

Views: 8,707

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
21 Feb 2007, 3:53 PM
#1
pezheads avatar

pezheads

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Error adding new shipping address

I'm really not sure when this problem started happening, but I'm guessing it happened when I upgraded to 1.3.7 a couple months ago. This is just the first time I've noticed it, and I'm not sure what to do to fix it. Basically, when a customer has created an account, and wants to create a new shipping address, after typing in all the relevant info and clicking Continue, the page reloads and says "You must select a country from the Countries pull down menu." and the Country drop-down is reset. So no one can create an additional shipping address. Has anyone else had this problem when upgrading to 1.3.7?

thanks.

21 Feb 2007, 5:45 PM
#2
flash avatar

flash

New Zenner

Join Date:
Mar 2004
Location:
Fort Collins, CO :: Play Hockey eh?!
Posts:
60
Plugin Contributions:
0

Re: Error adding new shipping address

FYI - I have the same problem.

There is a similar problem with State selection.

I'll do some forum searching and report back.

Anybody?

24 Feb 2007, 5:14 PM
#3
pezheads avatar

pezheads

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Error adding new shipping address

So, anyone besides me and Flash having this problem? Anyone know what needs to be done to correct it?

24 Feb 2007, 5:18 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Error adding new shipping address

Sounds like either you do not have all of the new files loaded from v1.3.7 or that your templates are not up to date ...

24 Feb 2007, 8:18 PM
#5
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: Error adding new shipping address

I'm having it too.
Any idea which files would affect this so I can check them?

Thanks,
Kelly

25 Feb 2007, 3:10 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Error adding new shipping address

There are a lot of files involved in the upgrade ...

It could be any number of things ...

You may wish to use Beyond Compare from scootersoftware.com which allows either a compare on your computer or via FTP to find what files are missing, different etc.

25 Feb 2007, 6:05 PM
#7
rabbcon avatar

rabbcon

Zen Follower

Join Date:
Dec 2006
Location:
Chicago, IL
Posts:
143
Plugin Contributions:
0

Re: Error adding new shipping address

I was having the exact same problem.

Let me outling my problem. (Our store is not live yet.) I could create a new customer account without experiencing a loop (taking me back to select a country). However, as an existing customer I could not update my address when it was time for me to check out. What I also noticed is that in the area to edit the address the state selection was no longer a drop down menu as it was when the account was created.

I narrowed it down to the tpl_modules_address_book_details.php.
**
Disclaimer:** PLEASE, PLEASE backup your site before you attempt my fix. I am using Zen Cart 1.3.7. I am not responsible for any site problems associated with this fix. It does work perfectly on my site. Again, please backup your site before you change your code to what I have changed my code to.

Now, I present to you, my fix...
**
BEFORE CODE IN THE TPL_MODULES_ADDRESS_BOOK_DETAILS.PHP FILE**

<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $entry->fields['entry_country_id'], '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" />

AFTER CODE IN THE TPL_MODULES_ADDRESS_BOOK_DETAILS.PHP FILE

<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php if ($process == true) $entry->fields['entry_country_id'] = (int)$_POST['country']; ?>
<?php echo zen_get_country_list('zone_country_id', $entry->fields['entry_country_id'], '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" />

**
What I added is this line of code:**

<?php if ($process == true) $entry->fields['entry_country_id'] = (int)$_POST['country']; ?>

For me, now there is no longer a loop and now the state is a drop down menu as it should be per my backend settings.

I hope that helps you and saves you time and energy. Please be so kind as to post your results.

Remember...
Disclaimer: PLEASE, PLEASE backup your site before you attempt my fix. I am using Zen Cart 1.3.7. I am not responsible for any site problems associated with this fix. It does work perfectly on my site. Again, please backup your site before you change your code to what I have changed my code to.

6 Mar 2007, 10:28 PM
#8
snarkys avatar

snarkys

Zen Follower

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

Re: Error adding new shipping address

Rabbcon:

I was having the exact same problem.

Let me outling my problem. (Our store is not live yet.) I could create a new customer account without experiencing a loop (taking me back to select a country). However, as an existing customer I could not update my address when it was time for me to check out. What I also noticed is that in the area to edit the address the state selection was no longer a drop down menu as it was when the account was created.

I narrowed it down to the tpl_modules_address_book_details.php.
**
Disclaimer:** PLEASE, PLEASE backup your site before you attempt my fix. I am using Zen Cart 1.3.7. I am not responsible for any site problems associated with this fix. It does work perfectly on my site. Again, please backup your site before you change your code to what I have changed my code to.

Now, I present to you, my fix...
**
BEFORE CODE IN THE TPL_MODULES_ADDRESS_BOOK_DETAILS.PHP FILE**

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

<?php echo zen_get_country_list('zone_country_id', $entry->fields['entry_country_id'], '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" /> ``` > > **AFTER CODE IN THE TPL_MODULES_ADDRESS_BOOK_DETAILS.PHP FILE** > ``` <label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label> <?php if ($process == true) $entry->fields['entry_country_id'] = (int)$_POST['country']; ?> <?php echo zen_get_country_list('zone_country_id', $entry->fields['entry_country_id'], '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" /> ``` > ** > What I added is this line of code:** > ``` <?php if ($process == true) $entry->fields['entry_country_id'] = (int)$_POST['country']; ?> ``` > > For me, now there is no longer a loop and now the state is a drop down menu as it should be per my backend settings. > > I hope that helps you and saves you time and energy. Please be so kind as to post your results. > > Remember... > **Disclaimer:** PLEASE, PLEASE backup your site before you attempt my fix. I am using Zen Cart 1.3.7. I am not responsible for any site problems associated with this fix. It does work perfectly on my site. Again, please backup your site before you change your code to what I have changed my code to.

anyone else tried this ?

I am also having this problem with 1.37 and a template i bought off template monster.

7 Mar 2007, 12:31 AM
#9
snarkys avatar

snarkys

Zen Follower

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

Re: Error adding new shipping address

i tried this fix with no luck : (

still get this message when trying to change the shipping address at checkout.

You must select a country from the Countries pull down menu

didn't seem to hurt anything though.

Using TemplateMonster template.

8 Mar 2007, 3:25 AM
#10
rabbcon avatar

rabbcon

Zen Follower

Join Date:
Dec 2006
Location:
Chicago, IL
Posts:
143
Plugin Contributions:
0

Re: Error adding new shipping address

snarkys:

... Using TemplateMonster template.

I think that is your problem! I purchased a template from Template Monster and I had to do so much hacking to get it to work. I did not search the forums before to see that they are not good to get for ZenCart. They look sexy but they never work w/o heavy modification.

I wish there was more I could offer you. I believe the fix is in those files I mentioned. It is just a matter of coding to get it right. You may want to use winmerge or beyond compare with the original Zen Cart 1.37 files but backup your files first.

8 Mar 2007, 7:16 PM
#11
snarkys avatar

snarkys

Zen Follower

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

Re: Error adding new shipping address

I was able to fix it by replacing some of the template files in the TM template with some from the default template of 1.37 : )

9 Mar 2007, 2:16 AM
#12
justanother avatar

justanother

New Zenner

Join Date:
Mar 2007
Posts:
2
Plugin Contributions:
0

Re: Error adding new shipping address

I had this same issue (working with v1.3.0.2 and didn't want to do upgrade), and poked around in the code until I found a problem: The $_POST variable in the form is "country", while in the create_account.php file, it was looking for "zone_country_id".

If you open includes/modules/create_account.php and look around line 60, you'll find:

$country = zen_db_prepare_input($_POST['zone_country_id']);
```I changed this to:

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

$selected_country = ($_POST['zone_country_id']) ? $country : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;

$selected_country = ($_POST['country']) ? $country : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;


if ($process == true || $entry_state_has_zones == true ) {
 // if ($entry_state_has_zones == true) {
 //   echo zen_draw_pull_down_menu('state', $zones_array, $zone_name, ' id="state"');
 // } else {
    echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40'), ' id="state"');
 // }
} else {
  echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40'), ' id="state"');
}
if (zen_not_null(ENTRY_STATE_TEXT)) echo '<span class="alert">' . ENTRY_STATE_TEXT . '</span>';?>
10 Mar 2007, 11:56 PM
#13
paperthreads avatar

paperthreads

Zen Follower

Join Date:
Sep 2006
Posts:
142
Plugin Contributions:
0

Re: Error adding new shipping address

THanks for this post! I am too having the same problem. I upgraded to 1.3.7 and installed a new template all at the same time, so don't know if the problem is zen cart or template monster.

But from reading this, sounds like a template monster issue that needs to be fixed. So, i'm going to send it to them to fix it!

12 Mar 2007, 3:59 PM
#14
snarkys avatar

snarkys

Zen Follower

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

Re: Error adding new shipping address

paperthreads:

THanks for this post! I am too having the same problem. I upgraded to 1.3.7 and installed a new template all at the same time, so don't know if the problem is zen cart or template monster.

But from reading this, sounds like a template monster issue that needs to be fixed. So, i'm going to send it to them to fix it!

"i think" the problem is template monsters template overrides every single template file rather than just the ones it needs too. This becomes a bigger problem when the version of zen cart is newer than the template you bought , which is probably most of the time : (

13 Mar 2007, 10:04 PM
#15
urbanroute avatar

urbanroute

New Zenner

Join Date:
Nov 2006
Posts:
3
Plugin Contributions:
0

Re: Error adding new shipping address

I"m using a TM package as well on version 1.3.6, and I just used ExamDiff to see the difference between tpl_modules_address_book_details.php of the default template and my Template monster one. There were a lot of changes so I did a quick backup and copied / pasted right overtop of the template monster one and it worked like a charm. Who knows how old the template monster stuff is! And YES I noticed that you need to heavy modify the templates before they work anyway. Next time I think I"ll just do my own design and save some time.

Ry

14 Mar 2007, 3:57 AM
#16
paperthreads avatar

paperthreads

Zen Follower

Join Date:
Sep 2006
Posts:
142
Plugin Contributions:
0

Re: Error adding new shipping address

Well, I got tired of Template Monster not responding! lol. I pretty much have given up on ever really getting an answer from them. They have live support, but the standard answer is this will take some more research please submit a ticket. Geesh, the whole fact that I pressed to get a live person should have been enough for them to generate the TICKET....anyway, another story for another thread!

For this....I basically went into the template folder for my template, backed them ALL up, so that if I messed anything up, I could revert back. I also went into my database and backed that up! Because with me, you never know what I'll mess up! lol!

Then, I took the templates from the default, and copied the ones I thought were the culprits, and I pasted into my_template folder. The ones I copied were tpl_modules_address_book_default.php, that didn't do anything.....so then I went and replaced tpl_modules_checkout_address.php, and that didn't seem to fix anything....so I then did tpl_modules_checkout_new_address.php....

badda bing, badda boom! Problem fixed! And, lucky lucky, I didn't mess anything else up :) That's a first! lol!

Thanks for the advise, I'd have still been here next month with the same problem and no help from the "monsters!"

22 Mar 2007, 8:13 AM
#17
emmettc avatar

emmettc

New Zenner

Join Date:
Mar 2007
Posts:
2
Plugin Contributions:
0

Re: Error adding new shipping address

I had the same problem with a template monster template. Never again!

I fixed it by changing the tpl_modules_checkout_new_adress.php file to use the same "country" code as the same file in the template_default/templates directory.

Write me if you need more details

Emmett

10 Apr 2007, 7:56 PM
#18
estereofonico avatar

estereofonico

New Zenner

Join Date:
Mar 2005
Posts:
9
Plugin Contributions:
0

Re: Error adding new shipping address

If the problem is when the people is trying to register? Does anyone knows how can this be fixed? Thanks.

10 Apr 2007, 8:17 PM
#19
estereofonico avatar

estereofonico

New Zenner

Join Date:
Mar 2005
Posts:
9
Plugin Contributions:
0

Re: Error adding new shipping address

I followed the instructions that justAnother publish, but the problem remains. I'm trying some other solution, I'll llet you know.

10 Apr 2007, 8:58 PM
#20
estereofonico avatar

estereofonico

New Zenner

Join Date:
Mar 2005
Posts:
9
Plugin Contributions:
0

Re: Error adding new shipping address

The problem seems to be solved now. I just modify some values on the Configuration > Minimun values section. Thanks for your help.