Skip to content

[BUG] Checkout functions remain active despite configuration being disabled #399

@Paulsky

Description

@Paulsky

We are currently using a local pickup shipping method and have another postcode check functionality with corresponding fields (street.0, street.1, street.2) that works well. We want to integrate PostNL, but are currently waiting for account validation and contracts. We have installed the PostNL extension in advance but have disabled it in the configuration until we receive our API keys.

To Reproduce
Steps to reproduce the behavior:

  1. Install TIG PostNL extension (I'm using the Hyva compatibility extension also)
  2. Set the mode to 'off' under 'account settings' in Magento backend configuration (this is default)
  3. Set 'Address validation' > 'Use postcode check' to 'NO' under 'extra' settings (this is default)
  4. Disable tig_street, tig_housenumber, tig_housenumber_additional, postcodenl_manual_mode, under (Hyva) checkout fields
  5. Proceed through checkout process

Expected result

  1. No postcode validation API calls should be made since the functionality is disabled in multiple settings.
  2. No PostNL-specific fields or blocks (such as postcode, house number, and house number addition fields) should appear in the checkout when the functionality is disabled in the configuration.

Actual result
Two issues are occurring:

  1. API call for postcode validation is still being executed, resulting in a 500 error with the message "Please enter your API key" even though the module mode is set to 'off' and the postcode check feature is explicitly disabled.
  2. An entire PostNL block is being generated in the checkout (including postcode, house number, and house number addition fields) despite the module configuration being turned off.

Workaround
None

Screenshots

Image Image Image

Please complete the following information

  • Magento version: 2.4.7-p3
  • PHP version: 8.1.31
  • TIG PostNL version: 1.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions