Forums / General Questions / Address not showing

Address not showing

Results 1 to 18 of 18
14 Jul 2006, 18:44
#1
hdg avatar

hdg

New Zenner

Join Date:
Jul 2006
Posts:
71
Plugin Contributions:
0

Address not showing

The addresses for users are being stored correctly, but not being displayed at all. Here's what I mean:
http://img364.imageshack.us/img364/6517/add18eu.th.jpg
(The name is blanked out)

But if you click on Edit, it brings up the Fields correctly filled in with the address. Also when the item is purchased and the confirm email is sent, anything addresses are blank.
14 Jul 2006, 18:47
#2
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

Check your database via phpMyAdmin ...

Do you have anything in the table: address_format
14 Jul 2006, 18:51
#3
hdg avatar

hdg

New Zenner

Join Date:
Jul 2006
Posts:
71
Plugin Contributions:
0

Re: Address not showing

I have:

address_format_id
address_format
address_summary

But nothing in them, it seems:
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0004 sec)
14 Jul 2006, 19:01
#4
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

That would tend to break things ... :cry:

Backup you datebase before doing this:
[PHP]DROP TABLE IF EXISTS address_format;
CREATE TABLE address_format (
address_format_id int(11) NOT NULL auto_increment,
address_format varchar(128) NOT NULL default '',
address_summary varchar(48) NOT NULL default '',
PRIMARY KEY (address_format_id)
) TYPE=MyISAM;
[/PHP]

That will remove and re-create the table ...

