Skip to content

[5.x]: Addresses are truncated in Order Details page #15338

@martyspain

Description

@martyspain

What happened?

Description

In Commerce 4, billing and shipping addresses were fully visible in the Order Details page . This made it simple for staff checking orders to confirm the address and book shipping for orders etc.

In Commerce 5, only the first two lines of an address are visible. This is caused by a CSS rule on line 3387 of _main.scss:

.card .card-content .card-body>* {
    --max-lines: 2;
    margin: 0;
    max-height: calc(var(--lh)* var(--max-lines));
    overflow: hidden;
    text-wrap: pretty;
}

This CSS rule causes the remaining lines of the address to be hidden from view, and they cannot be made visible without hacking the CSS via the browser devtools. This isn't a viable solution for staff members wanting to input order addresses into third-party shipping systems.

Truncating the address in this way would be OK as a preview of the address when displayed elsewhere, but I would expect the order details page to show billing/shipping addresses in full as per the Commerce 4 behaviour.

Steps to reproduce

  1. In a Craft 5 site running Commerce 5, click Commerce > Orders;
  2. Click on an order to view the order details

Expected behavior

The order address should be shown in full.

Actual behavior

The order address is restricted to two lines only.

Craft CMS version

5.2.5

Craft Commerce version

5.0.11.1

PHP version

8.2

Operating system and version

All

Database type and version

MySQL 8.0.32

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions