Skip to content

Country code coming empty during checkout #24486

@sufyaniksula

Description

@sufyaniksula

Preconditions (*)

  1. Install Magento version 2.1.8

Steps to reproduce (*)

  1. Select United Arab Emirates as default country
  2. Select Saudi Arabia and United Arab Emirates as allowed countries
  3. Register a new user
  4. Go to checkout and select a payment method to place an order

Expected result (*)

  1. Order successfully placed

Actual result (*)

  1. Error message comes as "An error occurred on the server. Please try to place the order again".

On printing the actual exception message, error message comes as "Please correct the country code". This message comes from

vendor/magento/module-directory/Model/ResourceModel/Country.php

The code is passed in the function:

public function loadByCode(\Magento\Directory\Model\Country $country, $code)

The $code being passed here comes empty during checkout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Format is validGate 1 Passed. Automatic verification of issue format passed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions