Skip to content

Please choose delivery options #15

@Aquive

Description

@Aquive

When walking trough the normal checkout flow, i get this error after clicking place order button.

  • Please choose delivery options

The default delivery option is visually selected, but under the hood its not.

Image

Below patch works. It's a draft so I can proceed testing. It's not battle tested.

diff --git a/vendor/postnl/module-hyva-checkout/Magewire/ShippingMethod.php b/vendor/postnl/module-hyva-checkout/Magewire/ShippingMethod.php
index 1234567..abcdefg 100644
--- a/vendor/postnl/module-hyva-checkout/Magewire/ShippingMethod.php
+++ b/vendor/postnl/module-hyva-checkout/Magewire/ShippingMethod.php
@@ -106,6 +106,9 @@ class ShippingMethod extends Component implements EvaluationInterface
             }
         }
         $this->type = $defaultType;
+
+        // Trigger the event to ensure the default type is properly initialized
+        $this->emit('postnl_select_delivery_type', ['value' => $defaultType]);
     }

     public function updatedType(mixed $value): mixed
 

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