Log in
Model

GetOrderedDistanceToSources

Magento\InventoryInStorePickup\Model\ResourceModel\Source\GetOrderedDistanceToSources

What it does

This class calculates geographical distances between multiple coordinates and inventory sources using the Haversine formula.

Developers use it to find nearby pickup locations within a specified radius, ordered by distance from customer locations.

It's essential for implementing store pickup features where customers need to find the closest available stores.

Public Methods

  • execute()