magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Address Information not showing #5873

Closed ComputerNorth closed 6 years ago

ComputerNorth commented 8 years ago

Preconditions

Magento 2.1

Steps to reproduce

In the admin panel go to Sales --> Orders --> select an order

Expected result

In both the Billing Address and Shipping Address I expect to see the address details of the customer. However the actual result is:

Address Information Billing Address

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}} {{/depend}} {{depend company}}{{var company}} {{/depend}} {{if street1}}{{var street1}} {{/if}} {{depend street2}}{{var street2}} {{/depend}} {{depend street3}}{{var street3}} {{/depend}} {{depend street4}}{{var street4}} {{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}} {{var country}} {{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}} F: {{var fax}}{{/depend}} {{depend vat_id}} VAT: {{var vat_id}}{{/depend}}

I'm looking forward to a solution, Thanks,

andimov commented 8 years ago

@ComputerNorth Thanks for reporting!

Try to clear browser cache or open this page in another browser. If this does not help, add a screenshot of the page with the open console.

ComputerNorth commented 8 years ago

magento-scr

It happens in FireFox, IE and Chrome, clear browser cache doesn't help

gahehe commented 8 years ago

Pump. Need urgent fix for it.

andimov commented 8 years ago

@gahehe Do you have such view for all orders? Have you tried to change data in order? Please add screenshot with opened dev console, it's can consists some js errors.

gahehe commented 8 years ago

Hi @andimov,

This is not only in order view, but also everywhere that displayed the customer address by template and calling the \Magento\Customer\Block\Address\Book::getAddressHtml() method. For example, in the Customer Address Book: untitled

Tried to var_dump what this function returned, and it returned this also. I don't think it is JS issue.

andimov commented 8 years ago

Looks like it relates to https://github.com/magento/magento2/issues/4936

@ComputerNorth @gahehe Did you migrate from a previous version?

ComputerNorth commented 8 years ago

Yes I did migrate from magento 1.8.1

gahehe commented 8 years ago

OK Found the solution.

@ComputerNorth, please check your database, the eav_entity_type table. The entity code "customer_address" must have id as 2, because in the \Magento\Customer\Api\AddressMetadataInterface, the id of "customer_address" type was fixed to 2 (the ATTRIBUTE_SET_ID_ADDRESS const). In my case, the "customer_address" entry, somehow changed ID to 4 (it's weird, because the fresh eav_entity_type has the ID column increment as 1,2,3..., but mine 2,4,6,8...). So I need to rewrite the function to use 4 instead of 2 as id, then everything came back to normal.

ComputerNorth commented 8 years ago

Thank you, but unfortunately for me this is not a solution. My eav_entity_type has the ID column increment as 1,2,3 and entity type id =2 for the entity type code "customer_address".

milanstojanov commented 8 years ago

I can confirm this issue! Happens after I have upgraded from 1.7.0.2 to 2.1.0. Any solutions so far?

milanstojanov commented 8 years ago

In my case, @gahehe point was almost there, but I figured it out after reviewing the thread, since it was a bit different.

The migration tool added a couple of rows to the end of eav_attribute_set table (didn't mess up increment ids as it was in his case). So for example, I see a row added:

+------------------+----------------+--------------------+------------+ | attribute_set_id | entity_type_id | attribute_set_name | sort_order | +------------------+----------------+--------------------+------------+ | 41 | 2 | Default | 2 | +------------------+----------------+--------------------+------------+

41 is used to reference customer address attribute set in some of the other tables. So the solution comes down to changing Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS to 41 in my case.

I am pretty sure this is going to be fixed in some of the next releases of the tool, but until then - hopefully this will be helpful to someone.

ComputerNorth commented 8 years ago

Thanks milanstojanov. For me the default attribute is:

+------------------+----------------+--------------------+------------+ | attribute_set_id | entity_type_id | attribute_set_name | sort_order | +------------------+----------------+--------------------+------------+ | 4 | 4 | Default | 1 | +------------------+----------------+--------------------+------------+ So I changed Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS to 4. Unfortunately it didn't solve the issue.

milanstojanov commented 8 years ago

Please check the table again. I am pretty sure you will find a record at the very bottom that has entity_type_id = 2. That one needs to be changed, not the top one. :)

daschenbrener commented 8 years ago

I as well have this same issue, and the entity_type_id = 2 in the Eav Entity Type table. and I also upgraded from 1.9.2.2 to 2.1.0

bst2002git commented 7 years ago

Hello, i'v installed Magento 2.0.1 and upgraded to 2.1.2 and wondered why instead address is shown the template format variables {{}}.... an the problem is the "auto_increment_increment=5" (percona mysql cluster) is set to internal 5, so it increments 5,10,15,20,25... So my question is what can i do, changing Hard-Coded IDs in Magento? What about when i update Magento, must remember to change this every time, not a good Idea?

Which changes do i need to make in the database in which tables to assign the Hard-Coded IDs of Magento

Thats a big Problem

sanjayjethva commented 7 years ago

I am facing the same issue in Magento 2.1.6 Let me know if any one has a better solution. Thanks

refaelgold commented 7 years ago

i follow as well..

refaelgold commented 7 years ago

I really struggle with this. i try to change it 3 times and the customer address still not give me the correct values.

When i try to edit it - i can see the corrcet values inside

refaelgold commented 7 years ago

If can anyone give a good solution please let me know .

i did migrate from previous version of M 1.9.2.3 to M 2.1.6

julietolivertest.a2hosted.com ->this is the site

2017-05-24_12-35-16 2017-05-24_12-38-34 2017-05-24_12-37-09

lfritsche commented 7 years ago

Due to some upgrade issues from 2.0.7 to 2.1.6 related to custom attributes I merged all the Migration_Default sets to the standard sets with attribute_set_name="Default". attribute_set_id 1 to 9 (Migration_Default) don't exist any more in my DB. Instead it's 10 to 17 (Default).

I'm not really happy about having to overwrite the ATTRIBUTE_SET_ID_ADDRESS within /vendor/magento/module-customer/Api/AddressMetadataInterface.php to "11". Please find a possibility without hardcoding this value. Otherwise I will struggle again on every update.

lfritsche commented 7 years ago

I tried to clean up the eav_attribute_set table. Due to migration I had duplicate IDs for each entity_type_id. I just wanted to have attribute_set_id from 1 to 8 for entity_type_id 1 to 8. I thought changing the foreign values at eav_attribute_group to the corresponding 1->8 values would do the trick to delete the duplicate set IDs, but It seems, that this change would put up the same issue again, which I already could resolve within AddressMetadataInterface.php.

Which tables/rows or files? do I have to change in order to have a clean eav structure with only one Default set per eav_type?

shinesoftware commented 7 years ago

Same Issue in the Magento ver. 2.2.0-dev

Imkalp08 commented 7 years ago

Hello please help i have migrated site in 1.9 to 2.1.7 but address information not showing the backend & frontend so only the address template. like this

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}} {{depend company}}{{var company}}
{{/depend}} {{if street1}}{{var street1}}
{{/if}} {{depend street2}}{{var street2}}
{{/depend}} {{depend street3}}{{var street3}}
{{/depend}} {{depend street4}}{{var street4}}
{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}}
F: {{var fax}}{{/depend}} {{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

If any solution so please

eCommerceGorilla commented 6 years ago

This issue persists in 2.2.1 for billing address for virtual products being paid for by PayPal Standard

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}} {{/depend}} {{depend company}}{{var company}} {{/depend}} {{if street1}}{{var street1}} {{/if}} {{depend street2}}{{var street2}} {{/depend}} {{depend street3}}{{var street3}} {{/depend}} {{depend street4}}{{var street4}} {{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}} {{var country}} {{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}} F: {{var fax}}{{/depend}} {{depend vat_id}} VAT: {{var vat_id}}{{/depend}}

giacmir commented 6 years ago

Same as @eCommerceGorilla for me. Bug appears on 2.2.1 with virtual products and paypal payment.

shinesoftware commented 6 years ago

I can confirm that the issue appears in the Magento ver. 2.2.0-dev too.

magento-engcom-team commented 6 years ago

Hi @ComputerNorth we can not reproduce the issue on clean magento instance. Please, report the issue to the https://github.com/magento/data-migration-tool repository is there is an issue in the tool.

giacmir commented 6 years ago

@magento-engcom-team I don't think is related to the migration tool. We have the same issue on a clean 2.2 installation.

magewallet commented 6 years ago

I confirm -> This issue persists in 2.2.1 for billing address for virtual products being paid for by PayPal Standard

We have just upgraded website from 2.1.x to 2.2.0. We don't have website that was migrated from Magento 1.x version. So its not related to Migration.

billing-address-issue

Please suggest some solution for the same asap.

josephmcdermott commented 6 years ago

Also have this issue on PayPal orders having upgraded to 2.2.1 from 2.2.0 (previously 2.1.9, 2.1.8, etc. keeping up with releases but never migrated from Magento 1.x). We have the issue with Downloadable products. All customer billing and shipping address missing from database.

This is the third major issue with PayPal I've had to report since 2.2... quite disconcerting, wondering how much regression testing is actually happening before these releases.

josephmcdermott commented 6 years ago

This is actually very easy to replicate with a clean Magento.

Please re-open @magento-engcom-team as it's quite a major issue.

josephmcdermott commented 6 years ago

Sorry for the multiple posts, but I've been doing a bit of debugging of this, and I'm not actually sure its a bug per se. The fact that the billing address appears as {{depend prefix}}{{var prefix}} is a symptom of the issue for Magento to resolve, however the actual issue is perhaps that PayPal does not require, nor does it request, a billing address to complete an order.

The shipping and billing addresses associated to the quote are both empty during checkout with PayPal express, and you will notice that with other payment methods such as CheckMo you are asked for your billing address on the payment step, however with PayPal you are not asked any billing information. For virtual orders there is also no requirement for a shipping address, so neither are captured.

It's a bit annoying as we are left with a situation where we have zero address information about a customer for invoicing purposes, but perhaps this is by design... perhaps @magento-engcom-team team could comment on that?

josephmcdermott commented 6 years ago

Opened a new ticket https://github.com/magento/magento2/issues/12707 to try and get an answer, since this one is closed and likely being ignored.

aeu commented 6 years ago

(commenting here and as well as in https://github.com/magento/magento2/issues/12707, as I do not know which will get closed.)

I am seeing this issue as well. I believe that it is by design, as it appears that when the product is Virtual, Magento does not capture any address information (because there is no product to ship).

Superficially this seems like a good idea, but as @josephmcdermott pointed out, this leaves us in a situation where we have no address information for billing / invoicing purposes.

Joedel-Esco commented 6 years ago

Still seeing this issue.

Using magento 2.2.2 CE Once a customer Checkouts even if the customer is registered or not.

How to recreate. Freshly install magento 2.2.2

  1. Add Test Product
  2. Configure Paypal Express checkout.
  3. Checkout via paypal express
  4. Finish the process.
  5. Check the Order of the Customer in the admin Panel.

image

magewallet commented 6 years ago

I am not able to understand why there is no fix inside the 2.2.2 version yet. This is a major bug. Please help us to resolve this.

shinesoftware commented 6 years ago

Indeed! It's really weird!

heyepic commented 6 years ago

Just ran into this on a migrated store (from 1.9.x) but glad to see it's even non-migrated ones. It's for any PayPal transaction for me - not virtual products as the client doesn't sell them. Only physical good that are shipped.

If anyone sees a solution, please drop it in here! My search continues.

magewallet commented 6 years ago

Any update on this issue. I dont believe that no one is reacting on this #5873 and #13149 two tickets. We are really say that its very big issue that stop merchant from using Magento 2.2.2. So please if possible give us some update on the same.

Otherwise how we can convince our client to use Magento 2.

Please help!

shinesoftware commented 6 years ago

Seems to me that this bug is not important for Magento!

lalitmalav commented 6 years ago

Hi Guy's

Have you resolved this issue, I am badly stuck also... please let me know solution ??

magewallet commented 6 years ago

Hello

This issue has been fixed in latest release 2.2.4. I confirmed in my website today.

Thanks to Magento Team.

shinesoftware commented 6 years ago

Hi @magewallet how did Magento solved this issue?

magewallet commented 6 years ago

@shinesoftware I dont know how they resolve it. But once we have upgrade to 2.1.4. Its resolved.

aniruddh-capital commented 6 years ago

I had the same issue on 2.3 but not related to the migration here is the solution which worked for me for anyone still having this issue on 2.3 replace this file /vendor/magento/module-paypal/Model/Express/Checkout.php with latest of magento version 2.2.4

the update is in this function _setExportedAddressData

and as its a bug in core file you're fine to replace the core file

nowsathyasar commented 6 years ago

I am facing the same issue in Magento 2.2.5 Let me know if any one has a better solution. Thanks

nowsathyasar commented 6 years ago

Billing Address Edit {{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}} {{/depend}} {{depend company}}{{var company}} {{/depend}} {{if street1}}{{var street1}} {{/if}} {{depend street2}}{{var street2}} {{/depend}} {{depend street3}}{{var street3}} {{/depend}} {{depend street4}}{{var street4}} {{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}} {{var country}} {{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}} F: {{var fax}}{{/depend}} {{depend vat_id}} VAT: {{var vat_id}}{{/depend}} Shipping Address Edit {{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}} {{/depend}} {{depend company}}{{var company}} {{/depend}} {{if street1}}{{var street1}} {{/if}} {{depend street2}}{{var street2}} {{/depend}} {{depend street3}}{{var street3}} {{/depend}} {{depend street4}}{{var street4}} {{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}} {{var country}} {{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}} F: {{var fax}}{{/depend}} {{depend vat_id}} VAT: {{var vat_id}}{{/depend}}

nowsathyasar commented 6 years ago

Hi Guy's

Have you resolved this issue, I am badly stuck also... please let me know solution ??

nowsathyasar commented 6 years ago

I had the same issue on 2.2.5.. Here is the solution which worked for me for anyone still having this issue on 2.2.5 replace this file vendor\magento\module-sales\Model\Order\Address\Renderer.php with latest of magento version 2.2.5

nowsathyasar commented 6 years ago

`<?php /**

namespace Magento\Sales\Model\Order\Address;

use Magento\Framework\Event\ManagerInterface as EventManager; use Magento\Framework\Filter\FilterManager; use Magento\Framework\DataObject;

/**