Then run this to re-load the settings:
[PHP]# 1 - Default, 2 - USA, 3 - Spain, 4 - Singapore, 5 - Germany
INSERT INTO address_format VALUES (1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country','$city / $country');
INSERT INTO address_format VALUES (2, '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country','$city, $state / $country');
INSERT INTO address_format VALUES (3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country','$state / $country');
INSERT INTO address_format VALUES (4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country');
INSERT INTO address_format VALUES (5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country','$city / $country');
[/PHP]
06 Jan 2011, 15:58
#5
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Address not showing

Ajeh, I have the same problem as HDG. Tried your fix but although that went through ok still have problem. Have 1.3.9f installed. Any other things I can try?
06 Jan 2011, 16:48
#6
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

In phpMyAdmin, find the records in the:
address_book

table, based on the:
customers_id

are they valid?

Next, check the record in the:
orders

table and check the fields:
customers_address_format_id
delivery_address_format_id
billing_address_format_id

and make sure that those are valid as well ...
06 Jan 2011, 17:48
#7
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Address not showing

Thanks Ajeh. I've looked at all that and everything is fine except the orders table "customers_address_format_id" and similar fields appear as value 6 (rather than 1). I have manually changed the value and the billing/shipping address appears where it should, but new orders still come in as value 6. I have looked at the table construction and the parameters also appear to be correct.

In addition to that, the primary address does not display although the data is there and your database fix now appears to be working. Is this to do with html ouput perhaps? I am in version 1.3.9f (hosting php version would not support 1.3.9h) and despite rolling back code and removing overrides, the primary address still doesn't display on the address_book page. Is this part of the same problem? Or should I be looking at html special characters? I am using php 5.2.13.
06 Jan 2011, 17:59
#8
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

What isn't supported in v1.3.9h by using your current php version?

The only thing that might not be supported is related to the htmlspecialcharacters on post #6 of:
http://www.zen-cart.com/forum/showthread.php?t=153143

and that can easily be fixed with the posted solution ...
06 Jan 2011, 18:03
#9
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Address not showing

I had some correspondence with Dr. Byte because the documentation said that 1.3.9h would not work properly with php 5.3.13 and I had explained the misssing address details to the venerable doctor. I tried his workarounds but got no joy. (see http://www.zen-cart.com/forum/showthread.php?t=168433&highlight=primary+address+display&page=2)

If you think that the only thing that isn't supported is special characters then I will revert, however, that will still leave me with the problem of these missing addresses and the value that is '6' that should be'1'.
06 Jan 2011, 18:14
#10
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

Let's step back for a moment ...

You are saying the:
value that is 6 should be 1 ...

"what" value is 6 that should be 1 right now, when you are using v1.3.9h ... :unsure:
06 Jan 2011, 18:20
#11
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Address not showing

Sorry. I thought I had explained I had had to revert to 1.3.9f so that is what I am working in at the moment, and one of the problems is that in the order table, the customers_address_format_id" and similar fields appear as value 6 (rather than 1).
06 Jan 2011, 21:49
#12
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

Gotcha ... wanted to be sure we were on the same page ...

Before going through a lot of work ... let's peek at what is *really* broken ...

1 check the table:
address_format

and check the address_format_id that they are setup right ...

2 check the table:
countries

and check the address_format_id are setup right ...

3 if both tables:
address_format
countries

are using the correct address_format_id ... then let's check the next stage ...

4 check the table:
address_book

and check the records for the Customer based on the customers_id to see what the field entry_country_id they are setup for ...

4 check the table:
orders

for the 3 fields:
customers_address_format_id
delivery_address_format_id
billing_address_format_id

Based on all of these checks of the database ... where is the relationship between the address_format_id and the orders breaking down?

If the only issue is that you have countries that need to be fixed on the address_format_id then you can fix the data ...

Example: countries are setup to use address_format_id 6 and it does not exist or should really be set to 1 ...

This means all address_format_id that are set to 6 and should be 1 can be fixed and then the orders can be fixed for the 3 fields as well ...

Are you following where I am going with this? :smile:

If you cannot
07 Jan 2011, 12:27
#13
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Address not showing

Ajeh - thank you so much, you are a genius. I didn't know to check the countries table. When I did, I found that the UK was set to 6. As soon as I changed that it all started to work again. When I compared the version h install to the version f, it seems as though somewhere, despite the documentation, a change is made to the database as version h has 6 rows in the zen-address-format table, not 5. Some others out there might not be aware of this. I wonder if it is a bug?
07 Jan 2011, 23:40
#14
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

United Kingdom has always been 6 and the settings in the address_format

# 1 - Default, 2 - USA, 3 - Spain, 4 - Singapore, 5 - Germany, 6 - UK/GB
INSERT INTO address_format VALUES (1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country','$city / $country');
INSERT INTO address_format VALUES (2, '$firstname $lastname$cr$streets$cr$city, $state    $postcode$cr$country','$city, $state / $country');
INSERT INTO address_format VALUES (3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country','$state / $country');
INSERT INTO address_format VALUES (4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country');
INSERT INTO address_format VALUES (5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country','$city / $country');
INSERT INTO address_format VALUES (6, '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country','$postcode / $country');


So it could be you lost some where the setting for the address_format_id definition for 6 ... :unsure:
08 Jan 2011, 00:28
#15
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Posts:
202
Plugin Contributions:
0

Re: Address not showing

Hey Linda,

I just upgraded from 1.3.9g to 1.3.9H and some problems occurred.

1. address went missing from admin index page, " New Customers " Column"

2. addresses missing from packing slips and invoices.


I do use some mods like edit orders and all.
08 Jan 2011, 01:07
#16
ajeh avatar

ajeh

Oba-san

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

Re: Address not showing

Could you check in phpMyAdmin, the table:
address_format

and make sure you have all 6 definitions?
08 Jan 2011, 01:32
#17
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Posts:
202
Plugin Contributions:
0

Re: Address not showing

Ajeh:

Could you check in phpMyAdmin, the table:
address_format

and make sure you have all 6 definitions?


yes all there. 1 through 6.

also wanted to mention that if i use an old back up index file in admin

they show up on the "new customer" column, but not on invoice and packing slips.
08 Jan 2011, 01:46
#18
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Posts:
202
Plugin Contributions:
0

Re: Address not showing

seems to be fixed.

I followed DrByte's bug fix solution.

http://www.zen-cart.com/forum/showpost.php?p=953964&postcount=6

I just did step #1 and all seems to be working fine, and therefore i left step #2 alone. I am a bit confused as I have PHP version 5.2.6 installed and this fix is supposed to be for versions lower than 5.2.3. so i don't know.



Is this a recommended solution? If not, i'd fix it when there is an answer. Thanks Linda.