Skip to content

Cart price rule is not being applied in the sweden store view when the postal code contains a space. #40379

@imran9935

Description

@imran9935

Preconditions (*)

Tested in this versions:

  1. Magento Developer branch

Description (*)

When applying a Cart Price Rule in the Sweden store view, the discount is not applied correctly if the postal code contains a space. For example, the postal code 100 00 causes the cart price rule to fail, Additionally, when entering a Swedish postal code without a space (e.g., 10000), it is giving a validation warning (screenshot-1).

Screenshot 1:

Image

Screenshot 2:

Image

Steps to reproduce (*)

  1. Access magento admin panel
  2. Create a Cart Price Rule with condition (screenshot-2)
  3. Create Sweden store view
  4. Go to the frontend Sweden store view
  5. Add a product to the cart
  6. Enter a postal code with a space (e.g., 100 00) during checkout, discount is not applied
  7. Enter a postal code without a space (e.g., 10000), it gives warning

Expected result (*)

Cart Price Rule should apply correctly when a Swedish postal code is entered, and without a space it should not trigger any validation warning.

Actual result (*)

Cart Price Rule is not applied when a Swedish postal code is entered, and without a space it triggers a validation warning.

Additional information (*)

When we create the condition as in screenshot-2 and go to the Swedish store view on the checkout page, using a zip code without a space gives a validation warning (screenshot-2). However, when the user enters the standard Swedish postcode format with a space, the discount is not being applied. This behavior is confusing, as the system rejects the incorrect format but also fails to apply the discount on the correct format.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Ready for Confirmation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions