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.56k stars 9.32k forks source link

Address templates are not used in checkout #8001

Closed andreaskoch closed 7 years ago

andreaskoch commented 7 years ago

The Customer Address Templates that are defined in the Magento backend (Backend > Stores > Settings > Configuration > Customers > Customer Configuration > Address templates) are in places, but not the checkout.

see: Magento User Guide: Marketing > Communications > Sales Documents > Customer Address Templates

Preconditions

Steps to reproduce

  1. Goto Backend > Stores > Settings > Configuration > Customers > Customer Configuration > Address templates and change the the HTML address template to something like this:

    Custom Address Template
    {{var street1}}

    Custom HTML Address Template

  2. Clear the caches

Guest Checkout

  1. Add an item to cart
  2. Proceed to the review section of the checkout
  3. You will notice that the displayed billing and shipping addresses use different address format than the one we configured

Registered User Checkout

  1. Create a user account
  2. Add addresses to your account
  3. Add an item to your cart and proceed to the checkout
  4. You will notice that the shipping address selection uses a different address template than the one we configured

Expected result

It would be great if you could change the default templates of the checkout to use the formatted addresses like you do it in other places like the order confirmation mail, the order view and the print version of the order:

Works as expected for: Order Confirmation Mail, Print Order, View Order, My Account

Not using the address templates for the checkout is not what I would expect and in my opinion leads to unnecessary implementation efforts, inconsistencies, duplicate code and bugs for the address formatting.

Actual result

The checkout does not use the address templates:

No address template used in guest checkout

No address templates used in address selection for registered customers

aakimov commented 7 years ago

Hello @andreaskoch,

Thank you for your report and interest in Magento system. The behavior that you have described in expected in Magento 2. Address template settings do not have any impact on checkout process anymore (address tiles on shipping step and address information in the sidebar on the billing step). This was a requirement and was done on purpose. However we do have plans to improve address information rendering on checkout in future in order to make it more flexible (internal ticket MAGETWO-63402).

Thank you once again for the report. This ticket will be closed. Thank you for understanding. Regards,

ludwig-gramberg commented 7 years ago

oh boy... we're using prefix and suffix to have a unified way to store title and gender and a relation in between, displaying them both doesnt make any sense so we need to customize this too.

@andreaskoch did you end up implement a custom renderer?

treii28 commented 6 years ago

Where are the form templates or what controls them? Someone had the inane sense to place a dependent field (state/province) above it's determinant field (country) and we need to change the order so it makes logical sense.

cptX commented 1 year ago

Can somebody tell me what is the status about this? I'm confused! I am working in Magento 2.4.5 and indeed the templates are not used in checkout, and is critical for my implementation. It makes no sense to not use the templates... Why do you make magento such a complicated mess?