Skip to content

[5.x]: Product title no longer included in variant element selector #4155

@mcjackson18

Description

@mcjackson18

What happened?

Description

After upgrading a site to Commerce 5 the variant element select field no longer includes the name of the product, it only displays the variant title. This can be confusing if there are multiple variants with the same title.

Here's an old PR referencing the same issue in Commerce 3 - #333

Steps to reproduce

  1. Create a new discount and select Product Variants under the "Matching Items" tab.

Expected behavior

Both the product title and variant title displayed in the selected Product Variants.

Actual behavior

Only the variant title is displayed.

Image

Craft CMS version

Craft Pro 5.8.17

Craft Commerce version

5.4.6

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions