Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Upgraded from Commerce 3 and CP order details page shows addresses with label "Address" instead of "Shipping / Billing Address" #3387

Closed
moldedjelly opened this issue Feb 22, 2024 · 1 comment
Assignees
Labels
bug commerce4 Issues related to Commerce v4

Comments

@moldedjelly
Copy link

What happened?

Description

Upgraded from Commerce 3 to 4 and Control Panel order details page shows Shipping and Billing addresses with label "Address" instead of distinguishing "Shipping / Billing Address" as the new orders do.

Steps to reproduce

  1. Upgrade a site with existing orders from Commerce 3 to Commerce 4.

Expected behavior

Old orders to show addresses labelled as "Shipping Address" and "Billing Address"

Actual behavior

Old orders only show addresses labelled as "Address" and "Address"

Craft CMS version

4.7.2

Craft Commerce version

4.4.1.1

PHP version

8.0.30

Operating system and version

docker - craftcms/nginx:8.0

Database type and version

docker - mariadb:10.3

Image driver and version

No response

Installed plugins and versions

No response

@moldedjelly moldedjelly added commerce4 Issues related to Commerce v4 bug labels Feb 22, 2024
@lukeholder lukeholder self-assigned this Mar 6, 2024
@lukeholder
Copy link
Member

You can fix this by running the following SQL commands on 4.x

UPDATE content
SET title = 'Shipping Address'
WHERE elementId IN (
    SELECT shippingAddressId
    FROM commerce_orders
);
UPDATE content
SET title = 'Billing Address'
WHERE elementId IN (
    SELECT billingAddressId
    FROM commerce_orders
);

if you use a db table prefix, you would need to add the prefix to the table names in the above commands: xxx_commerce_orders and xxx_content

We will add a migration in the future that will clean this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

2 participants