Skip to content

[4.x]: Conditional fields not working in Craft Commerce product fields #14289

@MatthiasBrodelet

Description

@MatthiasBrodelet

What happened?

Description

I have a Craft Commerce project that contains a radio field that defines if the pricing should be "static" or "variable".
If the user chose "variable" another field should be visible.
I have configured this in Commerce > System Settings > Product Fields.
For the conditional field I clicked on the cog icon and entered a Product Condition where "Sales price Type" is one of "variable".

When saving this setup and creating a new product the conditional field is hidden as expected.
However when clicking the "variable" radio button the field does not become visible.

Steps to reproduce

  1. Setup a new Craft Commerce project
  2. Create a new product type
  3. Create a conditional field with "product condition"

Expected behavior

The conditional field should toggle visibility based on the condition

Actual behavior

Nothing happens.
The conditional field stays invisible.

Craft CMS version

Craft PRO 4.7.1 and Commerce 4.4.1.1

PHP version

8.1.18

Operating system and version

Linux 6.3.13-linuxkit

Database type and version

MySQL 5.7.29

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

  • Redactor
  • Sendgrid
  • Calendar
  • Craft Commerce
  • Sprig
  • Store Hours

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