Skip to content

[5.x]: SKU of product variant empty after duplicating product #4197

@jakobhaerter

Description

@jakobhaerter

What happened?

Description

Usually, when I create a new product variant, the slug of the product is being used for the SKU field – as far as I understand. When I duplicate a product in Craft Commerce which includes a product variant, the SKU of the product variant is empty. The SKU field being a required field, I'd expect an error message when I try to save the product. But that's not the case.

Steps to reproduce

  1. Create a product and a product variant
  2. Duplicate this product
  3. The SKU field inside the product variant should be empty

Expected behavior

At least an error message.

Actual behavior

See above.

Craft CMS version

5.8.21

Craft Commerce version

5.5.1

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