Skip to content

ShippingCalculator not using default shipping country #2573

@lukasbableck

Description

@lukasbableck

The ShippingCalculator currently does not use the default shipping country configured in the shop config.
If you're not logged in and your cart does not have a shipping address a new address will be created here.
This address does not have an ID, so this condition will be true and the ShippingCalculator will display "Please fill in the shipping address." instead of the shipping method for the default shipping country.
Image

When I change line 89 in ShippingCalculator.php to if (!$objAddress) { everything seems to work fine.
(Although this doesn't really make sense I guess, because the getShippingAddress method will always return an address. The check would be completely useless then. Maybe if (!$objAddress->country) { would make more sense? But that heavily depends on how the shipping methods are configured.)

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